|
|
|
|
@@ -22,7 +22,7 @@ async function main() {
|
|
|
|
|
let contract = await upgrades.deployProxy(contractFactories[contractName], params)
|
|
|
|
|
.catch(handleError);
|
|
|
|
|
|
|
|
|
|
contracts[contractName] = contract;
|
|
|
|
|
contracts[contractName.toLowerCase()] = contract;
|
|
|
|
|
|
|
|
|
|
await contract.deployed().then(() => {
|
|
|
|
|
console.log(`${contractName} deployed to:`, contract.address);
|
|
|
|
|
@@ -34,68 +34,36 @@ async function main() {
|
|
|
|
|
|
|
|
|
|
const blocksVetoPeriod = 40320; // 7 days; 15 seconds block time
|
|
|
|
|
|
|
|
|
|
await deployContractProxy('Contributor');
|
|
|
|
|
await deployContractProxy('Contribution', [ blocksVetoPeriod ]);
|
|
|
|
|
// await deployContractProxy('Contributor');
|
|
|
|
|
// await deployContractProxy('Contribution', [ blocksVetoPeriod ]);
|
|
|
|
|
await deployContractProxy('Token');
|
|
|
|
|
await deployContractProxy('Reimbursement');
|
|
|
|
|
// await deployContractProxy('Reimbursement');
|
|
|
|
|
|
|
|
|
|
console.log('Calling Contributor#setTokenContract')
|
|
|
|
|
await contracts.Contributor.functions
|
|
|
|
|
.setTokenContract(contracts.Token.address)
|
|
|
|
|
.then(res => {
|
|
|
|
|
console.log(`...transaction published: ${res.hash}`);
|
|
|
|
|
return res.wait();
|
|
|
|
|
}).catch(handleError);
|
|
|
|
|
// await contracts.Contributor
|
|
|
|
|
// .setTokenContract(contracts.Token.address)
|
|
|
|
|
// .then(res => res.wait()).catch(handleError);
|
|
|
|
|
// await contracts.Contributor
|
|
|
|
|
// .setContributionContract(contracts.Contribution.address)
|
|
|
|
|
// .then(res => 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);
|
|
|
|
|
|
|
|
|
|
console.log('Calling Contributor#setContributionContract')
|
|
|
|
|
await contracts.Contributor.functions
|
|
|
|
|
.setContributionContract(contracts.Contribution.address)
|
|
|
|
|
.then(res => {
|
|
|
|
|
console.log(`...transaction published: ${res.hash}`);
|
|
|
|
|
return res.wait();
|
|
|
|
|
}).catch(handleError);
|
|
|
|
|
// await contracts.Token
|
|
|
|
|
// .setContributionContract(contracts.Contribution.address)
|
|
|
|
|
// .then(res => res.wait()).catch(handleError);
|
|
|
|
|
await contracts.Token
|
|
|
|
|
// .setContributorContract(contracts.Contributor.address)
|
|
|
|
|
.setContributorContract('0xEb4100b5939E243f69873A8E463eDa0aE84e43E8')
|
|
|
|
|
.then(res => res.wait()).catch(handleError);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log('Calling Contribution#setTokenContract')
|
|
|
|
|
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);
|
|
|
|
|
// await contracts.Reimbursement
|
|
|
|
|
// .setContributorContract(contracts.Contributor.address)
|
|
|
|
|
// .then(res => res.wait()).catch(handleError);
|
|
|
|
|
|
|
|
|
|
const addresses = {
|
|
|
|
|
Contributor: contracts.Contributor.address,
|
|
|
|
|
|