interop: rename Neo.Native.Call to System.Contract.CallNative

This commit is contained in:
Roman Khimov 2020-12-13 19:10:59 +03:00
parent e97cd9c032
commit 1e9253f1f0
7 changed files with 6 additions and 6 deletions

Binary file not shown.

View file

@ -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)

View file

@ -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,
}

View file

@ -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

View file

@ -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)

View file

@ -57,7 +57,7 @@ type rpcTestCase struct {
}
const testContractHash = "743ed26f78e29ecd595535b74a943b1f9ccbc444"
const deploymentTxHash = "8ec2d061ecb22115f1e25a8bf79e536134d0cd7f0ac31b89cc40960a21dc8171"
const deploymentTxHash = "7e60be17078d05135c359805beece3ea4c5140f55adec8170179713f2124eb14"
const genesisBlockHash = "0542f4350c6e236d0509bcd98188b0034bfbecc1a0c7fcdb8e4295310d468b70"
const verifyContractHash = "a2eb22340979804cb10cc1add0b8822c201f4d8a"

Binary file not shown.