Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add migrations for AIP-017 #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment this line to install global node packages.
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g truffle@5.4.5 ganache" 2>&1
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g truffle@5.4.5 ganache@7.0.3" 2>&1

23 changes: 23 additions & 0 deletions migrations/18_inflation_vesting_team.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
var AkropolisTokenVesting = artifacts.require('./AkropolisTokenVesting.sol');

module.exports = async function (deployer, network, accounts) {
const owner = accounts[0];

const token =
network === 'mainnet'
? '0x8ab7404063ec4dbcfd4598215992dc3f8ec853d7'
: '0xcbB03b0247688552ca34a4cE910b3254A420c523';
const start = 1719964800; // 2024-07-03T00:00:00.000Z
const cliffDuration = 31536000; // 2025-07-03T00:00:00.000Z - 2024-07-03T00:00:00.000Z
const duration = 126230400; // 2028-07-03T00:00:00.000Z - 2024-07-03T00:00:00.000Z

console.log('owner of storage contracts: ', owner);

await deployer.deploy(AkropolisTokenVesting, token, start, cliffDuration, duration, {
from: owner,
});
};

// commands:
// truffle migrate --f 18 --network mainnet
// truffle run verify AkropolisTokenVesting@0xc04...70f --network mainnet --verifiers=etherscan
23 changes: 23 additions & 0 deletions migrations/19_inflation_vesting_foundation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
var AkropolisTokenVesting = artifacts.require('./AkropolisTokenVesting.sol');

module.exports = async function (deployer, network, accounts) {
const owner = accounts[0];

const token =
network === 'mainnet'
? '0x8ab7404063ec4dbcfd4598215992dc3f8ec853d7'
: '0xcbB03b0247688552ca34a4cE910b3254A420c523';
const start = 1719964800; // 2024-07-03T00:00:00.000Z
const cliffDuration = 0;
const duration = 126230400; // 2028-07-03T00:00:00.000Z - 2024-07-03T00:00:00.000Z

console.log('owner of storage contracts: ', owner);

await deployer.deploy(AkropolisTokenVesting, token, start, cliffDuration, duration, {
from: owner,
});
};

// commands:
// truffle migrate --f 19 --network mainnet
// truffle run verify AkropolisTokenVesting@0xc04...70f --network mainnet --verifiers=etherscan
23 changes: 23 additions & 0 deletions migrations/20_inflation_vesting_ecosystem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
var AkropolisTokenVesting = artifacts.require('./AkropolisTokenVesting.sol');

module.exports = async function (deployer, network, accounts) {
const owner = accounts[0];

const token =
network === 'mainnet'
? '0x8ab7404063ec4dbcfd4598215992dc3f8ec853d7'
: '0xcbB03b0247688552ca34a4cE910b3254A420c523';
const start = 1719964800; // 2024-07-03T00:00:00.000Z
const cliffDuration = 0;
const duration = 126230400; // 2028-07-03T00:00:00.000Z - 2024-07-03T00:00:00.000Z

console.log('owner of storage contracts: ', owner);

await deployer.deploy(AkropolisTokenVesting, token, start, cliffDuration, duration, {
from: owner,
});
};

// commands:
// truffle migrate --f 20 --network mainnet
// truffle run verify AkropolisTokenVesting@0xc04...70f --network mainnet --verifiers=etherscan
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"openzeppelin-solidity": "2.3.0",
"truffle-contract": "4.0.23",
"truffle-hdwallet-provider": "1.0.8",
"truffle-plugin-verify": "^0.5.25",
"truffle-plugin-verify": "^0.5.33",
"web3": "v1.0.0-beta.37",
"zos-lib": "2.4.1"
}
}
}
23 changes: 21 additions & 2 deletions truffle-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ require('dotenv').config(); // Stores environment-specific variable from '.env'
require('babel-register');
require('babel-polyfill');

// because truffle-plugin-verify uses Array.at
Array.prototype.at = function (pos) {
return pos >= 0 ? this[pos] : this[this.length + pos];
};

console.log(process.env.METAMASK_MNEMONIC);
console.log(process.env.INFURA_API_KEY);
module.exports = {
Expand All @@ -27,15 +32,29 @@ module.exports = {
return new HDWalletProvider(
process.env.METAMASK_MNEMONIC,
'https://mainnet.infura.io/v3/' + process.env.INFURA_API_KEY,
0
8
);
},
network_id: 1,
gas: 7000000,
gas: 4000000,
gasPrice: 30000000000,
skipDryRun: true,
},

sepolia: {
provider: function () {
return new HDWalletProvider(
process.env.METAMASK_MNEMONIC,
'https://sepolia.infura.io/v3/' + process.env.INFURA_API_KEY,
8
);
},
network_id: 11155111,
gas: 4000000,
gasPrice: 130166207251,
skipDryRun: true,
},

kovan: {
provider: function () {
return new HDWalletProvider(
Expand Down