Solana(Execution)
Canister ID | Chain Id | |
---|---|---|
OMNITY_EXECUTION_SOLANA | lvinw-hiaaa-aaaar-qahoa-cai | eSolana |
Update
generate_ticket
Generate an cross-chain transaction from the solana route.
Parameters:
req: GenerateTicketArgs - struct containing:
* signature: String - the transaction id from the bitcoin transaction
* target_chain_id: String
* sender: String
* receiver: String
* token_id: String
* amount: u64
* action: TxAction
* memo: Option<String>
Returns:
Result: a variant containing either:
GenerateTicketOk: a ticket_id String information will be returned if the operation succeeds
GenerateTicketError: the operation failed, and the GenerateTicketError provides details about the failure
Workflow:
1. Call the corresponding solana function with the Solana SDK and get the calculated function_hash(see the code example):
- solana HOPE•YOU•GET•RICH is the token account address.
2. Put the function_hash(signature) as a parameter into generate_ticket from your dapp.
3. Go to Omnity Explorer to track the generated ticket status.
Query
get_chain_list
Retrieve a list of chains that connect with the solana route.
Returns:
Vec<Chain>: struct containing:
chain_id: ChainId
canister_id: String
chain_type: ChainType
chain_state: ChainState
contract_address: Option<String>
counterparties: Option<Vec<ChainId>>
fee_token: Option<TokenId>
get_fee_account
Get the account to which the transaction fee is sent.
Returns:
String: the fee account
get_redeem_fee
Retrieve the fee associated with redeeming the token based on chain_id.
Parameters:
chain_id: ChainId - the target chain
Returns:
Option<u128>: the fee amount
get_token_list
Retrieve a list of tokens available on the solana route.
Returns:
Vec<TokenResp>: struct containing:
token_id: TokenId
symbol: String
decimals: u8
icon: Option<String>
rune_id: Option<String>
query_mint_address
Retrieve the token mint account based on token_id.
Returns: the token contract address
mint_token_status
Returns the status of the wrapped token minting operation on the solana route.
Returns:
Result: a variant containing either:
TxStatus: a enum containing:
New,
Pending,
Finalized,
TxFailed { e: String }
CallError: the operation failed, and the CallError provides details about the failure
mint_token_tx_hash
Returns the transaction hash of the wrapped token minting operation on the solana route.
Returns:
Result: a variant containing either:
Option<String>: the operation succeeded and the transaction hash will be returned
CallError: the operation failed, and the CallError provides details about the failure
Last updated on January 25, 2025