Call a write function on a deployed contract
POST
{{baseUrl}}/contract_interactions/base_asset_id/:assetId/contract_address/:contractAddress/functions/write
Call a write function on a deployed contract by blockchain native asset id and contract address. This creates an onchain transaction, thus it is an async operation. It returns a transaction id that can be polled for status check
Body
PARAM
Key |
Datatype |
Required |
Description |
HEADERS
Key |
Datatype |
Required |
Description |
Idempotency-Key
|
string |
|
A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.
|
Content-Type
|
string |
|
|
Accept
|
string |
|
|
RESPONSES
status
curl -X POST 'https://api.fireblocks.io/v1/contract_interactions/base_asset_id/:assetId/contract_address/:contractAddress/functions/write' -H 'Idempotency-Key: <string>' -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"vaultAccountId":"\u003cstring\u003e","abiFunction":{"stateMutability":"nonpayable","type":"function","inputs":[{"name":"\u003cstring\u003e","type":"\u003cstring\u003e","description":"\u003cstring\u003e","internalType":"\u003cstring\u003e","components":[{"name":"\u003cstring\u003e","type":"\u003cstring\u003e","description":"\u003cstring\u003e","internalType":"\u003cstring\u003e","components":[{"value":"\u003cCircular reference to #/components/schemas/Parameter detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/Parameter detected\u003e"}]},{"name":"\u003cstring\u003e","type":"\u003cstring\u003e","description":"\u003cstring\u003e","internalType":"\u003cstring\u003e","components":[{"value":"\u003cCircular reference to #/components/schemas/Parameter detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/Parameter detected\u003e"}]}],"value":"\u003cstring\u003e","functionValue":{"inputs":[{"value":"\u003cCircular reference to #/components/schemas/ParameterWithValue detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/ParameterWithValue detected\u003e"}],"name":"\u003cstring\u003e"}},{"name":"\u003cstring\u003e","type":"\u003cstring\u003e","description":"\u003cstring\u003e","internalType":"\u003cstring\u003e","components":[{"name":"\u003cstring\u003e","type":"\u003cstring\u003e","description":"\u003cstring\u003e","internalType":"\u003cstring\u003e","components":[{"value":"\u003cCircular reference to #/components/schemas/Parameter detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/Parameter detected\u003e"}]},{"name":"\u003cstring\u003e","type":"\u003cstring\u003e","description":"\u003cstring\u003e","internalType":"\u003cstring\u003e","components":[{"value":"\u003cCircular reference to #/components/schemas/Parameter detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/Parameter detected\u003e"}]}],"value":"\u003cstring\u003e","functionValue":{"inputs":[{"value":"\u003cCircular reference to #/components/schemas/ParameterWithValue detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/ParameterWithValue detected\u003e"}],"name":"\u003cstring\u003e"}}],"outputs":[{"name":"\u003cstring\u003e","type":"\u003cstring\u003e","description":"\u003cstring\u003e","internalType":"\u003cstring\u003e","components":[{"value":"\u003cCircular reference to #/components/schemas/Parameter detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/Parameter detected\u003e"}]},{"name":"\u003cstring\u003e","type":"\u003cstring\u003e","description":"\u003cstring\u003e","internalType":"\u003cstring\u003e","components":[{"value":"\u003cCircular reference to #/components/schemas/Parameter detected\u003e"},{"value":"\u003cCircular reference to #/components/schemas/Parameter detected\u003e"}]}],"name":"\u003cstring\u003e","description":"\u003cstring\u003e"},"amount":"\u003cstring\u003e","feeLevel":"HIGH","fee":"\u003cstring\u003e","note":"\u003cstring\u003e"}'