There are several ways to send a transaction on the OMG Network. We recommend using the first method but you may want to choose another approach for your specific use case.
The most "granular" implementation of transfer includes creating, typing, signing, and submitting the transaction. Such an approach will have the following structure of the code:
This method demonstrates a transfer made in ETH. If you want to make an ERC20 transfer, replace erc20Transfer with the corresponding ethTransfer values.
watcherUrl - the Watcher Info URL for defined (personal or from OMG Network).
plasmaContractAddress - CONTRACT_ADDRESS_PLASMA_FRAMEWORK for defined .
Transactions are composed of inputs and outputs. An input is simply a pointer to the output of another transaction. An output is a transaction that hasn't been spent yet (also known as UTXO). Each transaction should be signed by the owner of funds (UTXOs), have a specific format, and encoded with according to the following rules:
Transactions are signed using the method. The EIP-712 typed data structure is defined as follows:
Note, the Childchain server collects fees for sending a transaction. The fee can be paid in a variety of supported tokens by the Network. For more details on how the fees are defined, please refer to .