Skip to content
This repository has been archived by the owner on Aug 31, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Lawliet-Chan committed Jan 23, 2024
1 parent d739fbe commit 8656331
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cairoVM/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func SetGenesis(state *core.State, cairoFiles map[string]string) error {
declaredClasses := make(map[felt.Felt]core.Class)
deployedContracts := make(map[felt.Felt]*felt.Felt)
declaredV1Classes := make(map[felt.Felt]*felt.Felt)
nonces := make(map[felt.Felt]*felt.Felt)
var (
class core.Class
classHash *felt.Felt
Expand All @@ -43,10 +44,12 @@ func SetGenesis(state *core.State, cairoFiles map[string]string) error {
compiledClassHash = hash.CompiledClassHash(*casmClass)

declaredV1Classes[*classHash] = compiledClassHash

nonces[*addrFelt] = &felt.Zero
addr++
}

newRoot, err := new(felt.Felt).SetString("0x42e2546d91d85d60f1ee5ac114884831953c61f0b141a101ceae8efba9eda3a")
newRoot, err := new(felt.Felt).SetString("0x56f007b0f69daa75af325ecfa0d717bfd4d72bfa102151912fe4a15b9dfd30f")
if err != nil {
return err
}
Expand All @@ -56,7 +59,7 @@ func SetGenesis(state *core.State, cairoFiles map[string]string) error {
NewRoot: newRoot,
OldRoot: &felt.Zero,
StateDiff: &core.StateDiff{
Nonces: map[felt.Felt]*felt.Felt{felt.Zero: &felt.Zero},
Nonces: nonces,
DeployedContracts: deployedContracts,
DeclaredV1Classes: declaredV1Classes,
},
Expand Down

0 comments on commit 8656331

Please sign in to comment.