Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix abi issue #191

Merged
merged 3 commits into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions fireblocks_sdk/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
WriteCallFunction, \
CreateCollectionRequest, \
MintCollectionTokenRequest, \
BurnCollectionTokenRequest
BurnCollectionTokenRequest, \
AbiFunction
from .sdk_token_provider import SdkTokenProvider


Expand Down Expand Up @@ -3048,15 +3049,17 @@ def get_contract_abi(self, base_asset_id: str, contract_address: str):
return self._get_request(f"/v1/contract_interactions/base_asset_id/{base_asset_id}/contract_address/{contract_address}/functions")

def fetch_or_scrape_abi(self, base_asset_id: str, contract_address: str):
return self._post_request("/v1/contracts/fetch-abi",{
return self._post_request("/v1/tokenization/contracts/fetch-abi",{
"baseAssetId": base_asset_id,
"contractAddress": contract_address
})

def add_abi(self, base_asset_id: str, contract_address: str):
return self._post_request("/v1/contracts/abi",{
def save_abi(self, base_asset_id: str, contract_address: str, abi: List[AbiFunction], name: Optional[str] = None):
return self._post_request("/v1/tokenization/contracts/abi",{
"baseAssetId": base_asset_id,
"contractAddress": contract_address
"contractAddress": contract_address,
"abi": abi,
"name": name,
})

def read_contract_call_function(self, base_asset_id: str, contract_address: str, request: ReadCallFunction):
Expand Down
Loading