@nomicfoundation/edr 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +11 -2
- package/package.json +8 -8
- package/src/provider/config.rs +3 -0
- package/src/result.rs +3 -3
package/index.d.ts
CHANGED
|
@@ -223,6 +223,8 @@ export interface ProviderConfig {
|
|
|
223
223
|
chains: Array<ChainConfig>
|
|
224
224
|
/** The address of the coinbase */
|
|
225
225
|
coinbase: Buffer
|
|
226
|
+
/** Enables RIP-7212 */
|
|
227
|
+
enableRip7212: boolean
|
|
226
228
|
/**
|
|
227
229
|
* The configuration for forking a blockchain. If not provided, a local
|
|
228
230
|
* blockchain will be created
|
|
@@ -260,7 +262,8 @@ export const enum SuccessReason {
|
|
|
260
262
|
/** The opcode `RETURN` was called */
|
|
261
263
|
Return = 1,
|
|
262
264
|
/** The opcode `SELFDESTRUCT` was called */
|
|
263
|
-
SelfDestruct = 2
|
|
265
|
+
SelfDestruct = 2,
|
|
266
|
+
EofReturnContract = 3
|
|
264
267
|
}
|
|
265
268
|
export interface CallOutput {
|
|
266
269
|
/** Return value */
|
|
@@ -313,7 +316,13 @@ export const enum ExceptionalHalt {
|
|
|
313
316
|
/** Error on created contract that begins with EF */
|
|
314
317
|
CreateContractStartingWithEF = 12,
|
|
315
318
|
/** EIP-3860: Limit and meter initcode. Initcode size limit exceeded. */
|
|
316
|
-
CreateInitCodeSizeLimit = 13
|
|
319
|
+
CreateInitCodeSizeLimit = 13,
|
|
320
|
+
/** Aux data overflow, new aux data is larger tha u16 max size. */
|
|
321
|
+
EofAuxDataOverflow = 14,
|
|
322
|
+
/** Aud data is smaller then already present data size. */
|
|
323
|
+
EofAuxDataTooSmall = 15,
|
|
324
|
+
/** EOF Subroutine stack overflow */
|
|
325
|
+
EOFFunctionStackOverflow = 16
|
|
317
326
|
}
|
|
318
327
|
/** The result when the EVM terminates due to an exceptional halt. */
|
|
319
328
|
export interface HaltResult {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomicfoundation/edr",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
"node": ">= 18"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@nomicfoundation/edr-darwin-arm64": "0.
|
|
50
|
-
"@nomicfoundation/edr-darwin-x64": "0.
|
|
51
|
-
"@nomicfoundation/edr-linux-arm64-gnu": "0.
|
|
52
|
-
"@nomicfoundation/edr-linux-arm64-musl": "0.
|
|
53
|
-
"@nomicfoundation/edr-linux-x64-gnu": "0.
|
|
54
|
-
"@nomicfoundation/edr-linux-x64-musl": "0.
|
|
55
|
-
"@nomicfoundation/edr-win32-x64-msvc": "0.
|
|
49
|
+
"@nomicfoundation/edr-darwin-arm64": "0.5.0",
|
|
50
|
+
"@nomicfoundation/edr-darwin-x64": "0.5.0",
|
|
51
|
+
"@nomicfoundation/edr-linux-arm64-gnu": "0.5.0",
|
|
52
|
+
"@nomicfoundation/edr-linux-arm64-musl": "0.5.0",
|
|
53
|
+
"@nomicfoundation/edr-linux-x64-gnu": "0.5.0",
|
|
54
|
+
"@nomicfoundation/edr-linux-x64-musl": "0.5.0",
|
|
55
|
+
"@nomicfoundation/edr-win32-x64-msvc": "0.5.0"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"artifacts": "napi artifacts",
|
package/src/provider/config.rs
CHANGED
|
@@ -100,6 +100,8 @@ pub struct ProviderConfig {
|
|
|
100
100
|
pub chains: Vec<ChainConfig>,
|
|
101
101
|
/// The address of the coinbase
|
|
102
102
|
pub coinbase: Buffer,
|
|
103
|
+
/// Enables RIP-7212
|
|
104
|
+
pub enable_rip_7212: bool,
|
|
103
105
|
/// The configuration for forking a blockchain. If not provided, a local
|
|
104
106
|
/// blockchain will be created
|
|
105
107
|
pub fork: Option<ForkConfig>,
|
|
@@ -261,6 +263,7 @@ impl TryFrom<ProviderConfig> for edr_provider::ProviderConfig {
|
|
|
261
263
|
chain_id: value.chain_id.try_cast()?,
|
|
262
264
|
chains,
|
|
263
265
|
coinbase: value.coinbase.try_cast()?,
|
|
266
|
+
enable_rip_7212: value.enable_rip_7212,
|
|
264
267
|
fork: value.fork.map(TryInto::try_into).transpose()?,
|
|
265
268
|
genesis_accounts: HashMap::new(),
|
|
266
269
|
hardfork: value.hardfork.into(),
|
package/src/result.rs
CHANGED
|
@@ -85,7 +85,7 @@ pub struct RevertResult {
|
|
|
85
85
|
pub enum ExceptionalHalt {
|
|
86
86
|
OutOfGas,
|
|
87
87
|
OpcodeNotFound,
|
|
88
|
-
|
|
88
|
+
InvalidFEOpcode,
|
|
89
89
|
InvalidJump,
|
|
90
90
|
NotActivated,
|
|
91
91
|
StackUnderflow,
|
|
@@ -113,7 +113,7 @@ impl From<edr_evm::HaltReason> for ExceptionalHalt {
|
|
|
113
113
|
match halt {
|
|
114
114
|
edr_evm::HaltReason::OutOfGas(..) => ExceptionalHalt::OutOfGas,
|
|
115
115
|
edr_evm::HaltReason::OpcodeNotFound => ExceptionalHalt::OpcodeNotFound,
|
|
116
|
-
edr_evm::HaltReason::
|
|
116
|
+
edr_evm::HaltReason::InvalidFEOpcode => ExceptionalHalt::InvalidFEOpcode,
|
|
117
117
|
edr_evm::HaltReason::InvalidJump => ExceptionalHalt::InvalidJump,
|
|
118
118
|
edr_evm::HaltReason::NotActivated => ExceptionalHalt::NotActivated,
|
|
119
119
|
edr_evm::HaltReason::StackUnderflow => ExceptionalHalt::StackUnderflow,
|
|
@@ -152,7 +152,7 @@ impl From<ExceptionalHalt> for edr_evm::HaltReason {
|
|
|
152
152
|
match value {
|
|
153
153
|
ExceptionalHalt::OutOfGas => Self::OutOfGas(edr_evm::OutOfGasError::Basic),
|
|
154
154
|
ExceptionalHalt::OpcodeNotFound => Self::OpcodeNotFound,
|
|
155
|
-
ExceptionalHalt::
|
|
155
|
+
ExceptionalHalt::InvalidFEOpcode => Self::InvalidFEOpcode,
|
|
156
156
|
ExceptionalHalt::InvalidJump => Self::InvalidJump,
|
|
157
157
|
ExceptionalHalt::NotActivated => Self::NotActivated,
|
|
158
158
|
ExceptionalHalt::StackUnderflow => Self::StackUnderflow,
|