Open dckc opened 9 months ago
idea: one interchainMints
contract instead of N mintHolder
contracts. privateArgs includes bankManager and nameAdmins for agoricNames.brand, agoricNames.issuer. creatorFacet includes makeInterchainAsset
that
subsume mintHolder
idea: one
interchainMints
contract instead of NmintHolder
contracts. ...
it was pretty straightforward:
$ yarn test test/test-interchainMints.js
yarn run v1.22.21
$ ava --verbose test/test-interchainMints.js
before hook
ℹ bootstrap
...
bundles/ bundle-interchainMints.js valid: 121 files bundled at 2024-04-11T17:23:16.719Z
✔ install interchainMints bundle
ℹ publish bundle interchainMints b1-0f39c
interchainMints (re-)installed as b1-0f39c
✔ interchainMints contract adds IBC tokens to vbank (262ms)
ℹ interchainMintsKit {
adminFacet: Object @Alleged: adminFacet {},
creatorFacet: Object @Alleged: InterchainMints {},
creatorInvitation: undefined,
instance: Object @Alleged: InstanceHandle {},
publicFacet: Object @Alleged: Incapable {},
}
ℹ E(Asset1).makeEmptyPurse() works: {
brand: Object @Alleged: Asset1 brand {},
value: 0n,
}
ℹ E(Asset2).makeEmptyPurse() works: {
brand: Object @Alleged: Asset2 brand {},
value: 0n,
}
ℹ agoricNames.vbankAsset: {
'ibc/1234567890123456789012345678901234567890123456789012345678901234': {
brand: Object @Alleged: Asset1 brand {},
denom: 'ibc/1234567890123456789012345678901234567890123456789012345678901234',
displayInfo: {
assetKind: 'nat',
decimalPlaces: 6,
},
issuer: Object @Alleged: Asset1 issuer {},
issuerName: 'Asset1',
proposedName: 'Asset1',
},
'ibc/2234567890123456789012345678901234567890123456789012345678901234': {
brand: Object @Alleged: Asset2 brand {},
denom: 'ibc/2234567890123456789012345678901234567890123456789012345678901234',
displayInfo: {
assetKind: 'nat',
decimalPlaces: 6,
},
issuer: Object @Alleged: Asset2 issuer {},
issuerName: 'Asset2',
proposedName: 'Asset2',
},
}
interchainMints start args: {
installation: Promise { Object [Alleged: BundleIDInstallation] {} },
privateArgs: {
nameAdmins: {
brand: Object [Alleged: NameHubKit nameAdmin] {},
issuer: Object [Alleged: NameHubKit nameAdmin] {}
},
bankManager: Object [Alleged: BankManager] {}
}
}
interchainMints started
─
2 tests passed
Done in 1.29s.
cc @0xpatrickdev
cc @0xpatrickdev
DRAFT until:
stretch: