Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"bring",
"ridge",
"traffic",
"initial",
"piece",
"annual",
"give",
"say",
"wrestle",
"rare",
"ability"
].join(" "), "7d4c8c3796fdbf4869edb5703758f0e5831f5081")
try {
console.log('Deploying Ligo simple contract...')
const op = await Tezos.contract.originate({
balance: "1",
code: ligoSample,
init: { int: "0" },
fee: 30000,
storageLimit: 2000,
gasLimit: 90000,
})
console.log('Awaiting confirmation...')
const contract = await op.contract()
console.log('Storage', await contract.storage())
console.log("Operation hash:", op.hash, "Included in block level:", op.includedInBlock)
} catch (ex) {
console.error(ex)
}
}
"bring",
"ridge",
"traffic",
"initial",
"piece",
"annual",
"give",
"say",
"wrestle",
"rare",
"ability"
].join(" "), "7d4c8c3796fdbf4869edb5703758f0e5831f5081")
try {
console.log('Deploying Hello world contract...')
const op = await Tezos.contract.originate({
balance: "0",
code: `parameter string;
storage string;
code {CAR;
PUSH string "Hello ";
CONCAT;
NIL operation; PAIR};
`,
init: `"test1234"`
})
console.log('Awaiting confirmation...')
const contract = await op.contract()
console.log('Gas Used', op.consumedGas)
console.log('Storage Paid', op.storageDiff)
console.log('Storage Size', op.storageSize)
async function example() {
const provider = 'https://alphanet-node.tzscan.io';
const signer: any = new InMemorySigner('edsk3xkqabYfWWpcEKTWk75cRQv2bgHA3EHuuHSFH3ejqzKPx69Zh9');
Tezos.setProvider({ rpc: provider, signer });
try {
const contract = await Tezos.contract.at('KT1SawqvsVdAbDzqc4KwPpaS1S1veuFgF9AN');
console.log("Printing contract methods...");
console.log(contract.methods);
console.log("Showing initial storage...");
console.log(await contract.storage())
const op = await contract.methods.mint("tz1QZ6KY7d3BuZDT1d19dUxoQrtFPN2QJ3hn", 100).send({ fee: 30000, gasLimit: 200000 })
console.log('Awaiting confirmation...');
await op.confirmation();
console.log(op.hash, op.includedInBlock);
console.log("Showing final storage...");
console.log(await contract.storage())
} catch (ex) {
console.log(ex)
}
}