Compare commits
16 Commits
deletemewh
...
883f9adb96
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
883f9adb96
|
||
|
|
550bc2b9f4
|
||
| 2fca436fa8 | |||
| 2b05be1897 | |||
|
|
46b1bbfbf2
|
||
|
|
98348dc544
|
||
|
|
fd93993a1b
|
||
|
|
0d6702fd2b
|
||
|
|
51e50e7c46
|
||
| 793642c238 | |||
|
|
c55593d46f
|
||
|
|
2b314556ad
|
||
|
53955126ff
|
|||
| 1d1f2bb4ed | |||
| 42a2945692 | |||
| 12326ce73f |
6
.dockerignore
Normal file
6
.dockerignore
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
.openzeppelin
|
||||||
|
artifacts
|
||||||
|
cache
|
||||||
|
deployments
|
||||||
|
gitno
|
||||||
|
node_modules
|
||||||
40
.drone.yml
Normal file
40
.drone.yml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: setup
|
||||||
|
image: gitea.kosmos.org/kredits/docker-ci:latest
|
||||||
|
commands:
|
||||||
|
- cp -r /app/node_modules /drone/src/node_modules
|
||||||
|
- chown -R drone:drone /drone/src
|
||||||
|
- su drone -c 'npm install'
|
||||||
|
- name: lint js
|
||||||
|
image: gitea.kosmos.org/kredits/docker-ci:latest
|
||||||
|
commands:
|
||||||
|
- su drone -c 'npm run lint:wrapper'
|
||||||
|
depends_on:
|
||||||
|
- setup
|
||||||
|
# - name: lint contracts
|
||||||
|
# image: gitea.kosmos.org/kredits/docker-ci:latest
|
||||||
|
# commands:
|
||||||
|
# - su drone -c 'npm run lint:contracts'
|
||||||
|
# depends_on:
|
||||||
|
# - setup
|
||||||
|
- name: build contracts
|
||||||
|
image: gitea.kosmos.org/kredits/docker-ci:latest
|
||||||
|
commands:
|
||||||
|
- su drone -c 'npm run devchain' &
|
||||||
|
- sleep 5
|
||||||
|
- su drone -c 'npm run build'
|
||||||
|
depends_on:
|
||||||
|
- setup
|
||||||
|
- name: test
|
||||||
|
image: gitea.kosmos.org/kredits/docker-ci:latest
|
||||||
|
commands:
|
||||||
|
- su drone -c 'npm run devchain' &
|
||||||
|
- sleep 5
|
||||||
|
- su drone -c 'npm test'
|
||||||
|
depends_on:
|
||||||
|
- setup
|
||||||
|
- build contracts
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -5,6 +5,8 @@ node_modules
|
|||||||
yarn-error.log
|
yarn-error.log
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
data
|
||||||
|
|
||||||
cache
|
cache
|
||||||
artifacts
|
artifacts
|
||||||
.openzeppelin
|
.openzeppelin
|
||||||
|
|||||||
38
.travis.yml
38
.travis.yml
@@ -1,38 +0,0 @@
|
|||||||
---
|
|
||||||
language: node_js
|
|
||||||
node_js:
|
|
||||||
- "12"
|
|
||||||
|
|
||||||
sudo: false
|
|
||||||
dist: xenial
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- node_modules
|
|
||||||
- apps/contribution/node_modules
|
|
||||||
- apps/contributor/node_modules
|
|
||||||
- apps/proposal/node_modules
|
|
||||||
- apps/token/node_modules
|
|
||||||
- apps/vault/node_modules
|
|
||||||
|
|
||||||
install:
|
|
||||||
- npm install -g @aragon/cli
|
|
||||||
- npm install -g truffle
|
|
||||||
- npm install
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- npm run devchain &
|
|
||||||
- sleep 10
|
|
||||||
|
|
||||||
script:
|
|
||||||
- npm run lint:wrapper
|
|
||||||
- npm run lint:contract-tests
|
|
||||||
# FIXME Fix tests
|
|
||||||
# - npm run test:token
|
|
||||||
# - npm run test:contributor
|
|
||||||
# - npm run test:contribution
|
|
||||||
# - npm run test:proposal
|
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
|
FROM node:16.16
|
||||||
|
#ENV NODE_ENV=production
|
||||||
|
|
||||||
|
RUN useradd -ms /bin/bash drone
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY ["package.json", "package-lock.json*", "./"]
|
||||||
|
RUN chown -R drone:drone /app
|
||||||
|
USER drone
|
||||||
|
RUN npm install
|
||||||
|
USER root
|
||||||
45
package-lock.json
generated
45
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "kredits-contracts",
|
"name": "kredits-contracts",
|
||||||
"version": "6.0.0",
|
"version": "7.0.0-beta.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "kredits-contracts",
|
"name": "kredits-contracts",
|
||||||
"version": "6.0.0",
|
"version": "7.0.0-beta.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@kosmos/schemas": "^3.1.0",
|
"@kosmos/schemas": "^3.1.0",
|
||||||
@@ -4793,12 +4793,12 @@
|
|||||||
"tape": "^4.6.3"
|
"tape": "^4.6.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/eth-block-tracker/async-eventemitter@github:ahultgren/async-eventemitter": {
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/eth-block-tracker/node_modules/async-eventemitter": {
|
"node_modules/eth-block-tracker/node_modules/async-eventemitter": {
|
||||||
"resolved": "git+ssh://git@github.com/ahultgren/async-eventemitter.git#fa06e39e56786ba541c180061dbf2c0a5bbf951c",
|
"resolved": "node_modules/eth-block-tracker/async-eventemitter@github:ahultgren/async-eventemitter",
|
||||||
"dev": true,
|
"link": true
|
||||||
"dependencies": {
|
|
||||||
"async": "^2.4.0"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"node_modules/eth-block-tracker/node_modules/bn.js": {
|
"node_modules/eth-block-tracker/node_modules/bn.js": {
|
||||||
"version": "4.12.0",
|
"version": "4.12.0",
|
||||||
@@ -17371,13 +17371,6 @@
|
|||||||
"web3-provider-engine": "^13.8.0"
|
"web3-provider-engine": "^13.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/truffle-hdwallet-provider-privkey/node_modules/bignumber.js": {
|
|
||||||
"resolved": "git+ssh://git@github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/truffle-hdwallet-provider-privkey/node_modules/utf8": {
|
"node_modules/truffle-hdwallet-provider-privkey/node_modules/utf8": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz",
|
||||||
@@ -17397,6 +17390,13 @@
|
|||||||
"xmlhttprequest": "*"
|
"xmlhttprequest": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/truffle-hdwallet-provider-privkey/node_modules/web3/bignumber.js@git+https:/github.com/frozeman/bignumber.js-nolookahead.git": {
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"node_modules/truffle-hdwallet-provider-privkey/node_modules/web3/node_modules/bignumber.js": {
|
||||||
|
"resolved": "node_modules/truffle-hdwallet-provider-privkey/node_modules/web3/bignumber.js@git+https:/github.com/frozeman/bignumber.js-nolookahead.git",
|
||||||
|
"link": true
|
||||||
|
},
|
||||||
"node_modules/ts-essentials": {
|
"node_modules/ts-essentials": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-1.0.4.tgz",
|
||||||
@@ -23860,12 +23860,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"async-eventemitter": {
|
"async-eventemitter": {
|
||||||
"version": "git+ssh://git@github.com/ahultgren/async-eventemitter.git#fa06e39e56786ba541c180061dbf2c0a5bbf951c",
|
"version": "file:node_modules/eth-block-tracker/async-eventemitter@github:ahultgren/async-eventemitter"
|
||||||
"dev": true,
|
|
||||||
"from": "git+ssh://git@github.com/ahultgren/async-eventemitter.git#fa06e39e56786ba541c180061dbf2c0a5bbf951c",
|
|
||||||
"requires": {
|
|
||||||
"async": "^2.4.0"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"bn.js": {
|
"bn.js": {
|
||||||
"version": "4.12.0",
|
"version": "4.12.0",
|
||||||
@@ -34854,11 +34849,6 @@
|
|||||||
"web3-provider-engine": "^13.8.0"
|
"web3-provider-engine": "^13.8.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bignumber.js": {
|
|
||||||
"version": "git+ssh://git@github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934",
|
|
||||||
"dev": true,
|
|
||||||
"from": "git+ssh://git@github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934"
|
|
||||||
},
|
|
||||||
"utf8": {
|
"utf8": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz",
|
||||||
@@ -34876,6 +34866,11 @@
|
|||||||
"utf8": "^2.1.1",
|
"utf8": "^2.1.1",
|
||||||
"xhr2-cookies": "^1.1.0",
|
"xhr2-cookies": "^1.1.0",
|
||||||
"xmlhttprequest": "*"
|
"xmlhttprequest": "*"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"bignumber.js": {
|
||||||
|
"version": "file:node_modules/truffle-hdwallet-provider-privkey/node_modules/web3/bignumber.js@git+https:/github.com/frozeman/bignumber.js-nolookahead.git"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "kredits-contracts",
|
"name": "kredits-contracts",
|
||||||
"version": "6.0.0",
|
"version": "7.0.0-beta.0",
|
||||||
"description": "Ethereum contracts and npm wrapper for Kredits",
|
"description": "Ethereum contracts and npm wrapper for Kredits",
|
||||||
"main": "./lib/kredits.js",
|
"main": "./lib/kredits.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
"lint:contracts": "solhint \"contracts/**/*.sol\" \"apps/*/contracts/**/*.sol\"",
|
"lint:contracts": "solhint \"contracts/**/*.sol\" \"apps/*/contracts/**/*.sol\"",
|
||||||
"lint:contract-tests": "eslint apps/*/test",
|
"lint:contract-tests": "eslint apps/*/test",
|
||||||
"lint:wrapper": "eslint lib/",
|
"lint:wrapper": "eslint lib/",
|
||||||
"test": "npm run test:token && npm run test:contributor && npm run test:contribution && npm run test:proposal",
|
"test": "hardhat test",
|
||||||
"test:token": "cd apps/token && npm run test",
|
"test:token": "cd apps/token && npm run test",
|
||||||
"test:contributor": "cd apps/contributor && npm run test",
|
"test:contributor": "cd apps/contributor && npm run test",
|
||||||
"test:contribution": "cd apps/contribution && npm run test",
|
"test:contribution": "cd apps/contribution && npm run test",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ async function main() {
|
|||||||
let contract = await upgrades.deployProxy(contractFactories[contractName], params)
|
let contract = await upgrades.deployProxy(contractFactories[contractName], params)
|
||||||
.catch(handleError);
|
.catch(handleError);
|
||||||
|
|
||||||
contracts[contractName.toLowerCase()] = contract;
|
contracts[contractName] = contract;
|
||||||
|
|
||||||
await contract.deployed().then(() => {
|
await contract.deployed().then(() => {
|
||||||
console.log(`${contractName} deployed to:`, contract.address);
|
console.log(`${contractName} deployed to:`, contract.address);
|
||||||
@@ -34,36 +34,68 @@ async function main() {
|
|||||||
|
|
||||||
const blocksVetoPeriod = 40320; // 7 days; 15 seconds block time
|
const blocksVetoPeriod = 40320; // 7 days; 15 seconds block time
|
||||||
|
|
||||||
// await deployContractProxy('Contributor');
|
await deployContractProxy('Contributor');
|
||||||
// await deployContractProxy('Contribution', [ blocksVetoPeriod ]);
|
await deployContractProxy('Contribution', [ blocksVetoPeriod ]);
|
||||||
await deployContractProxy('Token');
|
await deployContractProxy('Token');
|
||||||
// await deployContractProxy('Reimbursement');
|
await deployContractProxy('Reimbursement');
|
||||||
|
|
||||||
// await contracts.Contributor
|
console.log('Calling Contributor#setTokenContract')
|
||||||
// .setTokenContract(contracts.Token.address)
|
await contracts.Contributor.functions
|
||||||
// .then(res => res.wait()).catch(handleError);
|
.setTokenContract(contracts.Token.address)
|
||||||
// await contracts.Contributor
|
.then(res => {
|
||||||
// .setContributionContract(contracts.Contribution.address)
|
console.log(`...transaction published: ${res.hash}`);
|
||||||
// .then(res => res.wait()).catch(handleError);
|
return res.wait();
|
||||||
//
|
}).catch(handleError);
|
||||||
// await contracts.Contribution
|
|
||||||
// .setTokenContract(contracts.Token.address)
|
|
||||||
// .then(res => res.wait()).catch(handleError);
|
|
||||||
// await contracts.Contribution
|
|
||||||
// .setContributorContract(contracts.Contributor.address)
|
|
||||||
// .then(res => res.wait()).catch(handleError);
|
|
||||||
|
|
||||||
// await contracts.Token
|
console.log('Calling Contributor#setContributionContract')
|
||||||
// .setContributionContract(contracts.Contribution.address)
|
await contracts.Contributor.functions
|
||||||
// .then(res => res.wait()).catch(handleError);
|
.setContributionContract(contracts.Contribution.address)
|
||||||
await contracts.Token
|
.then(res => {
|
||||||
// .setContributorContract(contracts.Contributor.address)
|
console.log(`...transaction published: ${res.hash}`);
|
||||||
.setContributorContract('0xEb4100b5939E243f69873A8E463eDa0aE84e43E8')
|
return res.wait();
|
||||||
.then(res => res.wait()).catch(handleError);
|
}).catch(handleError);
|
||||||
|
|
||||||
// await contracts.Reimbursement
|
|
||||||
// .setContributorContract(contracts.Contributor.address)
|
console.log('Calling Contribution#setTokenContract')
|
||||||
// .then(res => res.wait()).catch(handleError);
|
await contracts.Contribution.functions
|
||||||
|
.setTokenContract(contracts.Token.address)
|
||||||
|
.then(res => {
|
||||||
|
console.log(`...transaction published: ${res.hash}`);
|
||||||
|
return res.wait();
|
||||||
|
}).catch(handleError);
|
||||||
|
|
||||||
|
|
||||||
|
console.log('Calling Contribution#setContributorContract')
|
||||||
|
await contracts.Contribution.functions
|
||||||
|
.setContributorContract(contracts.Contributor.address)
|
||||||
|
.then(res => {
|
||||||
|
console.log(`...transaction published: ${res.hash}`);
|
||||||
|
return res.wait();
|
||||||
|
}).catch(handleError);
|
||||||
|
|
||||||
|
console.log('Calling Token#setContributionContract')
|
||||||
|
await contracts.Token.functions
|
||||||
|
.setContributionContract(contracts.Contribution.address)
|
||||||
|
.then(res => {
|
||||||
|
console.log(`...transaction published: ${res.hash}`);
|
||||||
|
return res.wait();
|
||||||
|
}).catch(handleError);
|
||||||
|
|
||||||
|
console.log('Calling Token#setContributorContract')
|
||||||
|
await contracts.Token.functions
|
||||||
|
.setContributorContract(contracts.Contributor.address)
|
||||||
|
.then(res => {
|
||||||
|
console.log(`...transaction published: ${res.hash}`);
|
||||||
|
return res.wait();
|
||||||
|
}).catch(handleError);
|
||||||
|
|
||||||
|
console.log('Calling Reimbursement#setContributorContract')
|
||||||
|
await contracts.Reimbursement.functions
|
||||||
|
.setContributorContract(contracts.Contributor.address)
|
||||||
|
.then(res => {
|
||||||
|
console.log(`...transaction published: ${res.hash}`);
|
||||||
|
return res.wait();
|
||||||
|
}).catch(handleError);
|
||||||
|
|
||||||
const addresses = {
|
const addresses = {
|
||||||
Contributor: contracts.Contributor.address,
|
Contributor: contracts.Contributor.address,
|
||||||
|
|||||||
45
scripts/export/contributions.js
Normal file
45
scripts/export/contributions.js
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
const Kredits = require('../../lib/kredits');
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
kredits = new Kredits(hre.ethers.provider, hre.ethers.provider.getSigner())
|
||||||
|
await kredits.init();
|
||||||
|
|
||||||
|
console.log(`Using Contribution at: ${kredits.Contribution.contract.address}`);
|
||||||
|
|
||||||
|
const count = await kredits.Contribution.count;
|
||||||
|
const currentBlockHeight = await XMLHttpRequest.ethers.provider.getBlockNumber();
|
||||||
|
|
||||||
|
const backup = {};
|
||||||
|
const promises = [];
|
||||||
|
for (let i = 1; i <= count; i++) {
|
||||||
|
promises.push(new Promise((resolve, reject) => {
|
||||||
|
setTimeout(async () => {
|
||||||
|
console.log(`Loading contribution #${i}`);
|
||||||
|
await kredits.Contribution.contract.getContribution(i).then(contractData => {
|
||||||
|
if (contractData.vetoed) {
|
||||||
|
console.log(`Ignoring vetoed contribution #${contractData.id}`);
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
|
backup[i] = {
|
||||||
|
amount: contractData.amount,
|
||||||
|
contributorId: contractData.contributorId,
|
||||||
|
hashDigest: contractData.hashDigest,
|
||||||
|
hashFunction: contractData.hashFunction,
|
||||||
|
hashSize: contractData.hashSize,
|
||||||
|
confirmedAtBlock: contractData.confirmedAtBlock,
|
||||||
|
confirmed: contractData.confirmedAtBlock <= currentBlockHeight,
|
||||||
|
id: contractData.id,
|
||||||
|
}
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
}, 100 * i);
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
await Promise.all(promises).then(() => {
|
||||||
|
fs.writeFileSync("./data/contributions.json", JSON.stringify(backup, null, 2));
|
||||||
|
console.log("Exported");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
main();
|
||||||
38
scripts/export/contributors.js
Normal file
38
scripts/export/contributors.js
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
const fs = require('fs');
|
||||||
|
const Kredits = require('../../lib/kredits');
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
kredits = new Kredits(hre.ethers.provider, hre.ethers.provider.getSigner())
|
||||||
|
await kredits.init();
|
||||||
|
|
||||||
|
console.log(`Using Contributor at: ${kredits.Contributor.contract.address}`);
|
||||||
|
|
||||||
|
const count = await kredits.Contributor.count;
|
||||||
|
|
||||||
|
const backup = {};
|
||||||
|
const promises = [];
|
||||||
|
for (let i = 1; i <= count; i++) {
|
||||||
|
promises.push(new Promise((resolve, reject) => {
|
||||||
|
setTimeout(async () => {
|
||||||
|
console.log(`Loading contributor #${i}`);
|
||||||
|
await kredits.Contributor.contract.getContributorById(i).then(contractData => {
|
||||||
|
backup[i] = {
|
||||||
|
account: contractData.account,
|
||||||
|
hashDigest: contractData.hashDigest,
|
||||||
|
hashFunction: contractData.hashFunction,
|
||||||
|
hashSize: contractData.hashSize,
|
||||||
|
id: contractData.id,
|
||||||
|
}
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
}, 100 * i);
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
await Promise.all(promises).then(() => {
|
||||||
|
fs.writeFileSync("./data/contributors.json", JSON.stringify(backup, null, 2));
|
||||||
|
console.log("Exported");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
main();
|
||||||
26
scripts/import/contributors.js
Normal file
26
scripts/import/contributors.js
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
const Kredits = require('../../lib/kredits');
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
kredits = new Kredits(hre.ethers.provider, hre.ethers.provider.getSigner())
|
||||||
|
await kredits.init();
|
||||||
|
|
||||||
|
console.log(`Using Contributor at: ${kredits.Contributor.contract.address}`);
|
||||||
|
|
||||||
|
const data = fs.readFileSync("./data/contributors.json");
|
||||||
|
const contributors = JSON.parse(data);
|
||||||
|
|
||||||
|
const ids = Object.keys(contributors).map(k => parseInt(k)).sort();
|
||||||
|
for (const contributorId of ids) {
|
||||||
|
const contributor = contributors[contributorId.toString()];
|
||||||
|
const result = kredits.Contributor.contract.addContributor({
|
||||||
|
account: contributor.account,
|
||||||
|
hashDigest: contirbutor.hashDigest,
|
||||||
|
hashFunction: contributor.hashFunction,
|
||||||
|
hashSize: contributr.hashSize,
|
||||||
|
});
|
||||||
|
// await result.wait();
|
||||||
|
console.log(`Added contributor #${id}: ${result.hash}`);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
main();
|
||||||
Reference in New Issue
Block a user