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

issuers, brands can be registered without all of agoricNamesAdmin #2

Closed
dckc opened this issue Sep 7, 2023 · 0 comments · Fixed by #8
Closed

issuers, brands can be registered without all of agoricNamesAdmin #2

dckc opened this issue Sep 7, 2023 · 0 comments · Fixed by #8

Comments

@dckc
Copy link
Contributor

dckc commented Sep 7, 2023

I hope early feedback is useful.
I don't know what priority this issue should be given.

This pattern of requesting all of agoricNamesAdmin to register names that were not known at bootstrap was a necessary work-around as of the original Dec 14, 2022 office hours discussion of granting core-eval powers...

const kindAdmin = (kind) => E(agoricNamesAdmin).lookupAdmin(kind);
await E(kindAdmin('issuer')).update('KREAdCHARACTER', characterIssuer);

"agoricNamesAdmin": true,

But that limitation was addressed in the Jun 9 mainnet1B release that was deployed to mainnet.

So the brands and issuers can be shared using the same pattern as the instance:

instance: {
// @ts-expect-error bakeSaleKit isn't declared in vats/src/core/types.js
produce: { [contractInfo.instanceName]: kread },
},

// Share instance widely via E(agoricNames).lookup('instance', <instance name>)
kread.resolve(instance);

"instance": {
"produce": {
"kread": true
}

This reduces the authority granted to the proposal from all of agoricNamesAdmin (authority to change any entry in any of the instance, brand, etc. nameHubs... and to replace the namehubs altogether) to only the authority to give values for the named entries.

By way of example, see the game1 test contract;

https://github.com/Agoric/agoric-sdk/blob/dc-sw-backport/packages/smart-wallet/test/start-game1-proposal.js#L48-L60

https://github.com/Agoric/agoric-sdk/blob/56850bf9467975959f1bd2bbbb6e50d9d4293789/packages/smart-wallet/test/start-game1-proposal.js#L107-L111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant