🧑💻How to Encode Calls in Purchase Mode
Brydge's contracts need to know the following:
The contract address(es) that will be called and their ABI
The function name(s) that will be called and their parameters
Quantity of native tokens each contract will receive (if any)
The calls
prop in BrydgeWidget
expects to receive an array structured like this:
For many use cases, the _to
address will need to be that of the actively connected wallet, however, if you are integrating via the iFrame component you may not have you own provider with which to dynamically fetch a user's address. Don't worry! Instead, you can fill the _to
field with the special placeholder address: 0x0123456789abcdeffedcba9876543210deadbeef
and we will swap this out for the connected wallet on our end. Please note that no placeholder address other than the above can be used for this purpose.
You'll find below an example of how to set up calls
. If you prefer something more tangible, check out our Zora Marketplace integration example.
This calls array can be passed directly into the calls
prop in the BrydgeWidget
component.
If you run into issues at any point, reach out to our team on Discord. We're always here to help!
Last updated