Agoric / agoric-sdk

monorepo for the Agoric Javascript smart contract platform
Apache License 2.0
327 stars 206 forks source link

add `callPipe` on `ContractInvitationSpec` in walletFactory #8289

Open anilhelvaci opened 1 year ago

anilhelvaci commented 1 year ago

What is the Problem Being Solved?

SmartWallet's invitations.js module supports a callPipe property for the invitationSpec.source = 'agoricContract. However, there's no such option for invitationSpec.source = 'contract. Is there a specific reason for this?

cc @ivanlei

dckc commented 1 year ago

callPipe was added on the basis of requirements: in the vault factory, methods to make invitations are not directly on the public facet: from the public facet, we call a method to get a collateral manager and from there we call a method to get an invitation. And the vaultFactory is a well-known contract, chosen by BLD staker governance. So source: 'agoricContract' was enough.

There hasn't been a product requirement for callPipe in the case of source: 'contract'.

@anilhelvaci are you asking because you want an explanation? Or do you want to re-phrase this as a feature request?

anilhelvaci commented 1 year ago

I think it makes more sense if we turn this into a feature request @dckc.

callPipe was added on the basis of requirements: in the vault factory, methods to make invitations are not directly on the public facet: from the public facet, we call a method to get a collateral manager and from there we call a method to get an invitation. And the vaultFactory is a well-known contract, chosen by BLD staker governance. So source: 'agoricContract' was enough.

We have similar flow in our own app. I know that for mainnet-2, our app instance gets to be in agoricNames but still think future third party dapps might need this feature as well.