diff --git a/apps/remix-ide/src/app/providers/mainnet-vm-fork-provider.tsx b/apps/remix-ide/src/app/providers/mainnet-vm-fork-provider.tsx index e7f288448f..99fcdbdfb9 100644 --- a/apps/remix-ide/src/app/providers/mainnet-vm-fork-provider.tsx +++ b/apps/remix-ide/src/app/providers/mainnet-vm-fork-provider.tsx @@ -8,7 +8,7 @@ export class MainnetForkVMProvider extends BasicVMProvider { super( { name: 'vm-mainnet-fork', - displayName: 'Mainet fork -Remix VM (London)', + displayName: 'Mainet fork - Remix VM (Cancun)', kind: 'provider', description: 'Remix VM (London)', methods: ['sendAsync', 'init'], @@ -17,7 +17,7 @@ export class MainnetForkVMProvider extends BasicVMProvider { blockchain ) this.blockchain = blockchain - this.fork = 'shanghai' + this.fork = 'cancun' this.nodeUrl = 'https://go.getblock.io/56f8bc5187aa4ac696348f67545acf38' this.blockNumber = 'latest' } diff --git a/apps/remix-ide/src/app/providers/sepolia-vm-fork-provider.tsx b/apps/remix-ide/src/app/providers/sepolia-vm-fork-provider.tsx index b88b4a4439..26b82404b4 100644 --- a/apps/remix-ide/src/app/providers/sepolia-vm-fork-provider.tsx +++ b/apps/remix-ide/src/app/providers/sepolia-vm-fork-provider.tsx @@ -8,7 +8,7 @@ export class SepoliaForkVMProvider extends BasicVMProvider { super( { name: 'vm-sepolia-fork', - displayName: 'Sepolia fork - Remix VM (London)', + displayName: 'Sepolia fork - Remix VM (Cancun)', kind: 'provider', description: 'Remix VM (London)', methods: ['sendAsync', 'init'], @@ -17,7 +17,7 @@ export class SepoliaForkVMProvider extends BasicVMProvider { blockchain ) this.blockchain = blockchain - this.fork = 'shanghai' + this.fork = 'cancun' this.nodeUrl = 'https://go.getblock.io/ee42d0a88f314707be11dd799b122cb9' this.blockNumber = 'latest' } diff --git a/apps/remix-ide/src/app/udapp/run-tab.js b/apps/remix-ide/src/app/udapp/run-tab.js index 9d80081f0d..7d65cae8de 100644 --- a/apps/remix-ide/src/app/udapp/run-tab.js +++ b/apps/remix-ide/src/app/udapp/run-tab.js @@ -182,9 +182,9 @@ export class RunTab extends ViewPlugin { await addProvider('vm-paris', 'Remix VM (Paris)', false, true, 'paris', 'settingsVMParisMode', titleVM) await addProvider('vm-london', 'Remix VM (London)', false, true, 'london', 'settingsVMLondonMode', titleVM) await addProvider('vm-berlin', 'Remix VM (Berlin)', false, true, 'berlin', 'settingsVMBerlinMode', titleVM) - await addProvider('vm-mainnet-fork', 'Remix VM - Mainnet fork', false, true, 'merge', 'settingsVMMainnetMode', titleVM) - await addProvider('vm-sepolia-fork', 'Remix VM - Sepolia fork', false, true, 'merge', 'settingsVMSepoliaMode', titleVM) - await addProvider('vm-goerli-fork', 'Remix VM - Goerli fork', false, true, 'merge', 'settingsVMGoerliMode', titleVM) + await addProvider('vm-mainnet-fork', 'Remix VM - Mainnet fork', false, true, 'cancun', 'settingsVMMainnetMode', titleVM) + await addProvider('vm-sepolia-fork', 'Remix VM - Sepolia fork', false, true, 'cancun', 'settingsVMSepoliaMode', titleVM) + await addProvider('vm-goerli-fork', 'Remix VM - Goerli fork', false, true, 'paris', 'settingsVMGoerliMode', titleVM) await addProvider('vm-custom-fork', 'Remix VM - Custom fork', false, true, '', 'settingsVMCustomMode', titleVM) // wallet connect diff --git a/apps/remix-ide/src/blockchain/execution-context.js b/apps/remix-ide/src/blockchain/execution-context.js index fe20b2dd04..de6e1b3437 100644 --- a/apps/remix-ide/src/blockchain/execution-context.js +++ b/apps/remix-ide/src/blockchain/execution-context.js @@ -174,7 +174,7 @@ export class ExecutionContext { try { this.currentFork = execution.forkAt(await web3.eth.net.getId(), block.number) } catch (e) { - this.currentFork = 'merge' + this.currentFork = 'cancun' console.log(`unable to detect fork, defaulting to ${this.currentFork}..`) console.error(e) } diff --git a/libs/remix-debug/src/code/codeUtils.ts b/libs/remix-debug/src/code/codeUtils.ts index b73956d1f4..ad46aa7afc 100644 --- a/libs/remix-debug/src/code/codeUtils.ts +++ b/libs/remix-debug/src/code/codeUtils.ts @@ -49,7 +49,7 @@ type Opcode = { * information about the opcode. */ export function parseCode (raw) { - const common = new Common({ chain: 'mainnet', hardfork: 'merge' }) + const common = new Common({ chain: 'mainnet', hardfork: 'cancun' }) const opcodes = null // getOpcodesForHF(common).opcodes const code = [] diff --git a/libs/remix-debug/src/trace/traceManager.ts b/libs/remix-debug/src/trace/traceManager.ts index e15f8e180b..97b3d70ce9 100644 --- a/libs/remix-debug/src/trace/traceManager.ts +++ b/libs/remix-debug/src/trace/traceManager.ts @@ -40,7 +40,7 @@ export class TraceManager { const networkId = await this.web3.eth.net.getId() this.fork = execution.forkAt(networkId, tx.blockNumber) } catch (e) { - this.fork = 'merge' + this.fork = 'cancun' console.log(`unable to detect fork, defaulting to ${this.fork}..`) console.error(e) } diff --git a/libs/remix-lib/src/execution/forkAt.ts b/libs/remix-lib/src/execution/forkAt.ts index fe7b1b0804..d95f008986 100644 --- a/libs/remix-lib/src/execution/forkAt.ts +++ b/libs/remix-lib/src/execution/forkAt.ts @@ -61,7 +61,7 @@ const forks = { }, { number: 15537394, - name: 'merge' + name: 'paris' } ], 3: [ diff --git a/libs/remix-simulator/src/methods/blocks.ts b/libs/remix-simulator/src/methods/blocks.ts index 885ec47d0e..0ca0dd768f 100644 --- a/libs/remix-simulator/src/methods/blocks.ts +++ b/libs/remix-simulator/src/methods/blocks.ts @@ -90,7 +90,7 @@ export class Blocks { toHex (value) { if (!value) return '0x0' const v = bytesToHex(value) - return ((v === '0x' || v === '') ? '0x0' : ('0x' + v)) + return ((v === '0x' || v === '') ? '0x0' : v) } eth_getBlockByHash (payload, cb) { diff --git a/libs/remix-simulator/src/vm-context.ts b/libs/remix-simulator/src/vm-context.ts index 589b08df90..553a86c222 100644 --- a/libs/remix-simulator/src/vm-context.ts +++ b/libs/remix-simulator/src/vm-context.ts @@ -292,7 +292,7 @@ export class VMContext { constructor (fork?: string, nodeUrl?: string, blockNumber?: number | 'latest', stateDb?: State, blocksData?: string[]) { this.blockGasLimitDefault = 4300000 this.blockGasLimit = this.blockGasLimitDefault - this.currentFork = fork || 'merge' + this.currentFork = fork || 'cancun' this.nodeUrl = nodeUrl this.stateDb = stateDb this.blockNumber = blockNumber diff --git a/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx b/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx index c3c48217e1..6481f5ddf4 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx @@ -39,7 +39,7 @@ export const SolidityCompiler = (props: SolidityCompilerProps) => { handleHide: null }, solJsonBinData: null, - defaultVersion: 'soljson-v0.8.24+commit.e11b9ed9.js', // this default version is defined: in makeMockCompiler (for browser test) + defaultVersion: 'soljson-v0.8.25+commit.b61c2a91.js', // this default version is defined: in makeMockCompiler (for browser test) }) const [currentVersion, setCurrentVersion] = useState('') const [hideWarnings, setHideWarnings] = useState(false)