Merge pull request 'Export data' (#229) from legacy-export into legacy

Reviewed-on: #229
This commit is contained in:
Râu Cao 2022-11-02 16:58:38 +00:00
commit 8b7e2da8af
4 changed files with 19196 additions and 83 deletions

19000
data/contributions.json Normal file

File diff suppressed because it is too large Load Diff

121
data/contributors.json Normal file
View File

@ -0,0 +1,121 @@
{
"1": {
"account": "0x7E8f313C56F809188313aa274Fa67EE58c31515d",
"hashDigest": "0x99b8afd7b266e19990924a8be9099e81054b70c36b20937228a77a5cf75723b8",
"hashFunction": 18,
"hashSize": 32,
"id": 1
},
"2": {
"account": "0x49575f3DD9a0d60aE661BC992f72D837A77f05Bc",
"hashDigest": "0xeb78574922d8606419b714174b31961007afefe313111c9db817aa9d3f82e157",
"hashFunction": 18,
"hashSize": 32,
"id": 2
},
"3": {
"account": "0xF722709ECC3B05c19d02E82a2a4A4021B8F48C62",
"hashDigest": "0x7acd73632c7cc8d317fa9e72e925eaef1d700e69f185b84e3f0168471e17cf2d",
"hashFunction": 18,
"hashSize": 32,
"id": 3
},
"4": {
"account": "0xD4a64570B12dA659Ee4BBd41c3509B7b1F9c51AC",
"hashDigest": "0x4d394c58e4b0534446be10a9b7f8b50e5478258719c23a3e158a5ea9fca14bdd",
"hashFunction": 18,
"hashSize": 32,
"id": 4
},
"5": {
"account": "0x35d9e68a5F7A935C64b08221d5DC7f161a415184",
"hashDigest": "0xd6f726f37ad52998b8341b7021cb5d9f4dcf7ce09af575358505a2a7c2f81edb",
"hashFunction": 18,
"hashSize": 32,
"id": 5
},
"6": {
"account": "0x8345E84D848792bf750A1d032d76f20f00aeC1a7",
"hashDigest": "0x1acdc784e20f62c44ec222552531bf89daafaaca1893a68057a9ada920ea0984",
"hashFunction": 18,
"hashSize": 32,
"id": 6
},
"7": {
"account": "0x4D99d767477Fbb2B47EFeb17E2a78970AD22CCc1",
"hashDigest": "0xd6d16bde5ee3d3374dd5981dab0296938b24e3c812e72ba4fa3d38011b6fab24",
"hashFunction": 18,
"hashSize": 32,
"id": 7
},
"8": {
"account": "0x6a6cD99ab0335C92E55fbb4403D67A4f4B52AfEc",
"hashDigest": "0xec30c91b31a85eef2af7afce0ba66b0636f1d61a75a12d8ca188a2d9e1626cf2",
"hashFunction": 18,
"hashSize": 32,
"id": 8
},
"9": {
"account": "0x21aB0B3527326dcA4467245654Cf881F5F7a8c5e",
"hashDigest": "0xd6c8b0f285e614b12f700d6e66e2e67901c16c420308625f844357283bd555ba",
"hashFunction": 18,
"hashSize": 32,
"id": 9
},
"10": {
"account": "0x150A69bAfA216FD55C7CeF8eA2002cd582dc5982",
"hashDigest": "0x7490aabadf995751211686b3b9f4b8cfee3354947df23cec043c15bfb519c817",
"hashFunction": 18,
"hashSize": 32,
"id": 10
},
"11": {
"account": "0x2f65679cAf0c3abCbF77fC68fA56759f4D96C73c",
"hashDigest": "0xd147d2d26f7eb1cbe1c5da53c345565df2d3c6c33a8a3e3331952d4b878b2bb0",
"hashFunction": 18,
"hashSize": 32,
"id": 11
},
"12": {
"account": "0x13a24319Abb4e00c383D8a80dACb20690699Ac8C",
"hashDigest": "0x84c63c2d3f9510f87717e54a2cecb41f88dce6a41ae6392480ebf6561e30670e",
"hashFunction": 18,
"hashSize": 32,
"id": 12
},
"13": {
"account": "0x0e0F02508b80e401C26F584fF02eE80Ab094CdF9",
"hashDigest": "0xe4c34e15b87114e9edd599fa1bbd6d4b1bf45c3b0163d0772158fb93503c1fe1",
"hashFunction": 18,
"hashSize": 32,
"id": 13
},
"14": {
"account": "0x49750D74930b20b2937DDF77A6C30d81882d888E",
"hashDigest": "0xa1f18c54e77d1e8f0fa106463b3f66a34a6287bcd9b643febea0ab2e97009665",
"hashFunction": 18,
"hashSize": 32,
"id": 14
},
"15": {
"account": "0x608FD4b95116Ea616990Aaeb1d4f1ce07612f261",
"hashDigest": "0x1d9de6de5c72eedca6d7a5e8a9159e2f5fe676506aece3000acefcc821723429",
"hashFunction": 18,
"hashSize": 32,
"id": 15
},
"16": {
"account": "0xCaBba4560c96FADe3Dd6C29cF24Cfb16a228bC1c",
"hashDigest": "0x0c81914b8a332808879b06b1a68398edccea7e7facb50767e4116c33914d2c64",
"hashFunction": 18,
"hashSize": 32,
"id": 16
},
"17": {
"account": "0x765E88b4F9a59C3a3b300C6eFF9E6E9fDDf9FbD9",
"hashDigest": "0xcfbeeadc244dfdc55bbad50d431871439df067970db84c73023956c96a6f5df2",
"hashFunction": 18,
"hashSize": 32,
"id": 17
}
}

View File

@ -1,20 +1,20 @@
const fs = require('fs');
const initKredits = require('../helpers/init_kredits.js');
const ethers = require('ethers');
const Kredits = require('../../lib/kredits');
const provider = new ethers.providers.JsonRpcProvider('https://rpc.ankr.com/eth_rinkeby');
module.exports = async function(callback) {
let kredits;
try {
kredits = await initKredits(web3);
} catch(e) {
callback(e);
return;
}
const arapp = require('../../arapp.json');
const apm = arapp.environments['rinkeby'].apm;
async function main() {
const kredits = await new Kredits(provider, null, { apm });
//kredits = new Kredits(hre.ethers.provider, hre.ethers.provider.getSigner())
await kredits.init();
console.log(`Using Contribution at: ${kredits.Contribution.contract.address}`);
try {
const count = await kredits.Contribution.count;
const currentBlockHeight = await kredits.provider.getBlockNumber();
const currentBlockHeight = await provider.getBlockNumber();
const backup = {};
const promises = [];
@ -44,10 +44,6 @@ module.exports = async function(callback) {
fs.writeFileSync("./data/contributions.json", JSON.stringify(backup, null, 2));
console.log("Exported");
});
} catch(e) {
callback(e);
return;
}
callback();
}
main();

View File

@ -1,18 +1,18 @@
const fs = require('fs');
const initKredits = require('../helpers/init_kredits.js');
const ethers = require('ethers');
const Kredits = require('../../lib/kredits');
const provider = new ethers.providers.JsonRpcProvider('https://rpc.ankr.com/eth_rinkeby');
module.exports = async function(callback) {
let kredits;
try {
kredits = await initKredits(web3);
} catch(e) {
callback(e);
return;
}
const arapp = require('../../arapp.json');
const apm = arapp.environments['rinkeby'].apm;
async function main() {
const kredits = await new Kredits(provider, null, { apm });
//kredits = new Kredits(hre.ethers.provider, hre.ethers.provider.getSigner())
await kredits.init();
console.log(`Using Contributor at: ${kredits.Contributor.contract.address}`);
try {
const count = await kredits.Contributor.count;
const backup = {};
@ -39,10 +39,6 @@ module.exports = async function(callback) {
fs.writeFileSync("./data/contributors.json", JSON.stringify(backup, null, 2));
console.log("Exported");
});
} catch(e) {
callback(e);
return;
}
callback();
}
main();