From 004023920ee1b1360437d48bb0b9a0d95617bcd4 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Sun, 5 Apr 2020 18:14:54 +0300 Subject: [PATCH] rpc: use Notify with varargs in the test contract --- pkg/rpc/server/testdata/test_contract.avm | Bin 1079 -> 1108 bytes pkg/rpc/server/testdata/test_contract.go | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/rpc/server/testdata/test_contract.avm b/pkg/rpc/server/testdata/test_contract.avm index 7d3417c3cdf0b08f0be10a59f1065ed8a4210fd1..b9f78fdc62e883a27453f59dc2e50c9160e16e2d 100755 GIT binary patch delta 438 zcmY+Aze~eF6vyv!MWUjm&|e^Gt-okNi{Kw1ZZ1j^6&$a*6mz{Mwao?E4h{}+4L9ka zyMu1J7E&jj#9jOoI=gtWSaExN-}`>P@4YAWT`j`x=Q;(w0o8hg8Pj#V7B;IL#A+MPz#Wg~=sv>VF|`IA-5uwz;WwSe4#)9k+GZW^8& zeyzf?Sc1z_9LPzkN7N8QC6hVq4gM_Di0I+Z;<-GRRm^-;d{v(2v};x?Ag@r=(Y)xx z6x<1|Ez(z;Nt({9Wfe*w|qa|d*AnwcuW-F`sT25GSEJD}- z=8^)XXg3ODyvc?re_5S{4t+jc<4e!WqZsEO#LZ4t|N+?{5OZ^5Cq?FN;47<8=z zx5Ca*nrUzbmRSiduq{~3cn0_C{Ldsm&k0a&yHRLDWb%7Ww;SVU$VO<6y$Smo`-00F z5E>C)#5Y9?CVzt2D_miDrIh`lbnY2~GB~)#CAP23vooa(SJ=I>#NL(TS$W*#UW5Oh hG1w4lnQ={@fT}IOCF;8q^_|Q}@g4{NrEF1M{RT41j(h+B diff --git a/pkg/rpc/server/testdata/test_contract.go b/pkg/rpc/server/testdata/test_contract.go index a8da7cf8a..9eb87fe4e 100644 --- a/pkg/rpc/server/testdata/test_contract.go +++ b/pkg/rpc/server/testdata/test_contract.go @@ -12,7 +12,7 @@ const ( ) func Main(operation string, args []interface{}) interface{} { - runtime.Notify([]interface{}{"contract call", operation, args}) + runtime.Notify("contract call", operation, args) switch operation { case "Put": ctx := storage.GetContext() @@ -34,7 +34,7 @@ func Main(operation string, args []interface{}) interface{} { return false } amount := storage.Get(ctx, addr).(int) - runtime.Notify([]interface{}{"balanceOf", addr, amount}) + runtime.Notify("balanceOf", addr, amount) return amount case "transfer": ctx := storage.GetContext() @@ -66,7 +66,7 @@ func Main(operation string, args []interface{}) interface{} { toBalance += amount storage.Put(ctx, to, toBalance) - runtime.Notify([]interface{}{"transfer", from, to, amount}) + runtime.Notify("transfer", from, to, amount) return true case "init": @@ -74,7 +74,7 @@ func Main(operation string, args []interface{}) interface{} { h := engine.GetExecutingScriptHash() amount := totalSupply storage.Put(ctx, h, amount) - runtime.Notify([]interface{}{"transfer", []byte{}, h, amount}) + runtime.Notify("transfer", []byte{}, h, amount) return true default: panic("invalid operation")