Compare commits
1 Commits
v7.0.0-bet
...
deletemewh
| Author | SHA1 | Date | |
|---|---|---|---|
|
533065e527
|
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "kredits-contracts",
|
"name": "kredits-contracts",
|
||||||
"version": "7.0.0-beta.0",
|
"version": "6.0.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "kredits-contracts",
|
"name": "kredits-contracts",
|
||||||
"version": "7.0.0-beta.0",
|
"version": "6.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@kosmos/schemas": "^3.1.0",
|
"@kosmos/schemas": "^3.1.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "kredits-contracts",
|
"name": "kredits-contracts",
|
||||||
"version": "7.0.0-beta.0",
|
"version": "6.0.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": {
|
||||||
|
|||||||
@@ -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] = contract;
|
contracts[contractName.toLowerCase()] = contract;
|
||||||
|
|
||||||
await contract.deployed().then(() => {
|
await contract.deployed().then(() => {
|
||||||
console.log(`${contractName} deployed to:`, contract.address);
|
console.log(`${contractName} deployed to:`, contract.address);
|
||||||
@@ -34,68 +34,36 @@ 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');
|
||||||
|
|
||||||
console.log('Calling Contributor#setTokenContract')
|
// await contracts.Contributor
|
||||||
await contracts.Contributor.functions
|
// .setTokenContract(contracts.Token.address)
|
||||||
.setTokenContract(contracts.Token.address)
|
// .then(res => res.wait()).catch(handleError);
|
||||||
.then(res => {
|
// await contracts.Contributor
|
||||||
console.log(`...transaction published: ${res.hash}`);
|
// .setContributionContract(contracts.Contribution.address)
|
||||||
return res.wait();
|
// .then(res => res.wait()).catch(handleError);
|
||||||
}).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);
|
||||||
|
|
||||||
console.log('Calling Contributor#setContributionContract')
|
// await contracts.Token
|
||||||
await contracts.Contributor.functions
|
// .setContributionContract(contracts.Contribution.address)
|
||||||
.setContributionContract(contracts.Contribution.address)
|
// .then(res => res.wait()).catch(handleError);
|
||||||
.then(res => {
|
await contracts.Token
|
||||||
console.log(`...transaction published: ${res.hash}`);
|
// .setContributorContract(contracts.Contributor.address)
|
||||||
return res.wait();
|
.setContributorContract('0xEb4100b5939E243f69873A8E463eDa0aE84e43E8')
|
||||||
}).catch(handleError);
|
.then(res => res.wait()).catch(handleError);
|
||||||
|
|
||||||
|
// await contracts.Reimbursement
|
||||||
console.log('Calling Contribution#setTokenContract')
|
// .setContributorContract(contracts.Contributor.address)
|
||||||
await contracts.Contribution.functions
|
// .then(res => res.wait()).catch(handleError);
|
||||||
.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,
|
||||||
|
|||||||
Reference in New Issue
Block a user