You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hermes-sdk has derive_ibc_denom to find the ibc minted denoms (of the form ibc/<hash>) in cosmos-sdk based chains. This is a pure function as <hash> can be derived statically from trace prefix and native denom.
But in starknet, the tokens are minted by deploying a new erc20 contract. So the minted token denoms (contract addresses) can't be derived statically. The ics20 contract maintains a map of keys (which can be statically derived) of the minted token and the corresponding token addresses.
Thus, StarknetChain needs a method which takes the same arguments as derive_ibc_denom and derive the key (using poseidon hash) and query the ics20 contract for the token address.
hermes-sdk has derive_ibc_denom to find the ibc minted denoms (of the form
ibc/<hash>
) in cosmos-sdk based chains. This is a pure function as<hash>
can be derived statically from trace prefix and native denom.But in starknet, the tokens are minted by deploying a new erc20 contract. So the minted token denoms (contract addresses) can't be derived statically. The ics20 contract maintains a map of keys (which can be statically derived) of the minted token and the corresponding token addresses.
ibc-starknet/cairo-contracts/packages/apps/src/transfer/components/transfer.cairo
Lines 34 to 39 in 717b229
Thus,
StarknetChain
needs a method which takes the same arguments asderive_ibc_denom
and derive the key (using poseidon hash) and query the ics20 contract for the token address.ibc-starknet/cairo-contracts/packages/apps/src/transfer/components/transfer.cairo
Lines 777 to 781 in 717b229
ibc-starknet/cairo-contracts/packages/apps/src/transfer/components/transfer.cairo
Lines 276 to 284 in 717b229
The text was updated successfully, but these errors were encountered: