Skip to content

Latest commit

 

History

History
83 lines (55 loc) · 4.13 KB

README.md

File metadata and controls

83 lines (55 loc) · 4.13 KB



NEO3 Development Guide

NEO3 Development Guide

A development guide for basic tool developers of NEO3 to facilitate the underlying construction

Table

Changes in NEO3

Wallet

  • UPDATE
    • Address Script: change the way to construct the address script with the public key

      • Ordinary Address
      NEO2: 0x21 + publicKey(compressed 33bytes) + 0xac()
      NEO3: 0x21 + publicKey(compressed 33bytes) + 0x68 + 0x747476aa
      
      • Multi-Signature Address
      NEO2: emitPush(N) + 0x21 + publicKey1(compressed 33bytes) + .... + 0x21 + publicKeym(compressed 33bytes)  + emitPush(M) + 0xae()
      NEO3: emitPush(N) + 0x21 + publicKey1(compressed 33bytes) + .... + 0x21 + publicKeym(compressed 33bytes)  + emitPush(M) + 0x68 + 0xc7c34cba
      

Transactions

  • UPDATE

    • System Fee: cancel the free discount of 10 GAS for each transaction and redefine the fee of each OpCode
    • Network Fee: redefine the calculation formula for the network fee
  • DELETE

    • Transaction Type: discard the previous 9 types of the transaction in NEO2 and use the unified transaction instead, as well as the redefinition of the transaction structure
    • Assets: discard the UTXO model for the NEO and GAS token, using the account model implemented by the native contract instead

RPC

  • UPDATE

  • DELETE

    • Discard the following commands: claimgas, dumpprivkey, getaccountstate, getapplicationlog, getassetstate, getbalance, getclaimable, getmetricblocktimestamp, getnep5balances, getnep5transfers, getnewaddress, gettxout, getunclaimed, getunclaimedgas, getunspents, getwalletheight, importprivkey, invoke, listaddress, sendfrom, sendtoaddress, sendmany, etc.

Smart Contracts

  • ADD

    • Manifest: used to describe the features of the contract and deployed with AVM files
    • native contracts: running in the native code rather than in the virtual machine, including NeoToken, GasToken and PolicyToken
    • Accessing to network resources: to be added
    • System Trigger: triggered when the node receives a new block and currently only triggers the execution of the native contract
    • Interop Service: System.Blockchain.GetTransactionFromBlock
  • UPDATE

    • Reduce the system fee for OpCode and interop services
  • DELETE

    • Interop Service:Neo.Header.GetVersion, Neo.Header.GetMerkleRoot, Neo.Header.GetNextConsensus, Neo.Transaction.GetScript, Neo.Transaction.GetWitnesses, Neo.Witness.GetVerificationScript, Neo.Contract.GetScript, Neo.Contract.IsPayable, System.Blockchain.GetHeader, System.Header.GetIndex, System.Header.GetHash, System.Header.GetPrevHash, System.Header.GetTimestamp, System.Block.GetTransactionCount, System.Block.GetTransactions, System.Block.GetTransaction, System.Transaction.GetHash

NeoVM

  • ADD

  • DELETE

    • Discard the following opcodes: APPCALL, TAILCALL, SHA1, SHA256, HASH160, HASH256, CHECKSIG, VERIFY, CHECKMULTISIG, CALL_I, CALL_E, CALL_ED, CALL_ET, CALL_EDT, etc.

Click here to see the Chinese edition of the README