compiler: reverse args in AppCall
Invoked contract is expecting first argument to be on top of the stack. Change test to use non-commutative operation to catch this behaviour.
This commit is contained in:
parent
52d8d58593
commit
895a8d9ebc
2 changed files with 15 additions and 13 deletions
|
@ -786,6 +786,9 @@ func (c *codegen) convertBuiltin(expr *ast.CallExpr) {
|
|||
case "VerifySignature":
|
||||
emit.Opcode(c.prog.BinWriter, opcode.VERIFY)
|
||||
case "AppCall":
|
||||
numArgs := len(expr.Args) - 1
|
||||
c.emitReverse(numArgs)
|
||||
|
||||
emit.Opcode(c.prog.BinWriter, opcode.APPCALL)
|
||||
buf := c.getByteArray(expr.Args[0])
|
||||
if len(buf) != 20 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue