-
Notifications
You must be signed in to change notification settings - Fork 212
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
9211 lookup denom #9983
9211 lookup denom #9983
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
d89e8dc
to
5aa48dc
Compare
b578e55
to
25b46fe
Compare
trying an experiment to co-assign this PR to myself to get it to show up in a tracking thing |
80a9cdd
to
73ef8f9
Compare
73ef8f9
to
1425086
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to wait for me
@@ -94,6 +94,20 @@ export interface Chain<CI extends ChainInfo> { | |||
// TODO provide a way to get the local denom/brand/whatever for this chain | |||
} | |||
|
|||
export interface BrandInfo< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A 1-line description seems worthwhile. I'm struggling a little bit to come up with one... but it seems a little odd to call this BrandInfo
when the brand
property is optional. Maybe something like AssetTrackingInfo
or AssetInfo
or AssetCosswalk
.
asset is what the chain registry calls a similar structure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @mitdralla @dtribble re change to orchestration-api.ts
) => { | ||
/** The well-known Brand on Agoric for the direct asset */ | ||
brand?: Brand; | ||
/** The Chain at which the argument `denom` exists (where the asset is currently held) */ | ||
chain: Chain<KnownChains[HoldingChain]>; | ||
/** The Chain that is the issuer of the underlying asset */ | ||
base: Chain<KnownChains[IssuingChain]>; | ||
/** the Denom for the underlying asset on its issuer chain */ | ||
baseDenom: Denom; | ||
}; | ||
) => BrandInfo<HoldingChain, IssuingChain>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 this refactor addresses one case of...
(Unfortunately the symptoms persist for other methods such as getChain
.)
093b875
to
18462fd
Compare
18462fd
to
ae17a39
Compare
ae17a39
to
4cac5cc
Compare
closes: #9211
Description
Uses ChainHub for lookup of denoms and brands (from the other).
Adds some coercion utilities to get the desired shape within the exos and contract, using a ChainHub.
Security Considerations
Contracts control their ChainHub and can specify any mapping of brand to denom.
Scaling Considerations
If contracts import the whole Known Chains module, that will increase bundle size. I think this will be unlikely in production. We'll have on-chain lookup by then.
Documentation Considerations
not yet
Testing Considerations
existing coverage
Upgrade Considerations
None of this is deployed yet