Skip to content

Commit

Permalink
programs/api: remove inefectual code
Browse files Browse the repository at this point in the history
  • Loading branch information
tsahee committed Feb 13, 2024
1 parent f666f3b commit 45e602b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions arbos/programs/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,20 +304,17 @@ func newApiClosures(
endowment := common.BytesToHash(input[8:40]).Big()
var code []byte
var salt *big.Int
var opcode vm.OpCode
switch req {
case Create1:
opcode = vm.CREATE
code = input[40:]
case Create2:
opcode = vm.CREATE2
if len(input) < 72 {
log.Crit("bad API call", "request", req, "len", len(input))
}
salt = common.BytesToHash(input[40:72]).Big()
code = input[72:]
default:
log.Crit("unsupported create opcode", "opcode", opcode)
log.Crit("unsupported create opcode", "request", req)
}

address, retVal, cost, err := create(code, endowment, salt, gas)
Expand Down

0 comments on commit 45e602b

Please sign in to comment.