# `FireblocksSdk.Api.ContractInteractions`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.1/lib/fireblocks_sdk/api/contract_interactions.ex#L1)

# `decode`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.1/lib/fireblocks_sdk/api/contract_interactions.ex#L160)

Decode a function call data, error, or event log from a deployed contract by blockchain native asset id and contract address.

Options:
* `:baseAssetId` (`t:String.t/0`) - Required. Base assetId e.g ETH, ETH_TEST5

* `:contractAddress` (`t:String.t/0`) - Required.

* `:dataType` - Available values: `:error`, `:log`, `:function`

* `:data` (`t:map/0`) - The data to decode, which can be a string or an object containing the data and its type.

* `:abi` (list of `t:map/0`) - The abi of the function/error/log to decode.

# `get_contract_address`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.1/lib/fireblocks_sdk/api/contract_interactions.ex#L135)

Get the contract address deployed by a transaction, identified by blockchain native asset ID
and transaction hash.

- `base_asset_id`: Base asset ID of the blockchain (e.g. `"ETH"`, `"ETH_TEST5"`)
- `tx_hash`: The transaction hash that deployed the contract

# `get_functions`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.1/lib/fireblocks_sdk/api/contract_interactions.ex#L16)

Return deployed contract's ABI by blockchain native asset id and contract address

Options:
* `:baseAssetId` (`t:String.t/0`) - Required. Base assetId e.g ETH, ETH_TEST5

* `:contractAddress` (`t:String.t/0`) - Required.

# `get_transaction_receipt`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.1/lib/fireblocks_sdk/api/contract_interactions.ex#L122)

Retrieve the transaction receipt by blockchain native asset ID and transaction hash

Options:
* `:baseAssetId` (`t:String.t/0`) - Required. Base assetId e.g ETH, ETH_TEST5

* `:txHash` (`t:String.t/0`) - Required. Transaction hash

# `read`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.1/lib/fireblocks_sdk/api/contract_interactions.ex#L35)

Return deployed contract's ABI by blockchain native asset id and contract address

Options:
* `:baseAssetId` (`t:String.t/0`) - Required. Base assetId e.g ETH, ETH_TEST5

* `:contractAddress` (`t:String.t/0`) - Required.

* `:abiFunction` (`t:map/0`)

# `write`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.1/lib/fireblocks_sdk/api/contract_interactions.ex#L92)

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

Options:
* `:baseAssetId` (`t:String.t/0`) - Required. Base assetId e.g ETH, ETH_TEST5

* `:contractAddress` (`t:String.t/0`) - Required.

* `:vaultId` (`t:String.t/0`) - Required. The vault account id this contract was deploy from

* `:abiFunction` (`t:map/0`)

* `:amount` (`t:String.t/0`) - Amount in base asset. Being used in payable functions

* `:feeLevel` - Fee level for the write function transaction. interchangeable with the 'fee' field The default value is `:medium`.

* `:fee` (`t:String.t/0`) - Max fee amount for the write function transaction. interchangeable with the 'feeLevel' field

* `:note` (`t:String.t/0`) - Custom note, not sent to the blockchain, that describes the transaction at your Fireblocks workspace

* `:useGasless` (`t:boolean/0`) - The default value is `false`.

* `:externalId` (`t:String.t/0`) - External id that can be used to identify the transaction in your system. The unique identifier of the transaction outside of Fireblocks with max length of 255 characters

---

*Consult [api-reference.md](api-reference.md) for complete listing*
