Closed tgrecojs closed 3 months ago
notes from today's office hours discussion:
import { Far } from '@endo/marshal';
import { E } from '@endo/far';
import { AmountMath } from '@agoric/ertp';
const deployContract1 = async ({
consume: { zoe, bankManager, agoricNames },
}) => {
const installation = await E(agoricNames).lookup('installation', 'contract1');
const started = await E(zoe).startInstance(installation);
const terms = await E(zoe).getTerms(started.instance);
const {
issuers: { Token123: issuer },
brands: { Token123: brand },
} = terms;
const empty = AmountMath.makeEmpty(brand);
const purse = E(issuer).makeEmptyPurse();
const payment = await E(purse).withdraw(empty);
const kit = { issuer, brand, payment };
// https://tutorials.cosmos.network/tutorials/6-ibc-dev/
const denom = 'ibc/234293u549238y5932y53'; // observed from a transfer, or hash(path, basedenom)
const issuerName = 'Token123';
const proposedName = issuerName;
await E(bankManager).addAsset(denom, issuerName, proposedName, kit);
};
const start = async zcf => {
const token123kit = await zcf.makeZCFMint('Token123', 'nat');
// ...
};
harden(start);
export { start };
this design changed quite a while back but if you could sign off that would be great @dckc.
below is relevant code section.
looks fine.
I presume there's adequate test coverage and ci automation.
LAR-102 implement minting capabilities directly within the airdrop contract