diff --git a/.gitignore b/.gitignore index bc674785..440fec89 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,4 @@ broadcast/ slither-results.json # Devnet deployment files -deployment/devnet/ +deployment/artifacts/contracts/devnet/ diff --git a/deployment/mainnet/l1addresses.json b/deployment/artifacts/contracts/mainnet/l1addresses.json similarity index 100% rename from deployment/mainnet/l1addresses.json rename to deployment/artifacts/contracts/mainnet/l1addresses.json diff --git a/deployment/mainnet/l2addresses.json b/deployment/artifacts/contracts/mainnet/l2addresses.json similarity index 100% rename from deployment/mainnet/l2addresses.json rename to deployment/artifacts/contracts/mainnet/l2addresses.json diff --git a/deployment/mainnet/vestingWallets_L1.json b/deployment/artifacts/contracts/mainnet/vestingWallets_L1.json similarity index 100% rename from deployment/mainnet/vestingWallets_L1.json rename to deployment/artifacts/contracts/mainnet/vestingWallets_L1.json diff --git a/deployment/mainnet/vestingWallets_L2.json b/deployment/artifacts/contracts/mainnet/vestingWallets_L2.json similarity index 100% rename from deployment/mainnet/vestingWallets_L2.json rename to deployment/artifacts/contracts/mainnet/vestingWallets_L2.json diff --git a/deployment/testnet/l1addresses.json b/deployment/artifacts/contracts/testnet/l1addresses.json similarity index 100% rename from deployment/testnet/l1addresses.json rename to deployment/artifacts/contracts/testnet/l1addresses.json diff --git a/deployment/testnet/l2addresses.json b/deployment/artifacts/contracts/testnet/l2addresses.json similarity index 100% rename from deployment/testnet/l2addresses.json rename to deployment/artifacts/contracts/testnet/l2addresses.json diff --git a/deployment/testnet/vestingWallets_L1.json b/deployment/artifacts/contracts/testnet/vestingWallets_L1.json similarity index 100% rename from deployment/testnet/vestingWallets_L1.json rename to deployment/artifacts/contracts/testnet/vestingWallets_L1.json diff --git a/deployment/testnet/vestingWallets_L2.json b/deployment/artifacts/contracts/testnet/vestingWallets_L2.json similarity index 100% rename from deployment/testnet/vestingWallets_L2.json rename to deployment/artifacts/contracts/testnet/vestingWallets_L2.json diff --git a/deployment/records/mainnet/L1FundVesting.s.sol/run-1715867924.json b/deployment/artifacts/records/mainnet/L1FundVesting.s.sol/run-1715867924.json similarity index 100% rename from deployment/records/mainnet/L1FundVesting.s.sol/run-1715867924.json rename to deployment/artifacts/records/mainnet/L1FundVesting.s.sol/run-1715867924.json diff --git a/deployment/records/mainnet/L1LiskToken.s.sol/run-1715865442.json b/deployment/artifacts/records/mainnet/L1LiskToken.s.sol/run-1715865442.json similarity index 100% rename from deployment/records/mainnet/L1LiskToken.s.sol/run-1715865442.json rename to deployment/artifacts/records/mainnet/L1LiskToken.s.sol/run-1715865442.json diff --git a/deployment/records/mainnet/L1VestingWallet.s.sol/run-1715867820.json b/deployment/artifacts/records/mainnet/L1VestingWallet.s.sol/run-1715867820.json similarity index 100% rename from deployment/records/mainnet/L1VestingWallet.s.sol/run-1715867820.json rename to deployment/artifacts/records/mainnet/L1VestingWallet.s.sol/run-1715867820.json diff --git a/deployment/records/mainnet/L2Airdrop.s.sol/run-1719389671.json b/deployment/artifacts/records/mainnet/L2Airdrop.s.sol/run-1719389671.json similarity index 100% rename from deployment/records/mainnet/L2Airdrop.s.sol/run-1719389671.json rename to deployment/artifacts/records/mainnet/L2Airdrop.s.sol/run-1719389671.json diff --git a/deployment/records/mainnet/L2Claim.s.sol/run-1716314064.json b/deployment/artifacts/records/mainnet/L2Claim.s.sol/run-1716314064.json similarity index 100% rename from deployment/records/mainnet/L2Claim.s.sol/run-1716314064.json rename to deployment/artifacts/records/mainnet/L2Claim.s.sol/run-1716314064.json diff --git a/deployment/records/mainnet/L2FundRewardContract.s.sol/run-1716316128.json b/deployment/artifacts/records/mainnet/L2FundRewardContract.s.sol/run-1716316128.json similarity index 100% rename from deployment/records/mainnet/L2FundRewardContract.s.sol/run-1716316128.json rename to deployment/artifacts/records/mainnet/L2FundRewardContract.s.sol/run-1716316128.json diff --git a/deployment/records/mainnet/L2FundVestingAndDAO.s.sol/run-1715868150.json b/deployment/artifacts/records/mainnet/L2FundVestingAndDAO.s.sol/run-1715868150.json similarity index 100% rename from deployment/records/mainnet/L2FundVestingAndDAO.s.sol/run-1715868150.json rename to deployment/artifacts/records/mainnet/L2FundVestingAndDAO.s.sol/run-1715868150.json diff --git a/deployment/records/mainnet/L2Governor.s.sol/run-1715866394.json b/deployment/artifacts/records/mainnet/L2Governor.s.sol/run-1715866394.json similarity index 100% rename from deployment/records/mainnet/L2Governor.s.sol/run-1715866394.json rename to deployment/artifacts/records/mainnet/L2Governor.s.sol/run-1715866394.json diff --git a/deployment/records/mainnet/L2LiskToken.s.sol/run-1715865473.json b/deployment/artifacts/records/mainnet/L2LiskToken.s.sol/run-1715865473.json similarity index 100% rename from deployment/records/mainnet/L2LiskToken.s.sol/run-1715865473.json rename to deployment/artifacts/records/mainnet/L2LiskToken.s.sol/run-1715865473.json diff --git a/deployment/records/mainnet/L2LockingPosition.s.sol/run-1715866271.json b/deployment/artifacts/records/mainnet/L2LockingPosition.s.sol/run-1715866271.json similarity index 100% rename from deployment/records/mainnet/L2LockingPosition.s.sol/run-1715866271.json rename to deployment/artifacts/records/mainnet/L2LockingPosition.s.sol/run-1715866271.json diff --git a/deployment/records/mainnet/L2Reward.s.sol/run-1715866491.json b/deployment/artifacts/records/mainnet/L2Reward.s.sol/run-1715866491.json similarity index 100% rename from deployment/records/mainnet/L2Reward.s.sol/run-1715866491.json rename to deployment/artifacts/records/mainnet/L2Reward.s.sol/run-1715866491.json diff --git a/deployment/records/mainnet/L2Staking.s.sol/run-1715866220.json b/deployment/artifacts/records/mainnet/L2Staking.s.sol/run-1715866220.json similarity index 100% rename from deployment/records/mainnet/L2Staking.s.sol/run-1715866220.json rename to deployment/artifacts/records/mainnet/L2Staking.s.sol/run-1715866220.json diff --git a/deployment/records/mainnet/L2VestingWallet.s.sol/run-1715867989.json b/deployment/artifacts/records/mainnet/L2VestingWallet.s.sol/run-1715867989.json similarity index 100% rename from deployment/records/mainnet/L2VestingWallet.s.sol/run-1715867989.json rename to deployment/artifacts/records/mainnet/L2VestingWallet.s.sol/run-1715867989.json diff --git a/deployment/records/mainnet/L2VotingPower.s.sol/run-1715866322.json b/deployment/artifacts/records/mainnet/L2VotingPower.s.sol/run-1715866322.json similarity index 100% rename from deployment/records/mainnet/L2VotingPower.s.sol/run-1715866322.json rename to deployment/artifacts/records/mainnet/L2VotingPower.s.sol/run-1715866322.json diff --git a/deployment/records/mainnet/TransferFunds1stBatch.s.sol/run-1715865655.json b/deployment/artifacts/records/mainnet/TransferFunds1stBatch.s.sol/run-1715865655.json similarity index 100% rename from deployment/records/mainnet/TransferFunds1stBatch.s.sol/run-1715865655.json rename to deployment/artifacts/records/mainnet/TransferFunds1stBatch.s.sol/run-1715865655.json diff --git a/deployment/records/mainnet/TransferFunds2ndBatch.s.sol/run-1716316274.json b/deployment/artifacts/records/mainnet/TransferFunds2ndBatch.s.sol/run-1716316274.json similarity index 100% rename from deployment/records/mainnet/TransferFunds2ndBatch.s.sol/run-1716316274.json rename to deployment/artifacts/records/mainnet/TransferFunds2ndBatch.s.sol/run-1716316274.json diff --git a/deployment/records/sepolia/L1FundVesting.s.sol/run-1715617988.json b/deployment/artifacts/records/sepolia/L1FundVesting.s.sol/run-1715617988.json similarity index 100% rename from deployment/records/sepolia/L1FundVesting.s.sol/run-1715617988.json rename to deployment/artifacts/records/sepolia/L1FundVesting.s.sol/run-1715617988.json diff --git a/deployment/records/sepolia/L1LiskToken.s.sol/run-1715594513.json b/deployment/artifacts/records/sepolia/L1LiskToken.s.sol/run-1715594513.json similarity index 100% rename from deployment/records/sepolia/L1LiskToken.s.sol/run-1715594513.json rename to deployment/artifacts/records/sepolia/L1LiskToken.s.sol/run-1715594513.json diff --git a/deployment/records/sepolia/L1VestingWallet.s.sol/run-1715617955.json b/deployment/artifacts/records/sepolia/L1VestingWallet.s.sol/run-1715617955.json similarity index 100% rename from deployment/records/sepolia/L1VestingWallet.s.sol/run-1715617955.json rename to deployment/artifacts/records/sepolia/L1VestingWallet.s.sol/run-1715617955.json diff --git a/deployment/records/sepolia/L2Airdrop.s.sol/run-1717681663.json b/deployment/artifacts/records/sepolia/L2Airdrop.s.sol/run-1717681663.json similarity index 100% rename from deployment/records/sepolia/L2Airdrop.s.sol/run-1717681663.json rename to deployment/artifacts/records/sepolia/L2Airdrop.s.sol/run-1717681663.json diff --git a/deployment/records/sepolia/L2Claim.s.sol/run-1715618783.json b/deployment/artifacts/records/sepolia/L2Claim.s.sol/run-1715618783.json similarity index 100% rename from deployment/records/sepolia/L2Claim.s.sol/run-1715618783.json rename to deployment/artifacts/records/sepolia/L2Claim.s.sol/run-1715618783.json diff --git a/deployment/records/sepolia/L2FundRewardContract.s.sol/run-1715619069.json b/deployment/artifacts/records/sepolia/L2FundRewardContract.s.sol/run-1715619069.json similarity index 100% rename from deployment/records/sepolia/L2FundRewardContract.s.sol/run-1715619069.json rename to deployment/artifacts/records/sepolia/L2FundRewardContract.s.sol/run-1715619069.json diff --git a/deployment/records/sepolia/L2FundVestingAndDAO.s.sol/run-1715618299.json b/deployment/artifacts/records/sepolia/L2FundVestingAndDAO.s.sol/run-1715618299.json similarity index 100% rename from deployment/records/sepolia/L2FundVestingAndDAO.s.sol/run-1715618299.json rename to deployment/artifacts/records/sepolia/L2FundVestingAndDAO.s.sol/run-1715618299.json diff --git a/deployment/records/sepolia/L2Governor.s.sol/run-1715595865.json b/deployment/artifacts/records/sepolia/L2Governor.s.sol/run-1715595865.json similarity index 100% rename from deployment/records/sepolia/L2Governor.s.sol/run-1715595865.json rename to deployment/artifacts/records/sepolia/L2Governor.s.sol/run-1715595865.json diff --git a/deployment/records/sepolia/L2LiskToken.s.sol/run-1715594646.json b/deployment/artifacts/records/sepolia/L2LiskToken.s.sol/run-1715594646.json similarity index 100% rename from deployment/records/sepolia/L2LiskToken.s.sol/run-1715594646.json rename to deployment/artifacts/records/sepolia/L2LiskToken.s.sol/run-1715594646.json diff --git a/deployment/records/sepolia/L2LockingPosition.s.sol/run-1715595836.json b/deployment/artifacts/records/sepolia/L2LockingPosition.s.sol/run-1715595836.json similarity index 100% rename from deployment/records/sepolia/L2LockingPosition.s.sol/run-1715595836.json rename to deployment/artifacts/records/sepolia/L2LockingPosition.s.sol/run-1715595836.json diff --git a/deployment/records/sepolia/L2Reward.s.sol/run-1715595998.json b/deployment/artifacts/records/sepolia/L2Reward.s.sol/run-1715595998.json similarity index 100% rename from deployment/records/sepolia/L2Reward.s.sol/run-1715595998.json rename to deployment/artifacts/records/sepolia/L2Reward.s.sol/run-1715595998.json diff --git a/deployment/records/sepolia/L2Staking.s.sol/run-1715595763.json b/deployment/artifacts/records/sepolia/L2Staking.s.sol/run-1715595763.json similarity index 100% rename from deployment/records/sepolia/L2Staking.s.sol/run-1715595763.json rename to deployment/artifacts/records/sepolia/L2Staking.s.sol/run-1715595763.json diff --git a/deployment/records/sepolia/L2VestingWallet.s.sol/run-1715618124.json b/deployment/artifacts/records/sepolia/L2VestingWallet.s.sol/run-1715618124.json similarity index 100% rename from deployment/records/sepolia/L2VestingWallet.s.sol/run-1715618124.json rename to deployment/artifacts/records/sepolia/L2VestingWallet.s.sol/run-1715618124.json diff --git a/deployment/records/sepolia/L2VotingPower.s.sol/run-1715595849.json b/deployment/artifacts/records/sepolia/L2VotingPower.s.sol/run-1715595849.json similarity index 100% rename from deployment/records/sepolia/L2VotingPower.s.sol/run-1715595849.json rename to deployment/artifacts/records/sepolia/L2VotingPower.s.sol/run-1715595849.json diff --git a/deployment/records/sepolia/TransferFunds1stBatch.s.sol/run-1715594941.json b/deployment/artifacts/records/sepolia/TransferFunds1stBatch.s.sol/run-1715594941.json similarity index 100% rename from deployment/records/sepolia/TransferFunds1stBatch.s.sol/run-1715594941.json rename to deployment/artifacts/records/sepolia/TransferFunds1stBatch.s.sol/run-1715594941.json diff --git a/deployment/records/sepolia/TransferFunds2ndBatch.s.sol/run-1715619126.json b/deployment/artifacts/records/sepolia/TransferFunds2ndBatch.s.sol/run-1715619126.json similarity index 100% rename from deployment/records/sepolia/TransferFunds2ndBatch.s.sol/run-1715619126.json rename to deployment/artifacts/records/sepolia/TransferFunds2ndBatch.s.sol/run-1715619126.json diff --git a/script/1_deployTokenContracts.sh b/script/1_deployTokenContracts.sh index f3867000..78d8a625 100755 --- a/script/1_deployTokenContracts.sh +++ b/script/1_deployTokenContracts.sh @@ -12,19 +12,19 @@ echo "Setting environment variables..." source .env echo "Done." -echo "Creating $NETWORK directory inside deployment directory..." +echo "Creating $NETWORK directory inside deployment/artifacts/contracts directory..." if [ -z "$NETWORK" ] then echo "NETWORK variable inside .env file is not set. Please set NETWORK environment variable." exit 1 else - if [ -d "deployment/$NETWORK" ] + if [ -d "deployment/artifacts/contracts/$NETWORK" ] then - echo "Directory deployment/$NETWORK already exists." - echo "Removing files inside deployment/$NETWORK directory..." - rm -rf deployment/$NETWORK/* + echo "Directory deployment/artifacts/contracts/$NETWORK already exists." + echo "Removing files inside deployment/artifacts/contracts/$NETWORK directory..." + rm -rf deployment/artifacts/contracts/$NETWORK/* else - mkdir deployment/$NETWORK + mkdir deployment/artifacts/contracts/$NETWORK fi fi echo "Done." diff --git a/script/2_deployStakingAndGovernance.sh b/script/2_deployStakingAndGovernance.sh index 781e7f40..d9dd082c 100755 --- a/script/2_deployStakingAndGovernance.sh +++ b/script/2_deployStakingAndGovernance.sh @@ -12,17 +12,17 @@ echo "Setting environment variables..." source .env echo "Done." -echo "Creating $NETWORK directory inside deployment directory..." +echo "Creating $NETWORK directory inside deployment/artifacts/contracts directory..." if [ -z "$NETWORK" ] then echo "NETWORK variable inside .env file is not set. Please set NETWORK environment variable." exit 1 else - if [ -d "deployment/$NETWORK" ] + if [ -d "deployment/artifacts/contracts/$NETWORK" ] then - echo "Directory deployment/$NETWORK already exists." + echo "Directory deployment/artifacts/contracts/$NETWORK already exists." else - mkdir deployment/$NETWORK + mkdir deployment/artifacts/contracts/$NETWORK fi fi echo "Done." diff --git a/script/3_deployVestingWallets.sh b/script/3_deployVestingWallets.sh index 956e8cc4..734645c9 100755 --- a/script/3_deployVestingWallets.sh +++ b/script/3_deployVestingWallets.sh @@ -12,17 +12,17 @@ echo "Setting environment variables..." source .env echo "Done." -echo "Creating $NETWORK directory inside deployment directory..." +echo "Creating $NETWORK directory inside deployment/artifacts/contracts directory..." if [ -z "$NETWORK" ] then echo "NETWORK variable inside .env file is not set. Please set NETWORK environment variable." exit 1 else - if [ -d "deployment/$NETWORK" ] + if [ -d "deployment/artifacts/contracts/$NETWORK" ] then - echo "Directory deployment/$NETWORK already exists." + echo "Directory deployment/artifacts/contracts/$NETWORK already exists." else - mkdir deployment/$NETWORK + mkdir deployment/artifacts/contracts/$NETWORK fi fi echo "Done." diff --git a/script/4_deployClaimContract.sh b/script/4_deployClaimContract.sh index 945b40bf..96cff7c3 100755 --- a/script/4_deployClaimContract.sh +++ b/script/4_deployClaimContract.sh @@ -12,17 +12,17 @@ echo "Setting environment variables..." source .env echo "Done." -echo "Creating $NETWORK directory inside deployment directory..." +echo "Creating $NETWORK directory inside deployment/artifacts/contracts directory..." if [ -z "$NETWORK" ] then echo "NETWORK variable inside .env file is not set. Please set NETWORK environment variable." exit 1 else - if [ -d "deployment/$NETWORK" ] + if [ -d "deployment/artifacts/contracts/$NETWORK" ] then - echo "Directory deployment/$NETWORK already exists." + echo "Directory deployment/artifacts/contracts/$NETWORK already exists." else - mkdir deployment/$NETWORK + mkdir deployment/artifacts/contracts/$NETWORK fi fi echo "Done." diff --git a/script/5_deployAirdropContract.sh b/script/5_deployAirdropContract.sh old mode 100644 new mode 100755 index e8915cc4..951b8b46 --- a/script/5_deployAirdropContract.sh +++ b/script/5_deployAirdropContract.sh @@ -12,17 +12,17 @@ echo "Setting environment variables..." source .env echo "Done." -echo "Creating $NETWORK directory inside deployment directory..." +echo "Creating $NETWORK directory inside deployment/artifacts/contracts directory..." if [ -z "$NETWORK" ] then echo "NETWORK variable inside .env file is not set. Please set NETWORK environment variable." exit 1 else - if [ -d "deployment/$NETWORK" ] + if [ -d "deployment/artifacts/contracts/$NETWORK" ] then - echo "Directory deployment/$NETWORK already exists." + echo "Directory deployment/artifacts/contracts/$NETWORK already exists." else - mkdir deployment/$NETWORK + mkdir deployment/artifacts/contracts/$NETWORK fi fi echo "Done." diff --git a/script/6_deployUSDTContract.sh b/script/6_deployUSDTContract.sh old mode 100644 new mode 100755 diff --git a/script/contracts/Utils.sol b/script/contracts/Utils.sol index 3402ebf8..f5f69097 100644 --- a/script/contracts/Utils.sol +++ b/script/contracts/Utils.sol @@ -115,7 +115,8 @@ contract Utils is Script { function readL1AddressesFile() external view returns (L1AddressesConfig memory) { string memory network = getNetworkType(); string memory root = vm.projectRoot(); - string memory addressPath = string.concat(root, "/deployment/", network, "/l1addresses.json"); + string memory addressPath = + string.concat(root, "/deployment/artifacts/contracts/", network, "/l1addresses.json"); string memory addressJson = vm.readFile(addressPath); L1AddressesConfig memory l1AddressesConfig; @@ -141,7 +142,7 @@ contract Utils is Script { vm.serializeAddress(json, "L1LiskToken", cfg.L1LiskToken); string memory finalJson = vm.serializeAddress(json, "L1VestingWalletImplementation", cfg.L1VestingWalletImplementation); - finalJson.write(string.concat("deployment/", network, "/l1addresses.json")); + finalJson.write(string.concat("deployment/artifacts/contracts/", network, "/l1addresses.json")); } /// @notice This function reads L2 addresses from JSON file. @@ -149,7 +150,8 @@ contract Utils is Script { function readL2AddressesFile() external view returns (L2AddressesConfig memory) { string memory network = getNetworkType(); string memory root = vm.projectRoot(); - string memory addressPath = string.concat(root, "/deployment/", network, "/l2addresses.json"); + string memory addressPath = + string.concat(root, "/deployment/artifacts/contracts/", network, "/l2addresses.json"); string memory addressJson = vm.readFile(addressPath); L2AddressesConfig memory l2AddressesConfig; @@ -250,7 +252,7 @@ contract Utils is Script { string memory finalJson = vm.serializeAddress(json, "L2VotingPowerImplementation", cfg.L2VotingPowerImplementation); - finalJson.write(string.concat("deployment/", network, "/l2addresses.json")); + finalJson.write(string.concat("deployment/artifacts/contracts/", network, "/l2addresses.json")); } /// @notice This function writes Vesting Wallets to JSON file. @@ -265,7 +267,11 @@ contract Utils is Script { VestingWallet memory vestingWallet = _vestingWallets[i]; finalJson = vm.serializeAddress(json, vestingWallet.name, vestingWallet.vestingWalletAddress); } - finalJson.write(string.concat("deployment/", network, string.concat("/vestingWallets_", _layer, ".json"))); + finalJson.write( + string.concat( + "deployment/artifacts/contracts/", network, string.concat("/vestingWallets_", _layer, ".json") + ) + ); } /// @notice This function reads MerkleRoot from JSON file. @@ -341,8 +347,9 @@ contract Utils is Script { { string memory network = getNetworkType(); string memory root = vm.projectRoot(); - string memory vestingWalletsPath = - string.concat(root, "/deployment/", network, string.concat("/vestingWallets_", _layer, ".json")); + string memory vestingWalletsPath = string.concat( + root, "/deployment/artifacts/contracts/", network, string.concat("/vestingWallets_", _layer, ".json") + ); string memory vestingWalletsJson = vm.readFile(vestingWalletsPath); return vm.parseJsonAddress(vestingWalletsJson, string.concat(".['", _vestingWalletName, "']")); } diff --git a/script/example/demoClaim.sh b/script/example/demoClaim.sh index 16063a86..826e3dc4 100755 --- a/script/example/demoClaim.sh +++ b/script/example/demoClaim.sh @@ -20,12 +20,12 @@ then exit fi -echo "Removing files inside deployment directory if they exists..." -rm -rf deployment/devnet +echo "Removing files inside deployment/artifacts/contracts directory if they exists..." +rm -rf deployment/artifacts/contracts/devnet echo "Done." -echo "Creating devnet directory inside deployment directory..." -mkdir deployment/devnet +echo "Creating devnet directory inside deployment/artifacts/contracts directory..." +mkdir deployment/artifacts/contracts/devnet echo "Done." echo "Deploying Demo L2LiskToken smart contract..."