System Fees
The system fee is calculated by opcodes to be executed by the Neo virtual machine. The 10 GAS free system fee will be cancled in NEO3. The total fee is subject to the quantity and type of instructions in the contract script. The calculation formula is as follows:
where OpcodeSet is opcode set, OpcodePriceiis the cost of opcode i, niis the execution times of instruction i in the contract script.
The fee of each interop service and instruction is shown in the table below.
Fees for interop service
Interop Service | Fee (GAS) |
---|---|
System.Binary.Serialize | 0.00100000 |
System.Binary.Deserialize | 0.00500000 |
System.Binary.Base64Encode | 0.00100000 |
System.Binary.Base64Decode | 0.00100000 |
System.Binary.Base58Encode | 0.00100000 |
System.Binary.Base58Decode | 0.00100000 |
System.Blockchain.GetHeight | 0.00000400 |
System.Blockchain.GetBlock | 0.02500000 |
System.Blockchain.GetTransaction | 0.01000000 |
System.Blockchain.GetTransactionHeight | 0.01000000 |
System.Blockchain.GetTransactionFromBlock | 0.01000000 |
System.Blockchain.GetContract | 0.01000000 |
System.Callback.Create | 0.00000400 |
System.Callback.CreateFromMethod | 0.01000000 |
System.Callback.CreateFromSyscall | 0.00000400 |
System.Callback.Invoke | 0.01000000 |
System.Contract.Create | 0 |
System.Contract.Update | 0 |
System.Contract.Destroy | 0.01000000 |
System.Contract.Call | 0.01000000 |
System.Contract.CallEx | 0.01000000 |
System.Contract.IsStandard | 0.00030000 |
System.Contract.GetCallFlags | 0.00030000 |
System.Enumerator.Create | 0.00000400 |
System.Enumerator.Next | 0.01000000 |
System.Enumerator.Value | 0.00000400 |
System.Enumerator.Concat | 0.00000400 |
System.Iterator.Create | 0.00000400 |
System.Iterator.Key | 0.00000400 |
System.Iterator.Keys | 0.00000400 |
System.Iterator.Values | 0.00000400 |
System.Iterator.Concat | 0.00000400 |
System.Json.Serialize | 0.00100000 |
System.Json.Deserialize | 0.00500000 |
System.Runtime.Platform | 0.00000250 |
System.Runtime.GetTrigger | 0.00000250 |
System.Runtime.GetTime | 0.00000250 |
System.Runtime.GetScriptContainer | 0.00000250 |
System.Runtime.GetExecutingScriptHash | 0.00000400 |
System.Runtime.GetCallingScriptHash | 0.00000400 |
System.Runtime.GetEntryScriptHash | 0.00000400 |
System.Runtime.CheckWitness | 0.00030000 |
System.Runtime.GetInvocationCounter | 0.00000400 |
System.Runtime.Log | 0.01000000 |
System.Runtime.Notify | 0.01000000 |
System.Runtime.GetNotifications | 0.00010000 |
System.Runtime.GasLeft | 0.00000400 |
System.Storage.GetContext | 0.00000400 |
System.Storage.GetReadOnlyContext | 0.00000400 |
System.StorageContext.AsReadOnly | 0.00000400 |
System.Storage.Get | 0.01000000 |
System.Storage.Find | 0.01000000 |
System.Storage.Put | 0 |
System.Storage.PutEx | 0 |
System.Storage.Delete | 1 * StoragePrice |
Neo.Native.Deploy | 0 |
Neo.Native.Call | 0 |
Neo.Crypto.RIPEMD160 | 0.01000000 |
Neo.Crypto.SHA256 | 0.01000000 |
Neo.Crypto.VerifyWithECDsaSecp256r1 | 0.01000000 |
Neo.Crypto.VerifyWithECDsaSecp256k1 | 0.01000000 |
Neo.Crypto.CheckMultisigWithECDsaSecp256r1 | 0 |
Neo.Crypto.CheckMultisigWithECDsaSecp256k1 | 0 |
Interop Service | Method Name | Fee (GAS) |
---|---|---|
Neo.Native.Tokens.NEO | name | 0 |
symbol | 0 | |
decimals | 0 | |
totalSupply | 0.01000000 | |
balanceOf | 0.01000000 | |
transfer | 0.08000000 | |
setGasPerBlock | 0.05000000 | |
getGasPerBlock | 0.05000000 | |
unclaimedGas | 0.03000000 | |
registerCandidate | 0.05000000 | |
unregisterCandidate | 0.05000000 | |
vote | 0.08000000 | |
GetCandidates | 1.00000000 | |
getCommittee | 1.00000000 | |
getNextBlockValidators | 1.00000000 |
Interop Service | Method Name | Fee (GAS) |
---|---|---|
Neo.Native.Tokens.GAS | name | 0 |
symbol | 0 | |
decimals | 0 | |
totalSupply | 0.01000000 | |
balanceOf | 0.01000000 | |
transfer | 0.08000000 |
Interop Service | Method Name | Fee (GAS) |
---|---|---|
Neo.Native.Policy | getMaxTransactionsPerBlock | 0.01000000 |
getMaxBlockSize | 0.01000000 | |
GetMaxBlockSystemFee | 0.01000000 | |
GetFeePerByte | 0.01000000 | |
IsBlocked | 0.01000000 | |
SetMaxBlockSize | 0.03000000 | |
SetMaxTransactionsPerBlock | 0.03000000 | |
SetMaxBlockSystemFee | 0.03000000 | |
SetFeePerByte | 0.03000000 | |
BlockAccount | 0.03000000 | |
UnblockAccount | 0.03000000 |
Interop Service | Method Name | Fee (GAS) |
---|---|---|
Neo.Native.Oracle | finish | 0 |
request | 0.50000000 | |
verify | 0.01000000 |
For the description of API in the table above, refer to NEO Namespace .
Fees for Instructions
Instruction | Fee (GAS) |
---|---|
PUSHINT8 | 0.00000030 |
PUSHINT16 | 0.00000030 |
PUSHINT32 | 0.00000030 |
PUSHINT64 | 0.00000030 |
PUSHINT128 | 0.00000120 |
PUSHINT256 | 0.00000120 |
PUSHA | 0.00000120 |
PUSHNULL | 0.00000030 |
PUSHDATA1 | 0.00000180 |
PUSHDATA2 | 0.00013000 |
PUSHDATA4 | 0.00110000 |
PUSHM1 | 0.00000030 |
PUSH0~PUSH16 | 0.00000030 |
NOP | 0.00000030 |
JMP | 0.00000070 |
JMP_L | 0.00000070 |
JMPIF | 0.00000070 |
JMPIF_L | 0.00000070 |
JMPIFNOT | 0.00000070 |
JMPIFNOT_L | 0.00000070 |
JMPEQ | 0.00000070 |
JMPEQ_L | 0.00000070 |
JMPNE | 0.00000070 |
JMPNE_L | 0.00000070 |
JMPGT | 0.00000070 |
JMPGT_L | 0.00000070 |
JMPGE | 0.00000070 |
JMPGE_L | 0.00000070 |
JMPLT | 0.00000070 |
JMPLT_L | 0.00000070 |
JMPLE | 0.00000070 |
JMPLE_L | 0.00000070 |
CALL | 0.00022000 |
CALL_L | 0.00022000 |
CALLA | 0.00022000 |
ABORT | 0.00000030 |
ASSERT | 0.00000030 |
THROW | 0.00000030 |
RET | 0 |
SYSCALL | 0 |
DEPTH | 0.00000060 |
DROP | 0.00000060 |
NIP | 0.00000060 |
XDROP | 0.00000400 |
CLEAR | 0.00000400 |
DUP | 0.00000060 |
OVER | 0.00000060 |
PICK | 0.00000060 |
TUCK | 0.00000060 |
SWAP | 0.00000060 |
ROT | 0.00000060 |
ROLL | 0.00000400 |
REVERSE3 | 0.00000060 |
REVERSE4 | 0.00000060 |
REVERSEN | 0.00000400 |
INITSSLOT | 0.00000400 |
INITSLOT | 0.00001600 |
LDSFLD0~LDSFLD6 | 0.00000060 |
LDSFLD | 0.00000060 |
STSFLD0~STSFLD6 | 0.0000006 |
STSFLD | 0.0000006 |
LDLOC0~LDLOC6 | 0.00000060 |
LDLOC | 0.00000060 |
STLOC0~STLOC6 | 0.00000060 |
STLOC | 0.00000060 |
LDARG0~LDARG6 | 0.00000060 |
LDARG | 0.00000060 |
STARG0~STARG6 | 0.00000060 |
STARG | 0.00000060 |
NEWBUFFER | 0.00080000 |
MEMCPY | 0.00080000 |
CAT | 0.00080000 |
SUBSTR | 0.00080000 |
LEFT | 0.00080000 |
RIGHT | 0.00080000 |
INVERT | 0.00000100 |
AND | 0.00000200 |
OR | 0.00000200 |
XOR | 0.00000200 |
EQUAL | 0.00001000 |
NOTEQUAL | 0.00001000 |
SIGN | 0.00000100 |
ABS | 0.00000100 |
NEGATE | 0.00000100 |
INC | 0.00000100 |
DEC | 0.00000100 |
ADD | 0.00000200 |
SUB | 0.00000200 |
MUL | 0.00000300 |
DIV | 0.00000300 |
MOD | 0.00000300 |
SHL | 0.00000300 |
SHR | 0.00000300 |
NOT | 0.00000100 |
BOOLAND | 0.00000200 |
BOOLOR | 0.00000200 |
NZ | 0.00000100 |
NUMEQUAL | 0.00000200 |
NUMNOTEQUAL | 0.00000200 |
LT | 0.00000200 |
LE | 0.00000200 |
GT | 0.00000200 |
GE | 0.00000200 |
MIN | 0.00000200 |
MAX | 0.00000200 |
WITHIN | 0.00000200 |
PACK | 0.00015000 |
UNPACK | 0.00015000 |
NEWARRAY0 | 0.00000400 |
NEWARRAY | 0.00015000 |
NEWARRAY_T | 0.00015000 |
NEWSTRUCT0 | 0.00000400 |
NEWSTRUCT | 0.00015000 |
NEWMAP | 0.00000200 |
SIZE | 0.00000150 |
HASKEY | 0.00270000 |
KEYS | 0.00000500 |
VALUES | 0.00270000 |
PICKITEM | 0.00270000 |
APPEND | 0.00270000 |
SETITEM | 0.00270000 |
REVERSEITEMS | 0.00270000 |
REMOVE | 0.00000500 |
CLEARITEMS | 0.00000400 |
ISNULL | 0.00000060 |
ISTYPE | 0.00000060 |
CONVERT | 0.00080000 |