-
@0xpatrickdev asked: I know we can receive assets over IBC and use an ERTP analog to send them to contracts, but what about the other way around? Can I send ERTP assets back the other way? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
yes, the vbank works both ways. The JS API starts with bankManager, among the permissioned contract deployment capabilities. This very powerful capability allows "the contract to manipulate nearly all Cosmos assets in the chain". We're working on using typedoc for reference docs (#8343). Meanwhile, github navigation is pretty good, so let's start at bankManager in the core types. I guess it takes a few hops, but we then get to... E(bankManager).getBankForAddress(addr). This give us a bank; i.e. a capability to manipulate all registered assets of an account with the given address. Here registered means that the BLD stakers previously decided to add the asset to the published.agoricNames.vbankAsset registry by executing Then using E(bank).getPurse(brand) we get a purse where withdrawing from the purse reduces the cosmos account balance, and depositing to the purse increases the cosmos account balance. We can then take the assets in the cosmos account and do the usual IBC stuff with it. |
Beta Was this translation helpful? Give feedback.
yes, the vbank works both ways.
The JS API starts with bankManager, among the permissioned contract deployment capabilities. This very powerful capability allows "the contract to manipulate nearly all Cosmos assets in the chain".
We're working on using typedoc for reference docs (#8343). Meanwhile, github navigation is pretty good, so let's start at bankManager in the core types. I guess it takes a few hops, but we then get to...
E(bankManager).getBankForAddress(addr). This give us a bank; i.e. a capability to manipulate all registered assets of an account with the given address. Here registered means that the BLD stakers previously decided to add the asset to the published.agoricNames.vb…