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

Using the vat-mint to create mints causes errors when trying to pass a config #77

Closed
katelynsills opened this issue Aug 8, 2019 · 4 comments
Assignees
Labels
ERTP package: ERTP

Comments

@katelynsills
Copy link
Contributor

Using the vat-mint in the SwingSet tests works fine for the basic, fungible mint. However, when you try to pass a config, you are passing a function, and marshal doesn't allow it:

const stockMintP = await E(mint).makeMint(usableStockConfig, 'Tyrell');

gives the error:

doProcess: vat[_bootstrap][0].bootstrap dispatch failed: TypeError: arrays must not contain methods TypeError: arrays must not contain methods
        at isPassByCopyArray (/Users/katelynsills/code/ERTP/node_modules/@agoric/marshal/marshal.js:91:13)

It seems like either we don't want a vat-mint at all, or that vat-mint is not set up correctly. Is vat-mint intended to be a long-lived, trusted party?

@katelynsills katelynsills self-assigned this Aug 15, 2019
@katelynsills
Copy link
Contributor Author

I think vat-mint just doesn't make sense given that there may be custom mint configurations that need to be passed into the makeMint. It makes more sense for a smart contract developer to import mint.js in whatever vat they want to use.

@Chris-Hibbert
Copy link
Contributor

In the tests, you're probably right that the developer should put the mint where it's conveniently remote from the code being tested.

The vat-mint.js in cosmic-swingset doesn't export a makeMint() function. Its purpose seems to be to hold 'trusted' 'system' mints. I think what we'd expect developer to do is to install a mint in a spawner (née contract host) so the clients can see what code the mint is running.

@warner
Copy link
Member

warner commented Dec 2, 2019

this was issue 70 in the old ERTP repo

@warner warner transferred this issue from Agoric/ERTP Dec 2, 2019
@warner warner added the ERTP package: ERTP label Dec 2, 2019
@katelynsills
Copy link
Contributor Author

Closing this issue because it's been answered.

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

No branches or pull requests

3 participants