States
can have 4 or 5 elements.States
looks like the below example.States
can have 4 or 5 elements.States
looks like the below example.tranferV2
(optional)transfer
method is used for ONT and ONG withdrawals, which only takes an integer for the ONT withdrawal amount, or a decimal with 9 places for the ONG withdrawal amount (the smallest number is 0.000000001). The tranferV2
method is created to accommodate the decimals upgrade.transfer
method still functions as before, you can continue using the method and related code if you don't change existing withdrawal rules. If you want to adapt to the decimals upgrade, you need to make below changes:transferV2
to construct a transaction, and get the raw transaction in hex format. Then call the Ontology signature server method sigrawtx
to sign the transaction, and get the signed transaction in hex format. Last, call the node's sendrawtx
method to broadcast the transaction.sigtransfertxV2
to construct a transaction and sign it, and call the node's sendrawtx
method to broadcast the transaction.