Skip to content

Commit

Permalink
Fix stylus prefix handling
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuacolvin0 committed Aug 14, 2023
1 parent 90cd44f commit 5185e75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/state/statedb_arbitrum.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var (
stylusEOFMagicSuffix = byte(0xF0)
stylusEOFVersion = byte(0x00)

StylusPrefix = []byte{stylusEOFMagic, stylusEOFMagicSuffix, stylusEOFVersion, stylusEOFSectionHeader}
StylusPrefix = []byte{stylusEOFMagic, stylusEOFMagicSuffix, stylusEOFVersion}
)

// IsStylusProgram checks if a specified bytecode is a user-submitted WASM program.
Expand All @@ -59,7 +59,7 @@ func StripStylusPrefix(b []byte) ([]byte, error) {
if !IsStylusProgram(b) {
return nil, errors.New("specified bytecode is not a Stylus program")
}
return b[4:], nil
return b[3:], nil
}

func (s *StateDB) GetCompiledWasmCode(addr common.Address, version uint32) []byte {
Expand Down

0 comments on commit 5185e75

Please sign in to comment.