Skip to content

Commit e6aaa10

Browse files
authored
fix(chain-spec): add erc20 to deperacated class (#156)
Currently, the class hash is included in the state updates - we only add the class artifact to the class registry but for it to be canonically considered 'declared', the class hash needs to be added into the `StateUpdates` struct i.e., int the `deprecated_declared_classes` field.
1 parent df618e0 commit e6aaa10

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/chain-spec/src/dev.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ fn add_default_fee_tokens(states: &mut StateUpdatesWithClasses, genesis: &Genesi
168168
.entry(DEFAULT_LEGACY_ERC20_CLASS_HASH)
169169
.or_insert_with(|| DEFAULT_LEGACY_ERC20_CLASS.clone());
170170

171+
states.state_updates.deprecated_declared_classes.insert(DEFAULT_LEGACY_ERC20_CLASS_HASH);
172+
171173
// -- ETH
172174
add_fee_token(
173175
states,

0 commit comments

Comments
 (0)