@@ -25,7 +25,7 @@ const profile = {
25
25
name : 'blockchain' ,
26
26
displayName : 'Blockchain' ,
27
27
description : 'Blockchain - Logic' ,
28
- methods : [ 'getCode' , 'getTransactionReceipt' , 'addProvider' , 'removeProvider' , 'getCurrentFork' , 'getAccounts' , 'web3VM' , 'web3' , 'getProvider' , 'getCurrentProvider' , 'getCurrentNetworkStatus' , 'getAllProviders' , 'getPinnedProviders' , 'changeExecutionContext' ] ,
28
+ methods : [ 'getCode' , 'getTransactionReceipt' , 'addProvider' , 'removeProvider' , 'getCurrentFork' , 'getAccounts' , 'web3VM' , 'web3' , 'getProvider' , 'getCurrentProvider' , 'getCurrentNetworkStatus' , 'getAllProviders' , 'getPinnedProviders' , 'changeExecutionContext' , 'getProviderObject' ] ,
29
29
version : packageJson . version
30
30
}
31
31
@@ -569,6 +569,10 @@ export class Blockchain extends Plugin {
569
569
return allProviders [ name ]
570
570
}
571
571
572
+ getProviderObject ( ) {
573
+ return this . executionContext . getProviderObject ( )
574
+ }
575
+
572
576
getInjectedWeb3Address ( ) {
573
577
return this . executionContext . getSelectedAddress ( )
574
578
}
@@ -1020,10 +1024,7 @@ export class Blockchain extends Plugin {
1020
1024
let stateDetails = await this . call ( 'fileManager' , 'readFile' , provider . config . statePath )
1021
1025
stateDetails = JSON . parse ( stateDetails )
1022
1026
state = JSON . parse ( state )
1023
- state [ 'stateName' ] = stateDetails . stateName
1024
- state [ 'forkName' ] = stateDetails . forkName
1025
- state [ 'savingTimestamp' ] = stateDetails . savingTimestamp
1026
- state = JSON . stringify ( state , null , 2 )
1027
+ state = JSON . stringify ( { ...stateDetails , ...( state as any ) } , null , 2 )
1027
1028
}
1028
1029
this . call ( 'fileManager' , 'writeFile' , provider . config . statePath , state )
1029
1030
} else if ( isBasicVMState && ! isForkedRpcState && ! isForkedRpcState ) {
0 commit comments