omnia_disperse
Last updated
Last updated
Transfer (disperse) native or ERC-20 tokens to multiple addresses in a single RPC call.
The workflow of the omnia_disperse method is based on a two-stage process in which:
The first call is used to create and return an unsinged disperse transaction. This transaction will contain the addresses of the recipients, the amounts (values) to be sent to each recipient and the address of the token contract (ERC-20), in case of dispersing ERC-20 tokens, not native ones (Ether, Avax etc.);
The signing and starting the disperse. The caller should sign the unsigned disperse transaction returned by call in stage 1 and then make another start disperse call to launch the disperse aciton on-chain.
Parameters
DATA, ["native" || "efficient" || "tracking"]
- disperseType. The type of disperse operation wanted. REQUIRED
native - used for dispersing native tokens of the specific network. (Ether for Ethereum/Arbitrum/Optimism, BNB for Binance Smart Chain, Avax for Avalanche C-Chain etc.);
efficient - used when dispersing ERC-20 tokens in a more gas-efficient manner. This will generate less gas cost, but will be harder to track/audit for many recipients from the ;
tracking - this allows tracking every transfer directly from the but increases the gas consumed.
DATA, ["createUnsignedDisperse" || "startDisperse"]
- disperseStage. As the disperse workflow uses two stages, the createUnsignedDisperse
stage is used for creating the initial unsigned disperse transaction, while startDisperse
stage is used for sending the signed disperse transaction. REQUIRED
DATA
, 20 Bytes - spendingAddress. Wallet addres from which the funds will be dispersed to recipients. REQUIRED
DATA
, Bytes - gasLimit. Hex value used overwrite the default gas limit when creating the unsigned disperse transaction. Default value: 0xC350
(50,000).
Array of DATA
, 20 Bytes - recipients. The addresses of the wallets receiving the dispersed funds. REQUIRED
Array of DATA
, Bytes - values. The amounts (values) of dispersed funds received by each recipient. SHOULD be provided in Hex format. In case of same value for multiple recipients, see the note above. REQUIRED
DATA
, Bytes - signedTransaction. The signed disperse transaction RLP-encoded with 0x prefix. Required only in the startDisperse
stage. REQUIRED
Returns
Unsigned disperse transaction serialised into JSON and ready to be signed.
Hash of disperse transaction.