merge master
This commit is contained in:
commit
c83a560e3b
@ -1,7 +1,7 @@
|
||||
---
|
||||
language: node_js
|
||||
node_js:
|
||||
- "lts/*"
|
||||
- "12"
|
||||
|
||||
sudo: false
|
||||
dist: xenial
|
||||
|
@ -34,6 +34,9 @@ Aragon CLI and Truffle need to be installed on your sytem as well:
|
||||
npm install -g @aragon/cli
|
||||
npm install -g truffle
|
||||
|
||||
_Note: `@aragon/cli` currently fails to install on node.js 14. Please use
|
||||
node.js 12 until the issue has been resolved upstream._
|
||||
|
||||
### Local development chain
|
||||
|
||||
For local development it is recommended to use
|
||||
|
@ -1,4 +1,3 @@
|
||||
{
|
||||
"4": "0x76e069b47b79442657eaf0555a32c6b16fa1b8b4",
|
||||
"69041181": "0x6Ad8CDF71C3E2AaD2712964097b475184a0dfDeF"
|
||||
"4": "0x76e069b47b79442657eaf0555a32c6b16fa1b8b4"
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
{
|
||||
"4": "0xc34edf7d11b7f8433d597f0bb0697acdff55ef14",
|
||||
"69041181": "0x356685A0d9d66d6e5dA80f50EC206Af8009C8b6F"
|
||||
"4": "0xc34edf7d11b7f8433d597f0bb0697acdff55ef14"
|
||||
}
|
@ -5,7 +5,7 @@ class Acl extends Base {
|
||||
hasPermission (fromAddress, contractAddress, roleID, params = null) {
|
||||
let roleHash = EthersUtils.keccak256(EthersUtils.toUtf8Bytes(roleID));
|
||||
|
||||
return this.functions.hasPermission(
|
||||
return this.hasPermission(
|
||||
fromAddress,
|
||||
contractAddress,
|
||||
roleHash,
|
||||
|
@ -1,10 +1,13 @@
|
||||
const deprecate = require('../utils/deprecate');
|
||||
|
||||
class Base {
|
||||
constructor (contract) {
|
||||
this.contract = contract;
|
||||
}
|
||||
|
||||
get functions () {
|
||||
return this.contract.functions;
|
||||
deprecate('The property `functions` is deprecated. contract functions are now directly defined on the ethers contract object. https://github.com/ethers-io/ethers.js/issues/920#issuecomment-650836642');
|
||||
return this.contract;
|
||||
}
|
||||
|
||||
get address () {
|
||||
|
@ -4,33 +4,33 @@ const deprecate = require('../utils/deprecate');
|
||||
|
||||
class Contribution extends Record {
|
||||
get count () {
|
||||
return this.functions.contributionsCount();
|
||||
return this.contract.contributionsCount();
|
||||
}
|
||||
|
||||
getById (id) {
|
||||
return this.functions.getContribution(id)
|
||||
return this.contract.getContribution(id)
|
||||
.then(data => {
|
||||
return this.ipfs.catAndMerge(data, ContributionSerializer.deserialize);
|
||||
});
|
||||
}
|
||||
|
||||
getData (id) {
|
||||
return this.functions.getContribution(id);
|
||||
return this.contract.getContribution(id);
|
||||
}
|
||||
|
||||
getByContributorId (contributorId) {
|
||||
return this.functions.getContributorAddressById(contributorId)
|
||||
return this.contract.getContributorAddressById(contributorId)
|
||||
.then(address => this.getByContributorAddress(address));
|
||||
}
|
||||
|
||||
getByContributorAddress (address) {
|
||||
return this.functions.balanceOf(address)
|
||||
return this.contract.balanceOf(address)
|
||||
.then(async (balance) => {
|
||||
const count = balance.toNumber();
|
||||
const contributions = [];
|
||||
|
||||
for (let index = 0; index < count; index++) {
|
||||
const id = await this.functions.tokenOfOwnerByIndex(address, index);
|
||||
const id = await this.contract.tokenOfOwnerByIndex(address, index);
|
||||
const contribution = await this.getById(id);
|
||||
contributions.push(contribution);
|
||||
}
|
||||
@ -58,7 +58,7 @@ class Contribution extends Record {
|
||||
ipfsHashAttr.hashSize,
|
||||
];
|
||||
|
||||
return this.functions.add(...contribution, callOptions);
|
||||
return this.contract.add(...contribution, callOptions);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -4,19 +4,20 @@ const formatKredits = require('../utils/format-kredits');
|
||||
|
||||
class Contributor extends Record {
|
||||
get count () {
|
||||
return this.functions.contributorsCount();
|
||||
return this.contract.contributorsCount();
|
||||
}
|
||||
|
||||
getById (id) {
|
||||
return this.functions.getContributorById(id)
|
||||
.then(data => {
|
||||
return this.contract.getContributorById(id)
|
||||
.then(contractData => {
|
||||
let data = {...contractData};
|
||||
data.balanceInt = formatKredits(data.balance);
|
||||
return this.ipfs.catAndMerge(data, ContributorSerializer.deserialize);
|
||||
});
|
||||
}
|
||||
|
||||
getData (id) {
|
||||
return this.functions.getContributorById(id);
|
||||
return this.contract.getContributorById(id);
|
||||
}
|
||||
|
||||
filterByAccount (search) {
|
||||
@ -61,7 +62,7 @@ class Contributor extends Record {
|
||||
ipfsHashAttr.hashSize,
|
||||
];
|
||||
|
||||
return this.functions.addContributor(...contributor, callOptions);
|
||||
return this.contract.addContributor(...contributor, callOptions);
|
||||
});
|
||||
}
|
||||
|
||||
@ -78,7 +79,7 @@ class Contributor extends Record {
|
||||
return this.ipfs
|
||||
.add(jsonStr)
|
||||
.then(ipfsHashAttr => {
|
||||
return this.functions.updateContributorProfileHash(
|
||||
return this.contract.updateContributorProfileHash(
|
||||
contributorId,
|
||||
ipfsHashAttr.hashDigest,
|
||||
ipfsHashAttr.hashFunction,
|
||||
|
@ -11,9 +11,9 @@ class Kernel extends Base {
|
||||
|
||||
getApp (appName) {
|
||||
if (appName === 'Acl') {
|
||||
return this.functions.acl();
|
||||
return this.contract.acl();
|
||||
}
|
||||
return this.functions.getApp(KERNEL_APP_ADDR_NAMESPACE, this.appNamehash(appName));
|
||||
return this.contract.getApp(KERNEL_APP_ADDR_NAMESPACE, this.appNamehash(appName));
|
||||
}
|
||||
|
||||
appNamehash (appName) {
|
||||
|
@ -4,11 +4,11 @@ const deprecate = require('../utils/deprecate');
|
||||
|
||||
class Proposal extends Record {
|
||||
get count () {
|
||||
return this.functions.proposalsCount();
|
||||
return this.contract.proposalsCount();
|
||||
}
|
||||
|
||||
getById (id) {
|
||||
return this.functions.getProposal(id)
|
||||
return this.contract.getProposal(id)
|
||||
.then(data => {
|
||||
return this.ipfs.catAndMerge(data, ContributionSerializer.deserialize);
|
||||
});
|
||||
@ -33,7 +33,7 @@ class Proposal extends Record {
|
||||
ipfsHashAttr.hashSize,
|
||||
];
|
||||
|
||||
return this.functions.addProposal(...proposal, callOptions);
|
||||
return this.contract.addProposal(...proposal, callOptions);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -30,11 +30,11 @@ class KreditsKit {
|
||||
appIdFor (contractName) {
|
||||
// see appIds in KreditsKit.sol for more details
|
||||
const knownContracts = ['Contribution', 'Contributor', 'Proposal', 'Reimbursement', 'Token'];
|
||||
return this.contract.functions.appIds(knownContracts.indexOf(contractName));
|
||||
return this.contract.appIds(knownContracts.indexOf(contractName));
|
||||
}
|
||||
|
||||
newDAO (options = {}) {
|
||||
return this.contract.functions.newInstance(options).then(transaction => {
|
||||
return this.contract.newInstance(options).then(transaction => {
|
||||
return transaction.wait().then(result => {
|
||||
const deployEvent = result.events.find(e => e.event === 'DeployInstance');
|
||||
return {
|
||||
|
@ -11,7 +11,8 @@ class IPFS {
|
||||
this._ipfsAPI = ipfsClient(config);
|
||||
}
|
||||
|
||||
catAndMerge (data, deserialize) {
|
||||
catAndMerge (contractData, deserialize) {
|
||||
let data = {...contractData}; // data from ethers.js is not extensible. this copy the attributes in a new object
|
||||
// if no hash details are found simply return the data; nothing to merge
|
||||
if (!data.hashSize || data.hashSize === 0) {
|
||||
return data;
|
||||
|
739
package-lock.json
generated
739
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kredits-contracts",
|
||||
"version": "5.5.0",
|
||||
"version": "6.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@ -43,6 +43,21 @@
|
||||
"@babel/highlight": "^7.8.3"
|
||||
}
|
||||
},
|
||||
"@babel/helper-module-imports": {
|
||||
"version": "7.10.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz",
|
||||
"integrity": "sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/types": "^7.10.4"
|
||||
}
|
||||
},
|
||||
"@babel/helper-plugin-utils": {
|
||||
"version": "7.10.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
|
||||
"integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
|
||||
"dev": true
|
||||
},
|
||||
"@babel/helper-validator-identifier": {
|
||||
"version": "7.9.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz",
|
||||
@ -97,6 +112,469 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"@babel/plugin-transform-runtime": {
|
||||
"version": "7.10.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.10.5.tgz",
|
||||
"integrity": "sha512-tV4V/FjElJ9lQtyjr5xD2IFFbgY46r7EeVu5a8CpEKT5laheHKSlFeHjpkPppW3PqzGLAuv5k2qZX5LgVZIX5w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-module-imports": "^7.10.4",
|
||||
"@babel/helper-plugin-utils": "^7.10.4",
|
||||
"resolve": "^1.8.1",
|
||||
"semver": "^5.5.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@babel/runtime": {
|
||||
"version": "7.10.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.5.tgz",
|
||||
"integrity": "sha512-otddXKhdNn7d0ptoFRHtMLa8LqDxLYwTjB4nYgM1yy5N6gU/MUf8zqyyLltCH3yAVitBzmwK4us+DD0l/MauAg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"regenerator-runtime": "^0.13.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"regenerator-runtime": {
|
||||
"version": "0.13.5",
|
||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz",
|
||||
"integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@babel/types": {
|
||||
"version": "7.10.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.5.tgz",
|
||||
"integrity": "sha512-ixV66KWfCI6GKoA/2H9v6bQdbfXEwwpOdQ8cRvb4F+eyvhlaHxWFMQB4+3d9QFJXZsiiiqVrewNV0DFEQpyT4Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-validator-identifier": "^7.10.4",
|
||||
"lodash": "^4.17.19",
|
||||
"to-fast-properties": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/helper-validator-identifier": {
|
||||
"version": "7.10.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz",
|
||||
"integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==",
|
||||
"dev": true
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.19",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
|
||||
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==",
|
||||
"dev": true
|
||||
},
|
||||
"to-fast-properties": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
|
||||
"integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@ethersproject/abi": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.1.tgz",
|
||||
"integrity": "sha512-9fqSa3jEYV4nN8tijW+jz4UnT/Ma9/b8y4+nHlsvuWqr32E2kYsT9SCIVpk/51iM6NOud7xsA6UxCox9zBeHKg==",
|
||||
"requires": {
|
||||
"@ethersproject/address": "^5.0.0",
|
||||
"@ethersproject/bignumber": "^5.0.0",
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/constants": "^5.0.0",
|
||||
"@ethersproject/hash": "^5.0.0",
|
||||
"@ethersproject/keccak256": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0",
|
||||
"@ethersproject/strings": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/abstract-provider": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.0.1.tgz",
|
||||
"integrity": "sha512-/KOw65ayviYPtKLqFE1qozeIJJlfI1wE/tNA+iKUPUai6bU6vg2tbfLFGarRTCQe3HoWV1t7xSsD/z9T9xg74g==",
|
||||
"requires": {
|
||||
"@ethersproject/bignumber": "^5.0.0",
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/networks": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0",
|
||||
"@ethersproject/transactions": "^5.0.0",
|
||||
"@ethersproject/web": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/abstract-signer": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.0.1.tgz",
|
||||
"integrity": "sha512-Rp8DP+cLcSNFkd1YhwPSBcgEWLRipNakitwIwHngAmhbo4zdiWgALD/OLqdQ7SKF75CufF1W4BCuXcQgiWaRow==",
|
||||
"requires": {
|
||||
"@ethersproject/abstract-provider": "^5.0.0",
|
||||
"@ethersproject/bignumber": "^5.0.0",
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/address": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.1.tgz",
|
||||
"integrity": "sha512-kfQtXpBP2pI2TfoRRAYv8grHGiYw8U0c1KbMsC58/W33TIBy7gFSf/oAzOd94lNzdIUenKU0OuSzrHQfVcDDDA==",
|
||||
"requires": {
|
||||
"@ethersproject/bignumber": "^5.0.0",
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/keccak256": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/rlp": "^5.0.0",
|
||||
"bn.js": "^4.4.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/base64": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.0.1.tgz",
|
||||
"integrity": "sha512-WZDa+TYl6BQfUm9EQIDDfJFL0GiuYXNZPIWoiZx3uds7P1XMsvcW3k71AyjYUxIkU5AKW7awwPbzCbBeP1uXsA==",
|
||||
"requires": {
|
||||
"@ethersproject/bytes": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/basex": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.0.1.tgz",
|
||||
"integrity": "sha512-ssL2+p/A5bZgkZkiWy0iQDVz2mVJxZfzpf7dpw8t0sKF9VpoM3ZiMthRapH/QBhd4Rr6TNbr619pFLAGmMi9Ug==",
|
||||
"requires": {
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/bignumber": {
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.4.tgz",
|
||||
"integrity": "sha512-fgfwehdxS4BPRvq2B+joKqchW2E2cV3DE+O/DhG7jH3m2blM1VIzjtIOtJNjNI/YCgkygGjT1DaZS1j29RAwHw==",
|
||||
"requires": {
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0",
|
||||
"bn.js": "^4.4.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/bytes": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.2.tgz",
|
||||
"integrity": "sha512-QLE5zCreNv7KGh0AsXdvmdOYcWSJbnR654M+dLyY90g3D0ehVDSf+wxzG/GmWa79ESsqo/cWC1kJA1Vrcq7GFw==",
|
||||
"requires": {
|
||||
"@ethersproject/logger": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/constants": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.1.tgz",
|
||||
"integrity": "sha512-Xec07hFCPN4wfC3WDiRay7KipkApl2msiKTrBHCuAwNMOM8M92+mlQp8tgfEL51DPwCZkmdk1f02kArc6caVSw==",
|
||||
"requires": {
|
||||
"@ethersproject/bignumber": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/contracts": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.0.1.tgz",
|
||||
"integrity": "sha512-1uPajmkvw3Oy/dxs5TKUsGaXzQ3s5qiXKSVpw9ZrhGG6fMRO3gNyUA+uSWk9IXK0ulj5P95F7vW8HmYOkzep/Q==",
|
||||
"requires": {
|
||||
"@ethersproject/abi": "^5.0.0",
|
||||
"@ethersproject/abstract-provider": "^5.0.0",
|
||||
"@ethersproject/abstract-signer": "^5.0.0",
|
||||
"@ethersproject/address": "^5.0.0",
|
||||
"@ethersproject/bignumber": "^5.0.0",
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/constants": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/hash": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.1.tgz",
|
||||
"integrity": "sha512-1ByUXYvkszrSSks07xctBtZfpFnIVmftxWlAAnguxh6Q65vKECd/EPi5uI5xVOvnrYMH9Vb8MK1SofPX/6fArQ==",
|
||||
"requires": {
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/keccak256": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/strings": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/hdnode": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.0.1.tgz",
|
||||
"integrity": "sha512-L2OZP4SKKxNtHUdwfK8cND09kHRH62ncxXW33WAJU9shKo8Sbz31HVqSdov84bMAGm8QfEKZbfbAJV/7DM6DjQ==",
|
||||
"requires": {
|
||||
"@ethersproject/abstract-signer": "^5.0.0",
|
||||
"@ethersproject/basex": "^5.0.0",
|
||||
"@ethersproject/bignumber": "^5.0.0",
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/pbkdf2": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0",
|
||||
"@ethersproject/sha2": "^5.0.0",
|
||||
"@ethersproject/signing-key": "^5.0.0",
|
||||
"@ethersproject/strings": "^5.0.0",
|
||||
"@ethersproject/transactions": "^5.0.0",
|
||||
"@ethersproject/wordlists": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/json-wallets": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.0.1.tgz",
|
||||
"integrity": "sha512-QjqQCh1a0a6wRVHdnqVccCLWX0vAgxnvGZeGqpOk2NbyNE8HTzV7GpOE+4LU+iCc8oonfy1gYd4hpsf+iEUWGg==",
|
||||
"requires": {
|
||||
"@ethersproject/abstract-signer": "^5.0.0",
|
||||
"@ethersproject/address": "^5.0.0",
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/hdnode": "^5.0.0",
|
||||
"@ethersproject/keccak256": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/pbkdf2": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0",
|
||||
"@ethersproject/random": "^5.0.0",
|
||||
"@ethersproject/strings": "^5.0.0",
|
||||
"@ethersproject/transactions": "^5.0.0",
|
||||
"aes-js": "3.0.0",
|
||||
"scrypt-js": "3.0.1",
|
||||
"uuid": "2.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"aes-js": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz",
|
||||
"integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0="
|
||||
},
|
||||
"uuid": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz",
|
||||
"integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w="
|
||||
}
|
||||
}
|
||||
},
|
||||
"@ethersproject/keccak256": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.1.tgz",
|
||||
"integrity": "sha512-AtFm/4qHRQUvZcG3WYmaT7zV79dz72+N01w0XphcIBaD/7UZXyW85Uf08sirVlckHmh9fvc4UDWyHiroKsBT6Q==",
|
||||
"requires": {
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"js-sha3": "0.5.7"
|
||||
}
|
||||
},
|
||||
"@ethersproject/logger": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.2.tgz",
|
||||
"integrity": "sha512-NQe3O1/Nwkcp6bto6hsTvrcCeR/cOGK+RhOMn0Zi2FND6gdWsf1g+5ie8gQ1REqDX4MTGP/Y131dZas985ls/g=="
|
||||
},
|
||||
"@ethersproject/networks": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.0.1.tgz",
|
||||
"integrity": "sha512-Pe34JCTC6Apm/DkK3z97xotvEyu9YHKIFlDIu5hGV6yFDb4/sUfY2SHKYSGdUrV0418ZZVrwYDveJtBFMmYu2Q==",
|
||||
"requires": {
|
||||
"@ethersproject/logger": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/pbkdf2": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.0.1.tgz",
|
||||
"integrity": "sha512-4wc8Aov0iJmiomu6Dv1JNGOlhm3L7omITjLmChz/vgeDnW4Unv4J/nGybCeWKgY4hnjyQMVXkdkQ15BCRbkaYg==",
|
||||
"requires": {
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/sha2": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/properties": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.1.tgz",
|
||||
"integrity": "sha512-b3VZ/NpYIf64/hFXeWNxVCbY1xoMPIYM3n6Qnu6Ayr3bLt1olFPQfAaaRB0aOsLz7tMtmkT3DrA1KG/IrOgBRw==",
|
||||
"requires": {
|
||||
"@ethersproject/logger": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/providers": {
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.0.4.tgz",
|
||||
"integrity": "sha512-bnju7KB3v+NDcbHYxbZJawb20WRh/FLhop/XvHBmGUAbYSCV+cRftRvvgsdeyJOApjsCioMtmIe5iYkRxDx/DA==",
|
||||
"requires": {
|
||||
"@ethersproject/abstract-provider": "^5.0.0",
|
||||
"@ethersproject/abstract-signer": "^5.0.0",
|
||||
"@ethersproject/address": "^5.0.0",
|
||||
"@ethersproject/bignumber": "^5.0.0",
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/constants": "^5.0.0",
|
||||
"@ethersproject/hash": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/networks": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0",
|
||||
"@ethersproject/random": "^5.0.0",
|
||||
"@ethersproject/rlp": "^5.0.0",
|
||||
"@ethersproject/strings": "^5.0.0",
|
||||
"@ethersproject/transactions": "^5.0.0",
|
||||
"@ethersproject/web": "^5.0.0",
|
||||
"ws": "7.2.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"ws": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.2.3.tgz",
|
||||
"integrity": "sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"@ethersproject/random": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.0.1.tgz",
|
||||
"integrity": "sha512-nYzNhcp5Th4dCocV3yceZmh80bRmSQxqNRgND7Y/YgEgYJSSnknScpfRHACG//kgbsY8zui8ajXJeEnzS7yFbQ==",
|
||||
"requires": {
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/rlp": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.1.tgz",
|
||||
"integrity": "sha512-3F8XE1zS4w8w4xiK1hMtFuVs6UnhQlmrEHLT85GanqK8vG5wGi81IQmkukL9tQIu2a5jykoO46ibja+6N1fpFg==",
|
||||
"requires": {
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/sha2": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.0.1.tgz",
|
||||
"integrity": "sha512-5wNdULNDMJKwyzqrTH66e2TZPZTSqqluS7RNtuuuQSTP+yIALoID7ewLjDoj31g4kZyq/pqQbackKJLOXejTKw==",
|
||||
"requires": {
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"hash.js": "1.1.3"
|
||||
}
|
||||
},
|
||||
"@ethersproject/signing-key": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.2.tgz",
|
||||
"integrity": "sha512-kgpCdtgoLoKXJTwJPw3ggRW7EO93YCQ98zY8hBpIb4OK3FxFCR3UUjlrGEwjMnLHDjFrxpKCeJagGWf477RyMQ==",
|
||||
"requires": {
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0",
|
||||
"elliptic": "6.5.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"elliptic": {
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",
|
||||
"integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",
|
||||
"requires": {
|
||||
"bn.js": "^4.4.0",
|
||||
"brorand": "^1.0.1",
|
||||
"hash.js": "^1.0.0",
|
||||
"hmac-drbg": "^1.0.0",
|
||||
"inherits": "^2.0.1",
|
||||
"minimalistic-assert": "^1.0.0",
|
||||
"minimalistic-crypto-utils": "^1.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@ethersproject/solidity": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.0.1.tgz",
|
||||
"integrity": "sha512-3L+xI1LaJmd2zBJxnK9Y4cd1vb2aJLFvL6fxvjWpzcMiFiZ4dbPwj3kharv5f5mAlbGwAs6NiPJaFWvbOpm96Q==",
|
||||
"requires": {
|
||||
"@ethersproject/bignumber": "^5.0.0",
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/keccak256": "^5.0.0",
|
||||
"@ethersproject/sha2": "^5.0.0",
|
||||
"@ethersproject/strings": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/strings": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.1.tgz",
|
||||
"integrity": "sha512-N8LxdHGBT7GZdogkEOV5xKXYTz5PNHuNzcxLNPYfH3kpvWSyXshZBgAz8YE1a8sMZagGj+Ic6d3mHijdCTSkGA==",
|
||||
"requires": {
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/constants": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/transactions": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.1.tgz",
|
||||
"integrity": "sha512-IGc6/5hri3PrqR/ZCj89osDiq3Lt0CSrycn6vlRl8SjpBKYDdcT+Ru5xkeC7YcsnqcdBmTL+jyR3SLudU+x2Kw==",
|
||||
"requires": {
|
||||
"@ethersproject/address": "^5.0.0",
|
||||
"@ethersproject/bignumber": "^5.0.0",
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/constants": "^5.0.0",
|
||||
"@ethersproject/keccak256": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0",
|
||||
"@ethersproject/rlp": "^5.0.0",
|
||||
"@ethersproject/signing-key": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/units": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.0.1.tgz",
|
||||
"integrity": "sha512-7J7Jmm4hMZ+yFiqEd7D5oeVK/V74GDwQlT0Om1yxXLYX6UPcV5ChHkUz/xpHPT9JXQlQ+2D69HBf1dzvdflrmQ==",
|
||||
"requires": {
|
||||
"@ethersproject/bignumber": "^5.0.0",
|
||||
"@ethersproject/constants": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/wallet": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.0.1.tgz",
|
||||
"integrity": "sha512-1/QPpFngJtUGtdVOLSoIN3vf+zEWyEVxQ0lhRCwGkiBqL2SoVoDHB7/nCfcv7wwlZkdnegFfo/8DxeyYjTZN7w==",
|
||||
"requires": {
|
||||
"@ethersproject/abstract-provider": "^5.0.0",
|
||||
"@ethersproject/abstract-signer": "^5.0.0",
|
||||
"@ethersproject/address": "^5.0.0",
|
||||
"@ethersproject/bignumber": "^5.0.0",
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/hash": "^5.0.0",
|
||||
"@ethersproject/hdnode": "^5.0.0",
|
||||
"@ethersproject/json-wallets": "^5.0.0",
|
||||
"@ethersproject/keccak256": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0",
|
||||
"@ethersproject/random": "^5.0.0",
|
||||
"@ethersproject/signing-key": "^5.0.0",
|
||||
"@ethersproject/transactions": "^5.0.0",
|
||||
"@ethersproject/wordlists": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/web": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.0.1.tgz",
|
||||
"integrity": "sha512-lWPg8BR6KoyiIKYRIM6j+XO9bT9vGM1JnxFj2HmhIvOrOjba7ZRd8ANBOsDVGfw5igLUdfqAUOf9WpSsH//TzA==",
|
||||
"requires": {
|
||||
"@ethersproject/base64": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0",
|
||||
"@ethersproject/strings": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@ethersproject/wordlists": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.0.1.tgz",
|
||||
"integrity": "sha512-R7boLmpewucz5v4jD7cWwI0BGHR/DstiZtjdhUOft6XdMqM1OGb1UTL0GBQeS4vDXzCLuJEHddjJ69beGVN/4Q==",
|
||||
"requires": {
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/hash": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0",
|
||||
"@ethersproject/strings": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@kosmos/schemas": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@kosmos/schemas/-/schemas-3.0.0.tgz",
|
||||
@ -481,6 +959,12 @@
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
||||
},
|
||||
"await-semaphore": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/await-semaphore/-/await-semaphore-0.1.3.tgz",
|
||||
"integrity": "sha512-d1W2aNSYcz/sxYO4pMGX9vq65qOTu0P800epMud+6cYYX0QcT7zyqcxec3VWzpgvdXo57UWmVbZpLMjX2m1I7Q==",
|
||||
"dev": true
|
||||
},
|
||||
"aws-sign2": {
|
||||
"version": "0.7.0",
|
||||
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
|
||||
@ -1416,6 +1900,12 @@
|
||||
"safe-buffer": "^5.1.2"
|
||||
}
|
||||
},
|
||||
"btoa": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz",
|
||||
"integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==",
|
||||
"dev": true
|
||||
},
|
||||
"buffer": {
|
||||
"version": "5.4.3",
|
||||
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz",
|
||||
@ -2300,6 +2790,7 @@
|
||||
"version": "6.5.2",
|
||||
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz",
|
||||
"integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bn.js": "^4.4.0",
|
||||
"brorand": "^1.0.1",
|
||||
@ -2866,21 +3357,61 @@
|
||||
"integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=",
|
||||
"dev": true
|
||||
},
|
||||
"eth-block-tracker": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-3.0.1.tgz",
|
||||
"integrity": "sha512-WUVxWLuhMmsfenfZvFO5sbl1qFY2IqUlw/FPVmjjdElpqLsZtSG+wPe9Dz7W/sB6e80HgFKknOmKk2eNlznHug==",
|
||||
"eth-ens-namehash": {
|
||||
"version": "2.0.8",
|
||||
"resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz",
|
||||
"integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"eth-query": "^2.1.0",
|
||||
"ethereumjs-tx": "^1.3.3",
|
||||
"ethereumjs-util": "^5.1.3",
|
||||
"ethjs-util": "^0.1.3",
|
||||
"json-rpc-engine": "^3.6.0",
|
||||
"pify": "^2.3.0",
|
||||
"tape": "^4.6.3"
|
||||
"idna-uts46-hx": "^2.3.1",
|
||||
"js-sha3": "^0.5.7"
|
||||
}
|
||||
},
|
||||
"eth-json-rpc-errors": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/eth-json-rpc-errors/-/eth-json-rpc-errors-1.1.1.tgz",
|
||||
"integrity": "sha512-WT5shJ5KfNqHi9jOZD+ID8I1kuYWNrigtZat7GOQkvwo99f8SzAVaEcWhJUv656WiZOAg3P1RiJQANtUmDmbIg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fast-safe-stringify": "^2.0.6"
|
||||
}
|
||||
},
|
||||
"eth-json-rpc-filters": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/eth-json-rpc-filters/-/eth-json-rpc-filters-4.1.1.tgz",
|
||||
"integrity": "sha512-GkXb2h6STznD+AmMzblwXgm1JMvjdK9PTIXG7BvIkTlXQ9g0QOxuU1iQRYHoslF9S30BYBSoLSisAYPdLggW+A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"await-semaphore": "^0.1.3",
|
||||
"eth-json-rpc-middleware": "^4.1.4",
|
||||
"eth-query": "^2.1.2",
|
||||
"json-rpc-engine": "^5.1.3",
|
||||
"lodash.flatmap": "^4.5.0",
|
||||
"safe-event-emitter": "^1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"eth-json-rpc-middleware": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-4.4.1.tgz",
|
||||
"integrity": "sha512-yoSuRgEYYGFdVeZg3poWOwAlRI+MoBIltmOB86MtpoZjvLbou9EB/qWMOWSmH2ryCWLW97VYY6NWsmWm3OAA7A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"btoa": "^1.2.1",
|
||||
"clone": "^2.1.1",
|
||||
"eth-json-rpc-errors": "^1.0.1",
|
||||
"eth-query": "^2.1.2",
|
||||
"eth-sig-util": "^1.4.2",
|
||||
"ethereumjs-block": "^1.6.0",
|
||||
"ethereumjs-tx": "^1.3.7",
|
||||
"ethereumjs-util": "^5.1.2",
|
||||
"ethereumjs-vm": "^2.6.0",
|
||||
"fetch-ponyfill": "^4.0.0",
|
||||
"json-rpc-engine": "^5.1.3",
|
||||
"json-stable-stringify": "^1.0.1",
|
||||
"pify": "^3.0.0",
|
||||
"safe-event-emitter": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"ethereumjs-util": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz",
|
||||
@ -2895,17 +3426,36 @@
|
||||
"safe-buffer": "^5.1.1",
|
||||
"secp256k1": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"json-rpc-engine": {
|
||||
"version": "5.1.8",
|
||||
"resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-5.1.8.tgz",
|
||||
"integrity": "sha512-vTBSDEPJV1fPAsbm2g5sEuPjsgLdiab2f1CTn2PyRr8nxggUpA996PDlNQDsM0gnrA99F8KIBLq2nIKrOFl1Mg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"async": "^2.0.1",
|
||||
"eth-json-rpc-errors": "^2.0.1",
|
||||
"promise-to-callback": "^1.0.0",
|
||||
"safe-event-emitter": "^1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"eth-json-rpc-errors": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/eth-json-rpc-errors/-/eth-json-rpc-errors-2.0.2.tgz",
|
||||
"integrity": "sha512-uBCRM2w2ewusRHGxN8JhcuOb2RN3ueAOYH/0BhqdFmQkZx5lj5+fLKTz0mIVOzd4FG5/kUksCzCD7eTEim6gaA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fast-safe-stringify": "^2.0.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"eth-ens-namehash": {
|
||||
"version": "2.0.8",
|
||||
"resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz",
|
||||
"integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"idna-uts46-hx": "^2.3.1",
|
||||
"js-sha3": "^0.5.7"
|
||||
"pify": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
|
||||
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"eth-json-rpc-infura": {
|
||||
@ -3322,31 +3872,39 @@
|
||||
}
|
||||
},
|
||||
"ethers": {
|
||||
"version": "4.0.47",
|
||||
"resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.47.tgz",
|
||||
"integrity": "sha512-hssRYhngV4hiDNeZmVU/k5/E8xmLG8UpcNUzg6mb7lqhgpFPH/t7nuv20RjRrEf0gblzvi2XwR5Te+V3ZFc9pQ==",
|
||||
"version": "5.0.5",
|
||||
"resolved": "https://registry.npmjs.org/ethers/-/ethers-5.0.5.tgz",
|
||||
"integrity": "sha512-hkVI7fi16ADWTctYMEfamU39hoR+JpkdEI7LH8PC7Bhl0Dp8y8dqFJ948pSEuuPJI5NR/L4+V6y2Alvyu+zROw==",
|
||||
"requires": {
|
||||
"aes-js": "3.0.0",
|
||||
"bn.js": "^4.4.0",
|
||||
"elliptic": "6.5.2",
|
||||
"hash.js": "1.1.3",
|
||||
"js-sha3": "0.5.7",
|
||||
"scrypt-js": "2.0.4",
|
||||
"setimmediate": "1.0.4",
|
||||
"uuid": "2.0.1",
|
||||
"xmlhttprequest": "1.8.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"aes-js": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz",
|
||||
"integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0="
|
||||
},
|
||||
"uuid": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz",
|
||||
"integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w="
|
||||
}
|
||||
"@ethersproject/abi": "^5.0.0",
|
||||
"@ethersproject/abstract-provider": "^5.0.0",
|
||||
"@ethersproject/abstract-signer": "^5.0.0",
|
||||
"@ethersproject/address": "^5.0.0",
|
||||
"@ethersproject/base64": "^5.0.0",
|
||||
"@ethersproject/bignumber": "^5.0.0",
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/constants": "^5.0.0",
|
||||
"@ethersproject/contracts": "^5.0.0",
|
||||
"@ethersproject/hash": "^5.0.0",
|
||||
"@ethersproject/hdnode": "^5.0.0",
|
||||
"@ethersproject/json-wallets": "^5.0.0",
|
||||
"@ethersproject/keccak256": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/networks": "^5.0.0",
|
||||
"@ethersproject/pbkdf2": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0",
|
||||
"@ethersproject/providers": "^5.0.0",
|
||||
"@ethersproject/random": "^5.0.0",
|
||||
"@ethersproject/rlp": "^5.0.0",
|
||||
"@ethersproject/sha2": "^5.0.0",
|
||||
"@ethersproject/signing-key": "^5.0.0",
|
||||
"@ethersproject/solidity": "^5.0.0",
|
||||
"@ethersproject/strings": "^5.0.0",
|
||||
"@ethersproject/transactions": "^5.0.0",
|
||||
"@ethersproject/units": "^5.0.0",
|
||||
"@ethersproject/wallet": "^5.0.0",
|
||||
"@ethersproject/web": "^5.0.0",
|
||||
"@ethersproject/wordlists": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"ethjs-unit": {
|
||||
@ -3540,6 +4098,12 @@
|
||||
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
|
||||
"dev": true
|
||||
},
|
||||
"fast-safe-stringify": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz",
|
||||
"integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==",
|
||||
"dev": true
|
||||
},
|
||||
"fd-slicer": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
|
||||
@ -5156,6 +5720,12 @@
|
||||
"integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=",
|
||||
"dev": true
|
||||
},
|
||||
"lodash.flatmap": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.flatmap/-/lodash.flatmap-4.5.0.tgz",
|
||||
"integrity": "sha1-74y/QI9uSCaGYzRTBcaswLd4cC4=",
|
||||
"dev": true
|
||||
},
|
||||
"loose-envify": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||
@ -6713,9 +7283,9 @@
|
||||
}
|
||||
},
|
||||
"scrypt-js": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz",
|
||||
"integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw=="
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz",
|
||||
"integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA=="
|
||||
},
|
||||
"scrypt.js": {
|
||||
"version": "0.3.0",
|
||||
@ -6885,7 +7455,8 @@
|
||||
"setimmediate": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz",
|
||||
"integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48="
|
||||
"integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=",
|
||||
"dev": true
|
||||
},
|
||||
"setprototypeof": {
|
||||
"version": "1.1.1",
|
||||
@ -8716,8 +9287,10 @@
|
||||
"backoff": "^2.5.0",
|
||||
"clone": "^2.0.0",
|
||||
"cross-fetch": "^2.1.0",
|
||||
"eth-block-tracker": "^3.0.0",
|
||||
"eth-block-tracker": "^4.2.0",
|
||||
"eth-json-rpc-filters": "^4.0.2",
|
||||
"eth-json-rpc-infura": "^3.1.0",
|
||||
"eth-json-rpc-middleware": "^4.1.1",
|
||||
"eth-sig-util": "^1.4.2",
|
||||
"ethereumjs-block": "^1.2.2",
|
||||
"ethereumjs-tx": "^1.2.0",
|
||||
@ -8734,6 +9307,42 @@
|
||||
"xtend": "^4.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"eth-block-tracker": {
|
||||
"version": "4.4.3",
|
||||
"resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-4.4.3.tgz",
|
||||
"integrity": "sha512-A8tG4Z4iNg4mw5tP1Vung9N9IjgMNqpiMoJ/FouSFwNCGHv2X0mmOYwtQOJzki6XN7r7Tyo01S29p7b224I4jw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/plugin-transform-runtime": "^7.5.5",
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"eth-query": "^2.1.0",
|
||||
"json-rpc-random-id": "^1.0.1",
|
||||
"pify": "^3.0.0",
|
||||
"safe-event-emitter": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"eth-json-rpc-middleware": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-4.4.1.tgz",
|
||||
"integrity": "sha512-yoSuRgEYYGFdVeZg3poWOwAlRI+MoBIltmOB86MtpoZjvLbou9EB/qWMOWSmH2ryCWLW97VYY6NWsmWm3OAA7A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"btoa": "^1.2.1",
|
||||
"clone": "^2.1.1",
|
||||
"eth-json-rpc-errors": "^1.0.1",
|
||||
"eth-query": "^2.1.2",
|
||||
"eth-sig-util": "^1.4.2",
|
||||
"ethereumjs-block": "^1.6.0",
|
||||
"ethereumjs-tx": "^1.3.7",
|
||||
"ethereumjs-util": "^5.1.2",
|
||||
"ethereumjs-vm": "^2.6.0",
|
||||
"fetch-ponyfill": "^4.0.0",
|
||||
"json-rpc-engine": "^5.1.3",
|
||||
"json-stable-stringify": "^1.0.1",
|
||||
"pify": "^3.0.0",
|
||||
"safe-event-emitter": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"ethereumjs-util": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz",
|
||||
@ -8749,6 +9358,35 @@
|
||||
"secp256k1": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"json-rpc-engine": {
|
||||
"version": "5.1.8",
|
||||
"resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-5.1.8.tgz",
|
||||
"integrity": "sha512-vTBSDEPJV1fPAsbm2g5sEuPjsgLdiab2f1CTn2PyRr8nxggUpA996PDlNQDsM0gnrA99F8KIBLq2nIKrOFl1Mg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"async": "^2.0.1",
|
||||
"eth-json-rpc-errors": "^2.0.1",
|
||||
"promise-to-callback": "^1.0.0",
|
||||
"safe-event-emitter": "^1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"eth-json-rpc-errors": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/eth-json-rpc-errors/-/eth-json-rpc-errors-2.0.2.tgz",
|
||||
"integrity": "sha512-uBCRM2w2ewusRHGxN8JhcuOb2RN3ueAOYH/0BhqdFmQkZx5lj5+fLKTz0mIVOzd4FG5/kUksCzCD7eTEim6gaA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fast-safe-stringify": "^2.0.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"pify": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
|
||||
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
|
||||
"dev": true
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "2.3.7",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
|
||||
@ -9042,7 +9680,8 @@
|
||||
"xmlhttprequest": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz",
|
||||
"integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw="
|
||||
"integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=",
|
||||
"dev": true
|
||||
},
|
||||
"xtend": {
|
||||
"version": "4.0.1",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kredits-contracts",
|
||||
"version": "5.5.0",
|
||||
"version": "6.0.0",
|
||||
"description": "Ethereum contracts and npm wrapper for Kredits",
|
||||
"main": "./lib/kredits.js",
|
||||
"directories": {
|
||||
@ -60,7 +60,7 @@
|
||||
"yargs": "^15.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethers": "^4.0.47",
|
||||
"ethers": "^5.0.2",
|
||||
"ipfs-http-client": "^41.0.1",
|
||||
"@kosmos/schemas": "^3.0.0",
|
||||
"node-fetch": "^2.6.0",
|
||||
|
@ -19,10 +19,10 @@ module.exports = async function(callback) {
|
||||
let contributorAccount;
|
||||
if (contributor.length < 5) {
|
||||
contributorId = contributor;
|
||||
contributorAccount = await kredits.Contributor.functions.getContributorAddressById(contributor);
|
||||
contributorAccount = await kredits.Contributor.contract.getContributorAddressById(contributor);
|
||||
} else {
|
||||
contributorAccount = contributor;
|
||||
contributorId = await kredits.Contributor.functions.getContributorIdByAddress(contributor);
|
||||
contributorId = await kredits.Contributor.contract.getContributorIdByAddress(contributor);
|
||||
}
|
||||
|
||||
console.log(`Creating a contribution for contributor account ${contributorAccount} ID: ${contributorId}`);
|
||||
@ -45,7 +45,7 @@ module.exports = async function(callback) {
|
||||
console.log("\nAdding contribution:");
|
||||
console.log(contributionAttributes);
|
||||
|
||||
kredits.Contribution.addContribution(contributionAttributes, { gasLimit: 300000 })
|
||||
kredits.Contribution.add(contributionAttributes, { gasLimit: 300000 })
|
||||
.then(result => {
|
||||
console.log("\n\nResult:");
|
||||
console.log(result);
|
||||
|
@ -19,10 +19,10 @@ module.exports = async function(callback) {
|
||||
let contributorAccount;
|
||||
if (contributor.length < 5) {
|
||||
contributorId = contributor;
|
||||
contributorAccount = await kredits.Contributor.functions.getContributorAddressById(contributor);
|
||||
contributorAccount = await kredits.Contributor.contract.getContributorAddressById(contributor);
|
||||
} else {
|
||||
contributorAccount = contributor;
|
||||
contributorId = await kredits.Contributor.functions.getContributorIdByAddress(contributor);
|
||||
contributorId = await kredits.Contributor.contract.getContributorIdByAddress(contributor);
|
||||
}
|
||||
console.log(`Creating a proposal for contributor ID #${contributorId} account: ${contributorAccount}`);
|
||||
|
||||
|
@ -31,7 +31,7 @@ module.exports = async function(callback) {
|
||||
|
||||
if (c.contributorId === recipient && confirmed && !c.vetoed && !c.claimed) {
|
||||
console.log(`Claiming contribution ID=${c.id}`);
|
||||
return kredits.Contribution.functions.claim(c.id, { gasLimit: 500000 }).then(tx => {
|
||||
return kredits.Contribution.contract.claim(c.id, { gasLimit: 500000 }).then(tx => {
|
||||
table.push([
|
||||
c.id.toString(),
|
||||
`${c.description}`,
|
||||
|
@ -17,7 +17,7 @@ module.exports = async function(callback) {
|
||||
|
||||
method = await promptly.prompt('Function: ');
|
||||
}
|
||||
if (!contractWrapper[method] && !contractWrapper.functions[method]) {
|
||||
if (!contractWrapper[method] && !contractWrapper.contract[method]) {
|
||||
callback(new Error(`Method ${method} is not defined on ${contractName}`));
|
||||
return;
|
||||
}
|
||||
@ -33,7 +33,7 @@ module.exports = async function(callback) {
|
||||
if (contractWrapper[method]) {
|
||||
func = contractWrapper[method];
|
||||
} else {
|
||||
func = contractWrapper.functions[method];
|
||||
func = contractWrapper.contract[method];
|
||||
}
|
||||
func.apply(contractWrapper, args).then((result) => {
|
||||
console.log("\nResult:");
|
||||
|
@ -1,9 +1,12 @@
|
||||
const knownDAOAddresses = require('../lib/addresses/dao.json');
|
||||
const knownKreditsKitAddresses = require('../lib/addresses/KreditsKit.json');
|
||||
const getNetworkId = require('./helpers/networkid.js')
|
||||
const ethers = require('ethers');
|
||||
|
||||
module.exports = async function(callback) {
|
||||
const networkId = await getNetworkId(web3)
|
||||
const provider = new ethers.providers.Web3Provider(web3.currentProvider);
|
||||
let network = await provider.getNetwork();
|
||||
let networkId = network.chainId;
|
||||
|
||||
console.log('# All known DAO addresses');
|
||||
Object.keys(knownDAOAddresses).forEach((networkId) => {
|
||||
|
@ -3,10 +3,10 @@ const deployDAOFactory = require('@aragon/os/scripts/deploy-daofactory.js')
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const argv = require('yargs').argv
|
||||
const namehash = require('ethers').utils.namehash;
|
||||
const ethers = require('ethers');
|
||||
const namehash = ethers.utils.namehash;
|
||||
|
||||
const fileInject = require('./helpers/file_inject.js')
|
||||
const getNetworkId = require('./helpers/networkid.js')
|
||||
|
||||
const DAOFactory = artifacts.require('DAOFactory')
|
||||
const KreditsKit = artifacts.require('KreditsKit')
|
||||
@ -26,9 +26,10 @@ const daoFactoryAddress = kreditsArappConfig.daoFactory || argv['daoFactory']
|
||||
|
||||
const ensAddr = arapp.environments[environment].registry || argv['ensAddress']
|
||||
|
||||
|
||||
module.exports = async function(callback) {
|
||||
const networkId = await getNetworkId(web3)
|
||||
const provider = new ethers.providers.Web3Provider(web3.currentProvider);
|
||||
const network = await provider.getNetwork();
|
||||
const networkId = network.chainId;
|
||||
console.log(`Deploying to networkId: ${networkId}`)
|
||||
|
||||
if (!ensAddr) {
|
||||
|
@ -1,6 +1,5 @@
|
||||
const argv = require('yargs').argv;
|
||||
const ethers = require('ethers');
|
||||
const getNetworkId = require('./networkid.js');
|
||||
const Kredits = require('../../lib/kredits');
|
||||
|
||||
const arapp = require('../../arapp.json');
|
||||
@ -10,7 +9,7 @@ const apm = arapp.environments[environment].apm;
|
||||
module.exports = async function(web3) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const provider = new ethers.providers.Web3Provider(web3.currentProvider);
|
||||
let signer = provider.getSigner();
|
||||
const signer = provider.getSigner();
|
||||
// checking if siner supports signing transactions
|
||||
signer.getAddress().then(_ => {
|
||||
new Kredits(provider, signer, { apm }).init().then(kredits => {
|
||||
|
@ -1,17 +0,0 @@
|
||||
module.exports = function(web3) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let func;
|
||||
if (web3.version.getNetwork) {
|
||||
func = web3.version.getNetwork;
|
||||
} else {
|
||||
func = web3.eth.net.getId;
|
||||
}
|
||||
func((err, network) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
resolve(network);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
@ -1,12 +1,14 @@
|
||||
const fs = require('fs');
|
||||
const getNetworkId = require('./networkid.js');
|
||||
const ethers = require('ethers');
|
||||
|
||||
module.exports = async function(callback) {
|
||||
const daoAddressPath = 'lib/addresses/dao.json';
|
||||
|
||||
// TODO maybe do the same for KreditsKit address file
|
||||
try {
|
||||
const networkId = await getNetworkId(web3);
|
||||
const provider = new ethers.providers.Web3Provider(web3.currentProvider);
|
||||
const network = await provider.getNetwork();
|
||||
const networkId = network.chainId;
|
||||
const daoAddresses = JSON.parse(fs.readFileSync(daoAddressPath));
|
||||
const oldNetworkId = Math.max(...Object.keys(daoAddresses).map(a => parseInt(a)));
|
||||
const localDaoAddress = daoAddresses[oldNetworkId];
|
||||
|
@ -41,8 +41,8 @@ module.exports = async function(callback) {
|
||||
|
||||
console.log(table.toString());
|
||||
|
||||
let totalKreditsEarnedUnConfirmed = await kredits.Contribution.functions.totalKreditsEarned(false);
|
||||
let totalKreditsEarnedConfirmed = await kredits.Contribution.functions.totalKreditsEarned(true);
|
||||
let totalKreditsEarnedUnConfirmed = await kredits.Contribution.contract.totalKreditsEarned(false);
|
||||
let totalKreditsEarnedConfirmed = await kredits.Contribution.contract.totalKreditsEarned(true);
|
||||
console.log(`Total Kredits: ${totalKreditsEarnedConfirmed} (confirmed) | ${totalKreditsEarnedUnConfirmed} (including unconfirmed)`);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
|
@ -3,13 +3,15 @@ const path = require('path');
|
||||
|
||||
const ethers = require('ethers');
|
||||
const fileInject = require('./helpers/file_inject.js');
|
||||
const getNetworkId = require('./helpers/networkid.js');
|
||||
const KreditsKit = require('../lib/kreditskit');
|
||||
|
||||
const addressesPath = path.join(__dirname, '..', 'lib/addresses');
|
||||
|
||||
module.exports = async function(callback) {
|
||||
const networkId = await getNetworkId(web3)
|
||||
const provider = new ethers.providers.Web3Provider(web3.currentProvider);
|
||||
const signer = provider.getSigner();
|
||||
const network = await provider.getNetwork();
|
||||
const networkId = network.chainId;
|
||||
console.log(`Deploying to networkId: ${networkId}`)
|
||||
|
||||
let kitAddresseFile = path.join(addressesPath, 'KreditsKit.json');
|
||||
@ -20,9 +22,6 @@ module.exports = async function(callback) {
|
||||
}
|
||||
console.log(`Using KreditsKit at: ${kreditsKitAddress}`);
|
||||
|
||||
const provider = new ethers.providers.Web3Provider(web3.currentProvider);
|
||||
let signer = provider.getSigner();
|
||||
|
||||
let kit = await new KreditsKit(provider, signer).init()
|
||||
|
||||
// TODO: get rid of the hard coded gas limit
|
||||
|
@ -38,7 +38,7 @@ module.exports = async function(callback) {
|
||||
if (contractWrapper[method]) {
|
||||
func = contractWrapper[method];
|
||||
} else {
|
||||
func = contractWrapper.functions[method];
|
||||
func = contractWrapper.contract[method];
|
||||
}
|
||||
func.apply(contractWrapper, args).then((result) => {
|
||||
console.log(`[OK] kredits.${contractName}.${method}(${JSON.stringify(args)}) => ${result.hash}`);
|
||||
|
@ -15,7 +15,7 @@ module.exports = async function(callback) {
|
||||
console.log(`Recording a veto for contribution #${contributionId}`);
|
||||
|
||||
try {
|
||||
kredits.Contribution.functions.veto(contributionId, { gasLimit: 300000 })
|
||||
kredits.Contribution.contract.veto(contributionId, { gasLimit: 300000 })
|
||||
.then(result => {
|
||||
console.log("\n\nResult:");
|
||||
console.log(result);
|
||||
|
Loading…
x
Reference in New Issue
Block a user