@ -10,7 +10,7 @@ export class MainnetForkVMProvider extends BasicVMProvider {
name: 'vm-mainnet-fork',
displayName: 'Mainnet fork - Remix VM (Cancun)',
kind: 'provider',
description: 'Remix VM (London)',
description: 'Remix VM (Cancun)',
methods: ['sendAsync', 'init'],
version: packageJson.version
},
@ -114,7 +114,7 @@ export class ExecutionContext {
removeProvider (name) {
if (name && this.customNetWorks[name]) {
if (this.executionContext === name) this.setContext('vm-shanghai', null, null, null)
if (this.executionContext === name) this.setContext('vm-paris', null, null, null)
delete this.customNetWorks[name]
this.event.trigger('removeProvider', [name])
}
@ -123,8 +123,7 @@ module.exports = composePlugins(withNx(), withReact(), (config) => {
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
url: ['url', 'URL'],
process: 'process/browser',
'rustbn-wasm': 'rustbn-wasm'
process: 'process/browser'
})
)
@ -62,6 +62,14 @@ const forks = {
{
number: 15537394,
name: 'paris'
number: 17034870,
name: 'shanghai'
number: 19426587,
name: 'cancun'
],
3: [
@ -8,10 +8,10 @@ function convertToPrefixedHex (input) {
if (input === undefined || input === null || isHexString(input)) {
return input
if (typeof input === 'number') {
return '0x' + input.toString(16)
if ((input.constructor && input.constructor.name === 'BigNumber') || BN.isBN(input) || isBigInt(input)) {
if ((input.constructor && input.constructor.name === 'BigNumber')
|| BN.isBN(input)
|| isBigInt(input)
|| typeof input === 'number') {