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

feat(postalSvc): deliver payment using address #2

Merged
merged 3 commits into from
Dec 28, 2023
Merged

feat(postalSvc): deliver payment using address #2

merged 3 commits into from
Dec 28, 2023

Conversation

dckc
Copy link
Collaborator

@dckc dckc commented Dec 23, 2023

Does this contract belong here?

It's not really partitioning anything.

It works around

once so that clients don't have to. (though currently the way it does that might have some durability issues).

It does provide a familiar contract-based API to namesByAddress. And makes E(depositFacet).receive() available via smart-wallet style offers.

Maybe that last one justifies adding it here. Maybe putting a smart-wallet face on something is also in scope for this repo.

refs:

dckc added 3 commits December 23, 2023 09:18
Agoric/agoric-sdk#8547
2023-11-17 19:10 0040bea4a feat: postalSvc contract forwards payments using namesByAddress
 - tweak order in test result (again XXX)
 - update imports to work outside zoe pkg
 - replace asset() function with assets record
 - install bundles with fake vat admin
   rather than intercepting E(zoe).installbundleID()
   - no need for wrapZoe
 - hoist bootstrap() out of test(...)
Copy link
Contributor

@0xpatrickdev 0xpatrickdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested using node 18.18.2 and agoric 0.22.0-u13.0.

Working for me with these 2 changes in #3:

]);
const { instance } = await E(zoe).startInstance(
installation,
{ IST, Invitation },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

creatorFacet method to add issuers?
governed API to add issuers?
#8547

It seems like this may be a common requirement. I wonder if it's possible for a contract to have a dynamic list of issuers from a nameHub. Could maybe be added to StandardTerms from zoe or specified in the startInstance function.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also wonder if this is a better approach here, saving issuers on the fly. Tying postalSvc to a NameHub like agoricNames might preclude wider usage.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Contracts usually add issuers that they are confident that they can rely on, so letting clients unilaterally add issuers is usually a no-no. But in this case, maybe it's ok, since we're just relaying assets that the parties choose to use?

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 this pull request may close these issues.

3 participants