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

Commit

Permalink
add genesis cairo
Browse files Browse the repository at this point in the history
  • Loading branch information
Lawliet-Chan committed Jan 20, 2024
1 parent c4ab7a1 commit a75dbf1
Show file tree
Hide file tree
Showing 2 changed files with 12,260 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cairoVM/declare.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ func SetGenesis(state *core.State, dir string) error {
}
classes[*classHash] = class
}
return state.Update(0, nil, classes)
return state.Update(0, &core.StateUpdate{
BlockHash: &felt.Zero,
NewRoot: &felt.Zero,
OldRoot: &felt.Zero,
StateDiff: core.EmptyStateDiff(),
}, classes)
}

func NewDeclare(sierraFileName, casmFileName string) (*core.DeclareTransaction, core.Class, error) {
Expand Down
Loading

0 comments on commit a75dbf1

Please sign in to comment.