Merge branch 'master' into nx3

pull/3397/head
bunsenstraat 2 years ago committed by GitHub
commit 158fe5452d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 49
      apps/remix-ide-e2e/src/tests/transactionExecution.test.ts
  2. 4
      apps/remix-ide/src/app/tabs/debugger-tab.js
  3. 13
      apps/remix-ide/src/blockchain/providers/vm.js
  4. 13
      apps/remix-ide/src/blockchain/providers/worker-vm.ts
  5. 12
      libs/ghaction-helper/package.json
  6. 8
      libs/remix-analyzer/package.json
  7. 6
      libs/remix-astwalker/package.json
  8. 3
      libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts
  9. 12
      libs/remix-debug/package.json
  10. 6
      libs/remix-lib/package.json
  11. 6
      libs/remix-simulator/package.json
  12. 1
      libs/remix-simulator/src/vm-context.ts
  13. 6
      libs/remix-solidity/package.json
  14. 10
      libs/remix-tests/package.json
  15. 12
      libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx
  16. 1
      libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx
  17. 3
      libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx
  18. 1
      libs/remix-ui/run-tab/src/lib/run-tab.tsx
  19. 1
      libs/remix-ui/run-tab/src/lib/types/index.ts
  20. 4
      libs/remix-url-resolver/package.json
  21. 4
      libs/remix-ws-templates/package.json
  22. 2
      libs/remixd/package.json

@ -213,7 +213,28 @@ module.exports = {
'uint256 num': '24'
}
})
.end()
},
'Should switch to the mainnet VM fork and execute a tx to query ENS #group5': function (browser: NightwatchBrowser) {
let addressRef
browser
.addFile('mainnet_ens.sol', sources[7]['mainnet_ens.sol'])
.clickLaunchIcon('solidity')
.setSolidityCompilerVersion('soljson-v0.8.17+commit.8df45f5f.js')
.clickLaunchIcon('udapp')
.switchEnvironment('vm-mainnet-fork')
.waitForElementPresent('select[data-id="runTabSelectAccount"] option[value="0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]') // wait for the udapp to load the list of accounts
.selectContract('MyResolver')
.createContract('')
.clickInstance(0)
.getAddressAtPosition(0, (address) => {
addressRef = address
})
.clickFunction('resolve - call')
.perform((done) => {
browser.verifyCallReturnValue(addressRef, ['0:address: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'])
.perform(() => done())
})
}
}
@ -431,5 +452,31 @@ contract C {
}
}`
}
}, {
'mainnet_ens.sol': {
content:
`
import "https://github.com/ensdomains/ens-contracts/blob/master/contracts/utils/NameEncoder.sol";
abstract contract ENS {
function resolver(bytes32 node) public virtual view returns (Resolver);
}
abstract contract Resolver {
function addr(bytes32 node) public virtual view returns (address);
}
contract MyResolver {
// Same address for Mainet, Ropsten, Rinkerby, Gorli and other networks;
ENS ens = ENS(0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e);
function resolve() public view returns(address) {
(,bytes32 node) = NameEncoder.dnsEncodeName("vitalik.eth");
Resolver resolver = ens.resolver(node);
return resolver.addr(node);
}
}
`
}
}
]

@ -45,10 +45,6 @@ export class DebuggerTab extends DebuggerApiMixin(ViewPlugin) {
this.call('notification', 'toast', notFoundToastMsg(contractAddress))
})
this.on('fetchAndCompile', 'usingLocalCompilation', (contractAddress) => {
this.call('notification', 'toast', localCompilationToastMsg())
})
this.on('fetchAndCompile', 'sourceVerificationNotAvailable', () => {
this.call('notification', 'toast', sourceVerificationNotAvailableToastMsg())
})

@ -24,15 +24,13 @@ class VMProvider {
this.worker = new Worker(new URL('./worker-vm', import.meta.url))
const provider = this.executionContext.getProviderObject()
this.worker.postMessage({ cmd: 'init', fork: this.executionContext.getCurrentFork(), nodeUrl: provider?.options['nodeUrl'], blockNumber: provider?.options['blockNumber']})
let incr = 0
const stamps = {}
this.worker.addEventListener('message', (msg) => {
if (stamps[msg.data.stamp]) {
if (msg.data.cmd === 'sendAsyncResult' && stamps[msg.data.stamp]) {
stamps[msg.data.stamp](msg.data.error, msg.data.result)
}
})
} else if (msg.data.cmd === 'initiateResult') {
if (!msg.data.error) {
this.provider = {
sendAsync: (query, callback) => {
const stamp = Date.now() + incr
@ -46,6 +44,11 @@ class VMProvider {
this.accounts = {}
this.executionContext.setWeb3(this.executionContext.getProvider(), this.web3)
}
}
})
this.worker.postMessage({ cmd: 'init', fork: this.executionContext.getCurrentFork(), nodeUrl: provider?.options['nodeUrl'], blockNumber: provider?.options['blockNumber']})
}
// TODO: is still here because of the plugin API
// can be removed later when we update the API

@ -7,7 +7,18 @@ self.onmessage = (e: MessageEvent) => {
case 'init':
{
provider = new Provider({ fork: data.fork, nodeUrl: data.nodeUrl, blockNumber: data.blockNumber })
if (provider) provider.init()
provider.init().then(() => {
self.postMessage({
cmd: 'initiateResult',
stamp: data.stamp
})
}).catch((error) => {
self.postMessage({
cmd: 'initiateResult',
error,
stamp: data.stamp
})
})
break
}
case 'sendAsync':

@ -1,6 +1,6 @@
{
"name": "@remix-project/ghaction-helper",
"version": "0.1.5",
"version": "0.1.6",
"description": "Solidity Tests GitHub Action Helper",
"main": "src/index.js",
"scripts": {
@ -19,14 +19,16 @@
},
"homepage": "https://github.com/ethereum/remix-project#readme",
"devDependencies": {
"@remix-project/remix-solidity": "^0.5.9",
"@remix-project/remix-solidity": "^0.5.10",
"@types/chai": "^4.3.4",
"typescript": "^4.9.3"
},
"dependencies": {
"@ethereum-waffle/chai": "^3.4.4",
"@remix-project/remix-simulator": "^0.2.24",
"chai": "^4.3.7",
"ethers": "^5.7.2",
"@remix-project/remix-simulator": "^0.2.21"
}
"ethers": "^5.7.2"
},
"types": "./src/index.d.ts",
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-analyzer",
"version": "0.5.32",
"version": "0.5.33",
"description": "Tool to perform static analysis on Solidity smart contracts",
"scripts": {
"test": "./../../node_modules/.bin/ts-node --project ../../tsconfig.base.json --require tsconfig-paths/register ./../../node_modules/.bin/tape ./test/tests.ts"
@ -25,8 +25,8 @@
"@ethereumjs/tx": "^4.0.2",
"@ethereumjs/util": "^8.0.3",
"@ethereumjs/vm": "^6.3.0",
"@remix-project/remix-astwalker": "^0.0.53",
"@remix-project/remix-lib": "^0.5.23",
"@remix-project/remix-astwalker": "^0.0.54",
"@remix-project/remix-lib": "^0.5.24",
"async": "^2.6.2",
"ethers": "^5.4.2",
"ethjs-util": "^0.1.6",
@ -50,6 +50,6 @@
"typescript": "^3.7.5"
},
"typings": "src/index.d.ts",
"gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0",
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23",
"main": "./src/index.js"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-astwalker",
"version": "0.0.53",
"version": "0.0.54",
"description": "Tool to walk through Solidity AST",
"main": "src/index.js",
"scripts": {
@ -37,7 +37,7 @@
"@ethereumjs/tx": "^4.0.2",
"@ethereumjs/util": "^8.0.3",
"@ethereumjs/vm": "^6.3.0",
"@remix-project/remix-lib": "^0.5.23",
"@remix-project/remix-lib": "^0.5.24",
"@types/tape": "^4.2.33",
"async": "^2.6.2",
"ethers": "^5.4.2",
@ -53,6 +53,6 @@
"tap-spec": "^5.0.0"
},
"typings": "src/index.d.ts",
"gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0",
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23",
"types": "./src/index.d.ts"
}

@ -100,12 +100,11 @@ export class FetchAndCompile extends Plugin {
if (compilation) {
let found = false
compilation.visitContracts((contract) => {
found = util.compareByteCode('0x' + contract.object.evm.deployedBytecode.object, codeAtAddress)
found = util.compareByteCode(codeAtAddress, '0x' + contract.object.evm.deployedBytecode.object)
return found
})
if (found) {
await this.call('compilerArtefacts', 'addResolvedContract', contractAddress, compilation)
setTimeout(_ => this.emit('usingLocalCompilation', contractAddress), 0)
return compilation
}
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-debug",
"version": "0.5.23",
"version": "0.5.24",
"description": "Tool to debug Ethereum transactions",
"contributors": [
{
@ -26,10 +26,10 @@
"@ethereumjs/tx": "^4.0.2",
"@ethereumjs/util": "^8.0.3",
"@ethereumjs/vm": "^6.3.0",
"@remix-project/remix-astwalker": "^0.0.53",
"@remix-project/remix-lib": "^0.5.23",
"@remix-project/remix-simulator": "^0.2.23",
"@remix-project/remix-solidity": "^0.5.9",
"@remix-project/remix-astwalker": "^0.0.54",
"@remix-project/remix-lib": "^0.5.24",
"@remix-project/remix-simulator": "^0.2.24",
"@remix-project/remix-solidity": "^0.5.10",
"ansi-gray": "^0.1.1",
"async": "^2.6.2",
"color-support": "^1.1.3",
@ -69,6 +69,6 @@
},
"homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-debug#readme",
"typings": "src/index.d.ts",
"gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0",
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23",
"types": "./src/index.d.ts"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-lib",
"version": "0.5.23",
"version": "0.5.24",
"description": "Library to various Remix tools",
"contributors": [
{
@ -17,8 +17,8 @@
"test": "./../../node_modules/.bin/ts-node --require tsconfig-paths/register ./../../node_modules/.bin/tape ./test/tests.ts"
},
"dependencies": {
"async": "^2.1.2",
"@ethereumjs/util": "^8.0.3",
"async": "^2.1.2",
"ethers": "^4.0.40",
"ethjs-util": "^0.1.6",
"events": "^3.0.0",
@ -51,6 +51,6 @@
},
"homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-lib#readme",
"typings": "src/index.d.ts",
"gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0",
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23",
"types": "./src/index.d.ts"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-simulator",
"version": "0.2.23",
"version": "0.2.24",
"description": "Ethereum IDE and tools for the web",
"contributors": [
{
@ -22,7 +22,7 @@
"@ethereumjs/tx": "^4.0.2",
"@ethereumjs/util": "^8.0.3",
"@ethereumjs/vm": "^6.3.0",
"@remix-project/remix-lib": "^0.5.23",
"@remix-project/remix-lib": "^0.5.24",
"ansi-gray": "^0.1.1",
"async": "^3.1.0",
"body-parser": "^1.18.2",
@ -67,6 +67,6 @@
},
"homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-simulator#readme",
"typings": "src/index.d.ts",
"gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0",
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23",
"types": "./src/index.d.ts"
}

@ -168,7 +168,6 @@ export class VMContext {
async createVm (hardfork) {
let stateManager: StateManager
console.log('creating a new VM', hardfork, this.nodeUrl, this.blockNumber)
if (this.nodeUrl) {
let block = this.blockNumber
if (this.blockNumber === 'latest') {

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-solidity",
"version": "0.5.9",
"version": "0.5.10",
"description": "Tool to load and run Solidity compiler",
"main": "src/index.js",
"types": "src/index.d.ts",
@ -19,7 +19,7 @@
"@ethereumjs/tx": "^4.0.2",
"@ethereumjs/util": "^8.0.3",
"@ethereumjs/vm": "^6.3.0",
"@remix-project/remix-lib": "^0.5.23",
"@remix-project/remix-lib": "^0.5.24",
"async": "^2.6.2",
"eslint-scope": "^5.0.0",
"ethers": "^5.4.2",
@ -57,5 +57,5 @@
},
"homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-solidity#readme",
"typings": "src/index.d.ts",
"gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0"
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-tests",
"version": "0.2.23",
"version": "0.2.24",
"description": "Tool to test Solidity smart contracts",
"main": "src/index.js",
"types": "./src/index.d.ts",
@ -41,9 +41,9 @@
"@ethereumjs/tx": "^4.0.2",
"@ethereumjs/util": "^8.0.3",
"@ethereumjs/vm": "^6.3.0",
"@remix-project/remix-lib": "^0.5.23",
"@remix-project/remix-simulator": "^0.2.23",
"@remix-project/remix-solidity": "^0.5.9",
"@remix-project/remix-lib": "^0.5.24",
"@remix-project/remix-simulator": "^0.2.24",
"@remix-project/remix-solidity": "^0.5.10",
"@remix-project/remix-url-resolver": "^0.0.42",
"ansi-gray": "^0.1.1",
"async": "^2.6.0",
@ -78,5 +78,5 @@
"typescript": "^3.3.1"
},
"typings": "src/index.d.ts",
"gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0"
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23"
}

@ -68,7 +68,7 @@ function HomeTabTitle() {
></audio>
</div>
</div>
<span>
<span className="d-flex flex-nowrap">
<CustomTooltip
placement={'top'}
tooltipId="overlay-tooltip"
@ -81,7 +81,7 @@ function HomeTabTitle() {
openLink("https://www.youtube.com/channel/UCjTUPyFEr2xDGN6Cg8nKDaA")
_paq.push(['trackEvent', 'hometab', 'socialMedia', 'youtube'])
}}
className="border-0 h-100 btn fab fa-youtube">
className="border-0 h-100 btn fab fa-youtube p-1 pl-2">
</button>
</CustomTooltip>
@ -97,7 +97,7 @@ function HomeTabTitle() {
openLink("https://twitter.com/EthereumRemix")
_paq.push(['trackEvent', 'hometab', 'socialMedia', 'twitter'])
}}
className="border-0 p-2 h-100 pl-2 btn fab fa-twitter">
className="border-0 p-1 h-100 pl-2 btn fab fa-twitter">
</button>
</CustomTooltip>
@ -113,7 +113,7 @@ function HomeTabTitle() {
openLink("https://www.linkedin.com/company/ethereum-remix/")
_paq.push(['trackEvent', 'hometab', 'socialmedia', 'linkedin'])
}}
className="border-0 p-2 h-100 pl-2 btn fa fa-linkedin">
className="border-0 p-1 h-100 pl-2 btn fa fa-linkedin">
</button>
</CustomTooltip>
@ -129,7 +129,7 @@ function HomeTabTitle() {
openLink("https://medium.com/remix-ide")
_paq.push(['trackEvent', 'hometab', 'socialmedia', 'medium'])
}}
className="border-0 p-2 h-100 pl-2 btn fab fa-medium">
className="border-0 p-1 h-100 pl-2 btn fab fa-medium">
</button>
</CustomTooltip>
@ -145,7 +145,7 @@ function HomeTabTitle() {
openLink("https://discord.gg/mh9hFCKkEq")
_paq.push(['trackEvent', 'hometab', 'socialmedia', 'discord'])
}}
className="border-0 h-100 p-2 btn fab fa-discord">
className="border-0 h-100 p-1 pr-2 btn fab fa-discord">
</button>
</CustomTooltip>
</span>

@ -319,6 +319,7 @@ export function ContractDropdownUI (props: ContractDropdownProps) {
isValidProxyAddress={props.isValidProxyAddress}
isValidProxyUpgrade={isValidProxyUpgrade}
modal={props.modal}
disabled={props.selectedAccount === ''}
/>
<div className="d-flex py-1 align-items-center custom-control custom-checkbox">
<input

@ -280,7 +280,7 @@ export function ContractGUI (props: ContractGUIProps) {
className={`udapp_instanceButton ${props.widthClass} btn btn-sm ${buttonOptions.classList}`}
data-id={buttonOptions.dataId}
data-title={buttonOptions.title}
disabled={toggleUpgradeImp && !proxyAddress}
disabled={(toggleUpgradeImp && !proxyAddress) || props.disabled}
>
<CustomTooltip
placement={"right-start"}
@ -415,6 +415,7 @@ export function ContractGUI (props: ContractGUIProps) {
onClick={handleExpandMultiClick}
data-id={buttonOptions.dataId}
className={`udapp_instanceButton ${buttonOptions.classList}`}
disabled={props.disabled}
>
{buttonOptions.content}
</button>

@ -223,6 +223,7 @@ export function RunTabUI (props: RunTabProps) {
passphrase={runTab.passphrase}
/>
<ContractDropdownUI
selectedAccount={runTab.accounts.selectedAccount}
syncContracts={syncContracts}
exEnvironment={runTab.selectExEnv}
contracts={runTab.contracts}

@ -224,6 +224,7 @@ export type MainnetPrompt = (
) => JSX.Element
export interface ContractDropdownProps {
selectedAccount: string,
exEnvironment: string,
contracts: {
contractList: ContractList,

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-url-resolver",
"version": "0.0.45",
"version": "0.0.46",
"description": "Solidity import url resolver engine",
"main": "src/index.js",
"types": "src/index.d.ts",
@ -40,5 +40,5 @@
"typescript": "^3.1.6"
},
"typings": "src/index.d.ts",
"gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0"
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-ws-templates",
"version": "1.0.10",
"version": "1.0.11",
"description": "Create a Remix IDE workspace using different templates",
"main": "src/index.js",
"types": "src/index.d.ts",
@ -25,5 +25,5 @@
"ethers": "^5.4.2",
"web3": "^1.5.1"
},
"gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0"
"gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remixd",
"version": "0.6.11",
"version": "0.6.12",
"description": "remix server: allow accessing file system from remix.ethereum.org and start a dev environment (see help section)",
"main": "index.js",
"types": "./index.d.ts",

Loading…
Cancel
Save