diff --git a/cli/testdata/chain50x2.acc b/cli/testdata/chain50x2.acc index 43ee86318..a9e5a8104 100644 Binary files a/cli/testdata/chain50x2.acc and b/cli/testdata/chain50x2.acc differ diff --git a/pkg/core/interop/context.go b/pkg/core/interop/context.go index 2e26d349f..a489dbf69 100644 --- a/pkg/core/interop/context.go +++ b/pkg/core/interop/context.go @@ -116,7 +116,7 @@ func NewContractMD(name string) *ContractMD { w := io.NewBufBinWriter() emit.String(w.BinWriter, c.Name) - emit.Syscall(w.BinWriter, interopnames.NeoNativeCall) + emit.Syscall(w.BinWriter, interopnames.SystemContractCallNative) c.Script = w.Bytes() c.Hash = hash.Hash160(c.Script) diff --git a/pkg/core/interop/interopnames/names.go b/pkg/core/interop/interopnames/names.go index ae1167e2f..a96b8dee1 100644 --- a/pkg/core/interop/interopnames/names.go +++ b/pkg/core/interop/interopnames/names.go @@ -21,6 +21,7 @@ const ( SystemCallbackInvoke = "System.Callback.Invoke" SystemContractCall = "System.Contract.Call" SystemContractCallEx = "System.Contract.CallEx" + SystemContractCallNative = "System.Contract.CallNative" SystemContractCreateStandardAccount = "System.Contract.CreateStandardAccount" SystemContractIsStandard = "System.Contract.IsStandard" SystemContractGetCallFlags = "System.Contract.GetCallFlags" @@ -64,7 +65,6 @@ const ( NeoCryptoCheckMultisigWithECDsaSecp256k1 = "Neo.Crypto.CheckMultisigWithECDsaSecp256k1" NeoCryptoSHA256 = "Neo.Crypto.SHA256" NeoCryptoRIPEMD160 = "Neo.Crypto.RIPEMD160" - NeoNativeCall = "Neo.Native.Call" ) var names = []string{ @@ -87,6 +87,7 @@ var names = []string{ SystemCallbackInvoke, SystemContractCall, SystemContractCallEx, + SystemContractCallNative, SystemContractCreateStandardAccount, SystemContractIsStandard, SystemContractGetCallFlags, @@ -130,5 +131,4 @@ var names = []string{ NeoCryptoCheckMultisigWithECDsaSecp256k1, NeoCryptoSHA256, NeoCryptoRIPEMD160, - NeoNativeCall, } diff --git a/pkg/core/interops.go b/pkg/core/interops.go index aa69c2769..8558e4797 100644 --- a/pkg/core/interops.go +++ b/pkg/core/interops.go @@ -59,6 +59,7 @@ var systemInterops = []interop.Function{ RequiredFlags: smartcontract.AllowCall, ParamCount: 3, DisallowCallback: true}, {Name: interopnames.SystemContractCallEx, Func: contract.CallEx, Price: 1000000, RequiredFlags: smartcontract.AllowCall, ParamCount: 4, DisallowCallback: true}, + {Name: interopnames.SystemContractCallNative, Func: native.Call, Price: 0, ParamCount: 1, DisallowCallback: true}, {Name: interopnames.SystemContractCreateStandardAccount, Func: contractCreateStandardAccount, Price: 10000, ParamCount: 1, DisallowCallback: true}, {Name: interopnames.SystemContractIsStandard, Func: contractIsStandard, Price: 30000, RequiredFlags: smartcontract.ReadStates, ParamCount: 1}, {Name: interopnames.SystemContractGetCallFlags, Func: contractGetCallFlags, Price: 30000, DisallowCallback: true}, @@ -118,7 +119,6 @@ var neoInterops = []interop.Function{ {Name: interopnames.NeoCryptoCheckMultisigWithECDsaSecp256k1, Func: crypto.ECDSASecp256k1CheckMultisig, Price: 0, ParamCount: 3}, {Name: interopnames.NeoCryptoSHA256, Func: crypto.Sha256, Price: 1000000, ParamCount: 1}, {Name: interopnames.NeoCryptoRIPEMD160, Func: crypto.RipeMD160, Price: 1000000, ParamCount: 1}, - {Name: interopnames.NeoNativeCall, Func: native.Call, Price: 0, RequiredFlags: smartcontract.AllowCall, ParamCount: 1, DisallowCallback: true}, } // initIDinInteropsSlice initializes IDs from names in one given diff --git a/pkg/core/native/oracle.go b/pkg/core/native/oracle.go index b97beb0bc..162fa9ca9 100644 --- a/pkg/core/native/oracle.go +++ b/pkg/core/native/oracle.go @@ -59,7 +59,7 @@ var ( func init() { w := io.NewBufBinWriter() emit.String(w.BinWriter, oracleName) - emit.Syscall(w.BinWriter, interopnames.NeoNativeCall) + emit.Syscall(w.BinWriter, interopnames.SystemContractCallNative) oracleInvokeScript = w.Bytes() h := hash.Hash160(oracleInvokeScript) diff --git a/pkg/rpc/server/server_test.go b/pkg/rpc/server/server_test.go index c01db8a29..3d812813f 100644 --- a/pkg/rpc/server/server_test.go +++ b/pkg/rpc/server/server_test.go @@ -57,7 +57,7 @@ type rpcTestCase struct { } const testContractHash = "743ed26f78e29ecd595535b74a943b1f9ccbc444" -const deploymentTxHash = "8ec2d061ecb22115f1e25a8bf79e536134d0cd7f0ac31b89cc40960a21dc8171" +const deploymentTxHash = "7e60be17078d05135c359805beece3ea4c5140f55adec8170179713f2124eb14" const genesisBlockHash = "0542f4350c6e236d0509bcd98188b0034bfbecc1a0c7fcdb8e4295310d468b70" const verifyContractHash = "a2eb22340979804cb10cc1add0b8822c201f4d8a" diff --git a/pkg/rpc/server/testdata/testblocks.acc b/pkg/rpc/server/testdata/testblocks.acc index a3fc08b76..f7b74765d 100644 Binary files a/pkg/rpc/server/testdata/testblocks.acc and b/pkg/rpc/server/testdata/testblocks.acc differ