Custom contract call

You can call any contract on-chain automatically from a Flow, and pass it the wallet addresses of the profiles entering the Airdrop block.

Setup

To call a contract on-chain as part of a Flow, you use the Airdrop block, in which you select the option "Custom".

Selection of the blockchain on which the contract to call is deployed.

To configure the function call, you then:

  1. Select the blockchain on which your contract is deployed

  2. Paste your contract address in the corresponding field, and click out of the field to trigger a search of the available functions

  3. If your contract is verified on Etherscan, the list of available functions should be listed automatically. If not, you will need to copy paste the list of functions in the ABI format.

  4. The write functions of the contract, to which one or more wallet address can be passed, will now be available in a dropdown. Select the function to call, e.g. mintTo(address)

  5. The interface will offer fields for you to specify the values to pass to the various parameters of the contract call. Address fields can be mapped to the addresses which are received by the Airdrop block as part of the Flow

  6. Save the configuration when you are done configuring the values to pass to the function parameters.

You can test this on testnets, as illustrated in the screenshot above.

Last updated