Improve import scripts, update testnet addresses #231

Merged
raucao merged 5 commits from deploy-rsk into master 2022-11-02 16:57:07 +00:00
3 changed files with 12 additions and 7 deletions
Showing only changes of commit f71ff4ce9a - Show all commits

View File

@ -6,6 +6,8 @@ async function main() {
await kredits.init();
console.log(`Using Contribution at: ${kredits.Contribution.contract.address}`);
const count = await kredits.Contribution.count;
console.log(`Currently ${count} entries`);
try {
const data = fs.readFileSync("./data/contributions.json");
@ -28,11 +30,11 @@ async function main() {
c.hashDigest, c.hashFunction, c.hashSize,
confirmedAtBlock, c.vetoed
);
// await result.wait();
console.log(`Added contribution #${contributionId}: ${result.hash}`);
console.log(`Adding contribution #${contributionId}: ${result.hash}`);
await result.wait();
};
} catch(e) {
console.log(e);
console.error(e);
}
}

View File

@ -6,7 +6,8 @@ async function main() {
await kredits.init();
console.log(`Using Contributor at: ${kredits.Contributor.contract.address}`);
const count = await kredits.Contributor.count;
console.log(`Currently ${count} entries`);
try {
const data = fs.readFileSync("./data/contributors.json");
const contributors = JSON.parse(data);
@ -22,11 +23,11 @@ async function main() {
contributor.hashFunction,
contributor.hashSize,
);
// await result.wait();
console.log(`Added contributor #${contributorId}: ${result.hash}`);
console.log(`Adding contributor #${contributorId}: ${result.hash}`);
await result.wait();
};
} catch(e) {
console.log(e);
console.error(e);
}
}

View File

@ -6,6 +6,8 @@ async function main() {
await kredits.init();
console.log(`Using Contributor at: ${kredits.Contributor.contract.address}`);
const count = await kredits.Contributors.count;
console.log(`Currently ${count} entries`);
const table = new Table({
head: ['ID', 'Account', 'Name', 'Core?', 'Balance', 'Kredits earned', 'Contributions count', 'IPFS']