diff --git a/.env.mainnet b/.env.mainnet index 0713efb7..6b333f9d 100644 --- a/.env.mainnet +++ b/.env.mainnet @@ -35,7 +35,7 @@ L2_VESTING_WALLET_OWNER_ADDRESS=0x394Ae9d48eeca1C69a989B5A8C787081595c55A7 L2_AIRDROP_OWNER_ADDRESS=0x394Ae9d48eeca1C69a989B5A8C787081595c55A7 # Airdrop wallet address where LSK tokens are transferred to after airdrop period ends -L2_AIRDROP_WALLET_ADDRESS=0x38eA61E8084E27a087cF5CdBC3f22584f18773e6 +L2_AIRDROP_WALLET_ADDRESS=0x0c92121A7C15cF01041e1122483Bc173Baccd877 # Salt for deterministic smart contract address generation DETERMINISTIC_ADDRESS_SALT="lisk_l2_token_deterministic_salt" 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/README.md b/README.md index f4502a58..d6bdb7dc 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,7 @@ You may find the addresses of the deployed smart contracts (including vesting wa | Name | Proxy | Implementation | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| [`L2Airdrop`](src/L2/L2Airdrop.sol) | - | [0xC7315f4FaaB2F700fc6b4704BB801c46ff6327AC](https://blockscout.lisk.com/address/0xC7315f4FaaB2F700fc6b4704BB801c46ff6327AC) | | [`L2Claim`](src/L2/L2Claim.sol) | [0xD7BE2Fd98BfD64c1dfCf6c013fC593eF09219994](https://blockscout.lisk.com/address/0xD7BE2Fd98BfD64c1dfCf6c013fC593eF09219994) | [0x60790Dc2d45BaA8B36282889569BbB301F4D0c41](https://blockscout.lisk.com/address/0x60790Dc2d45BaA8B36282889569BbB301F4D0c41) | | [`L2Governor`](src/L2/L2Governor.sol) | [0x58a61b1807a7bDA541855DaAEAEe89b1DDA48568](https://blockscout.lisk.com/address/0x58a61b1807a7bDA541855DaAEAEe89b1DDA48568) | [0x18a0b8c653c291D69F21A6Ef9a1000335F71618e](https://blockscout.lisk.com/address/0x18a0b8c653c291D69F21A6Ef9a1000335F71618e) | | [`L2LiskToken`](src/L2/L2LiskToken.sol) | - | [0xac485391EB2d7D88253a7F1eF18C37f4242D1A24](https://blockscout.lisk.com/address/0xac485391EB2d7D88253a7F1eF18C37f4242D1A24) | diff --git a/deployment/addresses/mainnet/addresses.md b/deployment/addresses/mainnet/addresses.md index 4d118d39..5522afab 100644 --- a/deployment/addresses/mainnet/addresses.md +++ b/deployment/addresses/mainnet/addresses.md @@ -28,6 +28,7 @@ Below are the addresses of the deployed smart contracts on the Ethereum and Lisk | Name | Address | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| [`L2Airdrop`](../../../src/L2/L2Airdrop.sol) | [0xC7315f4FaaB2F700fc6b4704BB801c46ff6327AC](https://blockscout.lisk.com/address/0xC7315f4FaaB2F700fc6b4704BB801c46ff6327AC) | | [`L2Claim`](../../../src/L2/L2Claim.sol) | [0xD7BE2Fd98BfD64c1dfCf6c013fC593eF09219994](https://blockscout.lisk.com/address/0xD7BE2Fd98BfD64c1dfCf6c013fC593eF09219994) | | [`L2ClaimImplementation`](../../../src/L2/L2Claim.sol) | [0x60790Dc2d45BaA8B36282889569BbB301F4D0c41](https://blockscout.lisk.com/address/0x60790Dc2d45BaA8B36282889569BbB301F4D0c41) | | [`L2Governor`](../../../src/L2/L2Governor.sol) | [0x58a61b1807a7bDA541855DaAEAEe89b1DDA48568](https://blockscout.lisk.com/address/0x58a61b1807a7bDA541855DaAEAEe89b1DDA48568) | diff --git a/deployment/addresses/sepolia/addresses.md b/deployment/addresses/sepolia/addresses.md index 0f7af2a8..fffa7d38 100644 --- a/deployment/addresses/sepolia/addresses.md +++ b/deployment/addresses/sepolia/addresses.md @@ -28,6 +28,7 @@ Below are the addresses of the deployed smart contracts on the Ethereum and Lisk | Name | Address | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| [`L2Airdrop`](../../../src/L2/L2Airdrop.sol) | [0xDdE1998B8842b1C925Eef7eDFDAA2Df24A75048a](https://sepolia-blockscout.lisk.com/address/0xDdE1998B8842b1C925Eef7eDFDAA2Df24A75048a) | | [`L2ClaimContract`](../../../src/L2/L2Claim.sol) | [0x3D4190b08E3E30183f5AdE3A116f2534Ee3a4f94](https://sepolia-blockscout.lisk.com/address/0x3D4190b08E3E30183f5AdE3A116f2534Ee3a4f94) | | [`L2ClaimImplementation`](../../../src/L2/L2Claim.sol) | [0xAE4A95E412d7d669AbE6bB23031Ae0250B832710](https://sepolia-blockscout.lisk.com/address/0xAE4A95E412d7d669AbE6bB23031Ae0250B832710) | | [`L2Governor`](../../../src/L2/L2Governor.sol) | [0xf9181aaD773d423A2cc0155Cb4263E563D51B467](https://sepolia-blockscout.lisk.com/address/0xf9181aaD773d423A2cc0155Cb4263E563D51B467) | 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 94% rename from deployment/mainnet/l2addresses.json rename to deployment/artifacts/contracts/mainnet/l2addresses.json index 19798a12..47b93603 100644 --- a/deployment/mainnet/l2addresses.json +++ b/deployment/artifacts/contracts/mainnet/l2addresses.json @@ -1,4 +1,5 @@ { + "L2Airdrop": "0xC7315f4FaaB2F700fc6b4704BB801c46ff6327AC", "L2ClaimContract": "0xD7BE2Fd98BfD64c1dfCf6c013fC593eF09219994", "L2ClaimImplementation": "0x60790Dc2d45BaA8B36282889569BbB301F4D0c41", "L2Governor": "0x58a61b1807a7bDA541855DaAEAEe89b1DDA48568", 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 94% rename from deployment/testnet/l2addresses.json rename to deployment/artifacts/contracts/testnet/l2addresses.json index 47d050cf..6028dc92 100644 --- a/deployment/testnet/l2addresses.json +++ b/deployment/artifacts/contracts/testnet/l2addresses.json @@ -1,4 +1,5 @@ { + "L2Airdrop": "0xDdE1998B8842b1C925Eef7eDFDAA2Df24A75048a", "L2ClaimContract": "0x3D4190b08E3E30183f5AdE3A116f2534Ee3a4f94", "L2ClaimImplementation": "0xAE4A95E412d7d669AbE6bB23031Ae0250B832710", "L2Governor": "0xf9181aaD773d423A2cc0155Cb4263E563D51B467", 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/artifacts/records/mainnet/L2Airdrop.s.sol/run-1719389671.json b/deployment/artifacts/records/mainnet/L2Airdrop.s.sol/run-1719389671.json new file mode 100644 index 00000000..97c7d0c9 --- /dev/null +++ b/deployment/artifacts/records/mainnet/L2Airdrop.s.sol/run-1719389671.json @@ -0,0 +1,181 @@ +{ + "transactions": [ + { + "hash": "0xe05153aef79518cbc180e1aa7195c8b4f201a27cc50a852490b9bd2a7bccf3e8", + "transactionType": "CREATE", + "contractName": "L2Airdrop", + "contractAddress": "0xc7315f4faab2f700fc6b4704bb801c46ff6327ac", + "function": null, + "arguments": [ + "0xac485391EB2d7D88253a7F1eF18C37f4242D1A24", + "0xD7BE2Fd98BfD64c1dfCf6c013fC593eF09219994", + "0xC39F0C944FB3eeF9cd2556488e37d7895DC77aB8", + "0x2eE6Eca46d2406454708a1C80356a6E63b57D404", + "0x0c92121A7C15cF01041e1122483Bc173Baccd877" + ], + "transaction": { + "from": "0xbfc03d7c2527dd6f45f63f0d71adb36b8549fb58", + "gas": "0x1e6374", + "value": "0x0", + "input": "0x6101206040523480156200001257600080fd5b5060405162001e8038038062001e80833981016040819052620000359162000389565b33806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620002fe565b506001600160a01b038516620000e75760405162461bcd60e51b815260206004820152603960248201527f4c3241697264726f703a204c32204c69736b20546f6b656e20636f6e7472616360448201527f7420616464726573732063616e206e6f74206265207a65726f00000000000000606482015260840162000054565b6001600160a01b038416620001655760405162461bcd60e51b815260206004820152603460248201527f4c3241697264726f703a204c3220436c61696d20636f6e74726163742061646460448201527f726573732063616e206e6f74206265207a65726f000000000000000000000000606482015260840162000054565b6001600160a01b038316620001e35760405162461bcd60e51b815260206004820152603f60248201527f4c3241697264726f703a204c32204c6f636b696e6720506f736974696f6e206360448201527f6f6e747261637420616464726573732063616e206e6f74206265207a65726f00606482015260840162000054565b6001600160a01b038216620002615760405162461bcd60e51b815260206004820152603b60248201527f4c3241697264726f703a204c3220566f74696e6720506f77657220636f6e747260448201527f61637420616464726573732063616e206e6f74206265207a65726f0000000000606482015260840162000054565b6001600160a01b038116620002d35760405162461bcd60e51b815260206004820152603160248201527f4c3241697264726f703a2041697264726f702077616c6c657420616464726573604482015270732063616e206e6f74206265207a65726f60781b606482015260840162000054565b6001600160a01b0394851660805291841660c05291831660a05290821660e0521661010052620003f9565b600180546001600160a01b031916905562000319816200031c565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200038457600080fd5b919050565b600080600080600060a08688031215620003a257600080fd5b620003ad866200036c565b9450620003bd602087016200036c565b9350620003cd604087016200036c565b9250620003dd606087016200036c565b9150620003ed608087016200036c565b90509295509295909350565b60805160a05160c05160e05161010051611a036200047d6000396000818161039901528181610e6e0152610f8001526000818161040c0152611186015260008181610433015261133001526000818161032e0152818161063d01526108fe0152600081816102b601528181610b9e01528181610de40152610ea30152611a036000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c80639ce3fdac11610125578063d586b74c116100ad578063e83c91371161007c578063e83c91371461050e578063eff6edd71461053e578063f1e88e9114610546578063f2fde38b14610559578063f31886791461056c57600080fd5b8063d586b74c146104b8578063d65a7cb3146104c6578063e30c3978146104f5578063e3fe1cfb1461050657600080fd5b8063afda4a14116100f4578063afda4a141461042e578063b1e70fd414610455578063c020de751461045d578063c90950ef14610465578063c9c5841a1461049557600080fd5b80639ce3fdac14610394578063a88bedea146103bb578063ad1eba5d146103d8578063ae259f631461040757600080fd5b80634e49ca56116101a8578063715018a611610177578063715018a61461035857806379ba5097146103605780637cb64759146103685780638da5cb5b1461037b5780638f6bb5951461038c57600080fd5b80634e49ca56146103035780635b1f3b0b146103165780635b26dfcd146103295780636fe895bb1461035057600080fd5b806336e10675116101e457806336e10675146102a057806340306fb6146102a8578063469b8c8a146102b15780634b169ec5146102f057600080fd5b8063014f91eb146102165780630c1646b71461025a5780632eb4a7ab1461026f57806336b5b05a14610286575b600080fd5b6102456102243660046115aa565b6001600160601b031916600090815260046020526040902054600816151590565b60405190151581526020015b60405180910390f35b61026d610268366004611659565b610574565b005b61027860025481565b604051908152602001610251565b61028e600581565b60405160ff9091168152602001610251565b61028e600281565b61027860035481565b6102d87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610251565b6102456102fe366004611720565b610cc7565b610245610311366004611744565b610d09565b610245610324366004611744565b610d20565b6102d87f000000000000000000000000000000000000000000000000000000000000000081565b61026d610d2e565b61026d610fe5565b61026d610ff9565b61026d610376366004611770565b61103d565b6000546001600160a01b03166102d8565b61028e600181565b6102d87f000000000000000000000000000000000000000000000000000000000000000081565b6103c3601e81565b60405163ffffffff9091168152602001610251565b6102456103e63660046115aa565b6001600160601b031916600090815260046020526040902054600216151590565b6102d87f000000000000000000000000000000000000000000000000000000000000000081565b6102d87f000000000000000000000000000000000000000000000000000000000000000081565b6103c360b481565b61028e600481565b6102456104733660046115aa565b6001600160601b031916600090815260046020526040902054600f9081161490565b61028e6104a33660046115aa565b60046020526000908152604090205460ff1681565b610278662386f26fc1000081565b6102456104d43660046115aa565b6001600160601b031916600090815260046020526040902054600116151590565b6001546001600160a01b03166102d8565b61027860b481565b61024561051c3660046115aa565b6001600160601b03191660009081526004602081905260409091205416151590565b61028e600f81565b610245610554366004611720565b61113f565b61026d610567366004611720565b611208565b61028e600881565b60025460000361059f5760405162461bcd60e51b815260040161059690611789565b60405180910390fd5b6105ad60b4620151806117e5565b6003546105ba91906117fc565b4211156106135760405162461bcd60e51b815260206004820152602160248201527f4c3241697264726f703a2061697264726f7020706572696f64206973206f76656044820152603960f91b6064820152608401610596565b60405163132cebed60e01b81526001600160601b0319841660048201526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063132cebed90602401602060405180830381865afa158015610684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a8919061180f565b6001600160a01b0316036107245760405162461bcd60e51b815260206004820152603d60248201527f4c3241697264726f703a20746f6b656e732077657265206e6f7420636c61696d60448201527f6564207965742066726f6d2074686973204c69736b20616464726573730000006064820152608401610596565b600082116107745760405162461bcd60e51b815260206004820152601960248201527f4c3241697264726f703a20616d6f756e74206973207a65726f000000000000006044820152606401610596565b60008151116107c55760405162461bcd60e51b815260206004820181905260248201527f4c3241697264726f703a204d65726b6c652070726f6f6620697320656d7074796044820152606401610596565b600254604080516001600160601b03198616602082015290810184905261082391839160600160408051601f198184030181528282528051602091820120908301520160405160208183030381529060405280519060200120611279565b61086f5760405162461bcd60e51b815260206004820152601f60248201527f4c3241697264726f703a20696e76616c6964204d65726b6c652070726f6f66006044820152606401610596565b6001600160601b03198316600090815260046020526040902054600f16600e19016108dc5760405162461bcd60e51b815260206004820152601f60248201527f4c3241697264726f703a2066756c6c2061697264726f7020636c61696d6564006044820152606401610596565b60405163132cebed60e01b81526001600160601b0319841660048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063132cebed90602401602060405180830381865afa15801561094d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610971919061180f565b905060008061099b866001600160601b031916600090815260046020526040902054600116151590565b15156000036109fa576109ad83610cc7565b156109fa576109bd60048661182c565b6109c790836117fc565b6001600160601b031987166000908152600460205260409020805460ff19811660ff909116176001908117909155909250175b6001600160601b0319861660009081526004602052604081205460021615159003610a7557610a288361113f565b15610a7557610a3860048661182c565b610a4290836117fc565b6001600160601b031987166000908152600460205260409020805460ff19811660ff909116176002908117909155909250175b6001600160601b0319861660009081526004602081905260408220541615159003610af057610aa48386610d20565b15610af057610ab460048661182c565b610abe90836117fc565b6001600160601b031987166000908152600460208190526040909120805460ff19811660ff9091161782179055909250175b6001600160601b0319861660009081526004602052604081205460081615159003610b6c57610b1f8386610d09565b15610b6c57610b2f60048661182c565b610b3990836117fc565b6001600160601b031987166000908152600460205260409020805460ff19811660ff909116176008908117909155909250175b60ff811615610cbf5760405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490526000917f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303816000875af1158015610be9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0d919061184e565b905080610c6b5760405162461bcd60e51b815260206004820152602660248201527f4c3241697264726f703a204c324c69736b546f6b656e207472616e736665722060448201526519985a5b195960d21b6064820152608401610596565b6040805184815260ff841660208201526001600160a01b038616916001600160601b03198a16917f3b2bfebdc6e7973dbf6f6d7611b2002bc8d86694eec4b69d713aa50c88a5e334910160405180910390a3505b505050505050565b60006001600160a01b038216610cef5760405162461bcd60e51b815260040161059690611870565b50662386f26fc100006001600160a01b0390911631101590565b6000610d17838360b461128f565b90505b92915050565b6000610d178383601e61128f565b610d36611485565b600254600003610d585760405162461bcd60e51b815260040161059690611789565b42610d6760b4620151806117e5565b600354610d7491906117fc565b10610dcc5760405162461bcd60e51b815260206004820152602260248201527f4c3241697264726f703a2061697264726f70206973206e6f74206f7665722079604482015261195d60f21b6064820152608401610596565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610e33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5791906118b8565b60405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390529192506000917f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015610eec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f10919061184e565b905080610f7e5760405162461bcd60e51b815260206004820152603660248201527f4c3241697264726f703a204c534b20746f6b656e207472616e7366657220746f60448201527508105a5c991c9bdc081dd85b1b195d0819985a5b195960521b6064820152608401610596565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f29818c26d013f471105834e90742e8b609d6a9990c9843162c3859f2dd3ff6f883604051610fd991815260200190565b60405180910390a25050565b610fed611485565b610ff760006114b2565b565b60015433906001600160a01b031681146110315760405163118cdaa760e01b81526001600160a01b0382166004820152602401610596565b61103a816114b2565b50565b611045611485565b60008190036110a55760405162461bcd60e51b815260206004820152602660248201527f4c3241697264726f703a204d65726b6c6520726f6f742063616e206e6f74206260448201526565207a65726f60d01b6064820152608401610596565b600254156111005760405162461bcd60e51b815260206004820152602260248201527f4c3241697264726f703a204d65726b6c6520726f6f7420616c72656164792073604482015261195d60f21b6064820152608401610596565b6002819055426003556040518181527f42cbc405e4dbf1b691e85b9a34b08ecfcf7a9ad9078bf4d645ccfa1fac11c10b9060200160405180910390a150565b60006001600160a01b0382166111675760405162461bcd60e51b815260040161059690611870565b604051632c3e6f0f60e11b81526001600160a01b0383811660048301527f00000000000000000000000000000000000000000000000000000000000000009160009183169063587cde1e90602401602060405180830381865afa1580156111d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f6919061180f565b6001600160a01b031614159392505050565b611210611485565b600180546001600160a01b0383166001600160a01b031990911681179091556112416000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60008261128685846114cb565b14949350505050565b60006001600160a01b0384166112b75760405162461bcd60e51b815260040161059690611870565b600083116113115760405162461bcd60e51b815260206004820152602160248201527f4c3241697264726f703a2061697264726f7020616d6f756e74206973207a65726044820152606f60f81b6064820152608401610596565b60405163390f0add60e21b81526001600160a01b0385811660048301527f00000000000000000000000000000000000000000000000000000000000000009160009183169063e43c2b7490602401600060405180830381865afa15801561137c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113a491908101906118d1565b90506000805b82518110156114685760008382815181106113c7576113c76119a4565b60200260200101519050600081606001511115611406578663ffffffff168160600151106114015760208101516113fe90846117fc565b92505b61145e565b611413620151804261182c565b816040015110156114245750611460565b63ffffffff8716611438620151804261182c565b826040015161144791906119ba565b1061145e57602081015161145b90846117fc565b92505b505b6001016113aa565b5060006114768760056117e5565b90911015979650505050505050565b6000546001600160a01b03163314610ff75760405163118cdaa760e01b8152336004820152602401610596565b600180546001600160a01b031916905561103a8161150e565b600081815b8451811015611506576114fc828683815181106114ef576114ef6119a4565b602002602001015161155e565b91506001016114d0565b509392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081831061157a576000828152602084905260409020610d17565b6000838152602083905260409020610d17565b80356001600160601b0319811681146115a557600080fd5b919050565b6000602082840312156115bc57600080fd5b610d178261158d565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff811182821017156115fe576115fe6115c5565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561162d5761162d6115c5565b604052919050565b600067ffffffffffffffff82111561164f5761164f6115c5565b5060051b60200190565b60008060006060848603121561166e57600080fd5b6116778461158d565b92506020808501359250604085013567ffffffffffffffff81111561169b57600080fd5b8501601f810187136116ac57600080fd5b80356116bf6116ba82611635565b611604565b81815260059190911b820183019083810190898311156116de57600080fd5b928401925b828410156116fc578335825292840192908401906116e3565b80955050505050509250925092565b6001600160a01b038116811461103a57600080fd5b60006020828403121561173257600080fd5b813561173d8161170b565b9392505050565b6000806040838503121561175757600080fd5b82356117628161170b565b946020939093013593505050565b60006020828403121561178257600080fd5b5035919050565b60208082526026908201527f4c3241697264726f703a2061697264726f7020686173206e6f742073746172746040820152651959081e595d60d21b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610d1a57610d1a6117cf565b80820180821115610d1a57610d1a6117cf565b60006020828403121561182157600080fd5b815161173d8161170b565b60008261184957634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561186057600080fd5b8151801515811461173d57600080fd5b60208082526028908201527f4c3241697264726f703a20726563697069656e7420697320746865207a65726f604082015267206164647265737360c01b606082015260800190565b6000602082840312156118ca57600080fd5b5051919050565b600060208083850312156118e457600080fd5b825167ffffffffffffffff8111156118fb57600080fd5b8301601f8101851361190c57600080fd5b805161191a6116ba82611635565b81815260079190911b8201830190838101908783111561193957600080fd5b928401925b8284101561199957608084890312156119575760008081fd5b61195f6115db565b845161196a8161170b565b81528486015186820152604080860151908201526060808601519082015282526080909301929084019061193e565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b81810381811115610d1a57610d1a6117cf56fea2646970667358221220eda5c333112b82a7b5f246081065b9f44f3160b21000474b59f71a29a0c7373d64736f6c63430008170033000000000000000000000000ac485391eb2d7d88253a7f1ef18c37f4242d1a24000000000000000000000000d7be2fd98bfd64c1dfcf6c013fc593ef09219994000000000000000000000000c39f0c944fb3eef9cd2556488e37d7895dc77ab80000000000000000000000002ee6eca46d2406454708a1c80356a6e63b57d4040000000000000000000000000c92121a7c15cf01041e1122483bc173baccd877", + "nonce": "0x29", + "chainId": "0x46f" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x3d3b3f46df903bd3300c42bf5d56d93bdd79a9df16f84c87567b77d5469bbc24", + "transactionType": "CALL", + "contractName": "L2Airdrop", + "contractAddress": "0xc7315f4faab2f700fc6b4704bb801c46ff6327ac", + "function": "setMerkleRoot(bytes32)", + "arguments": [ + "0xc9c5c3ff2bc0e187905fe3434e17655c1e2c2aed85f008c04156d8ddb7d4b151" + ], + "transaction": { + "from": "0xbfc03d7c2527dd6f45f63f0d71adb36b8549fb58", + "to": "0xc7315f4faab2f700fc6b4704bb801c46ff6327ac", + "gas": "0x18c4c", + "value": "0x0", + "input": "0x7cb64759c9c5c3ff2bc0e187905fe3434e17655c1e2c2aed85f008c04156d8ddb7d4b151", + "nonce": "0x2a", + "chainId": "0x46f" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x2c7093ee9c73c50038675280f64a19e1be341e8bbcd05d0ec64fbcba2d8aa706", + "transactionType": "CALL", + "contractName": "L2Airdrop", + "contractAddress": "0xc7315f4faab2f700fc6b4704bb801c46ff6327ac", + "function": "transferOwnership(address)", + "arguments": [ + "0x394Ae9d48eeca1C69a989B5A8C787081595c55A7" + ], + "transaction": { + "from": "0xbfc03d7c2527dd6f45f63f0d71adb36b8549fb58", + "to": "0xc7315f4faab2f700fc6b4704bb801c46ff6327ac", + "gas": "0x1115d", + "value": "0x0", + "input": "0xf2fde38b000000000000000000000000394ae9d48eeca1c69a989b5a8c787081595c55a7", + "nonce": "0x2b", + "chainId": "0x46f" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x180d57", + "logs": [ + { + "address": "0xc7315f4faab2f700fc6b4704bb801c46ff6327ac", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000bfc03d7c2527dd6f45f63f0d71adb36b8549fb58" + ], + "data": "0x", + "blockHash": "0xbd9df03b4449aeb7a55d89e3e441f765c4393fcb436d7036e7769fd5ecfd465b", + "blockNumber": "0x238f3b", + "transactionHash": "0xe05153aef79518cbc180e1aa7195c8b4f201a27cc50a852490b9bd2a7bccf3e8", + "transactionIndex": "0x1", + "logIndex": "0x0", + "removed": false + } + ], + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000002020000000000000000000010000000020000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0xe05153aef79518cbc180e1aa7195c8b4f201a27cc50a852490b9bd2a7bccf3e8", + "transactionIndex": "0x1", + "blockHash": "0xbd9df03b4449aeb7a55d89e3e441f765c4393fcb436d7036e7769fd5ecfd465b", + "blockNumber": "0x238f3b", + "gasUsed": "0x176224", + "effectiveGasPrice": "0x407", + "from": "0xbfc03d7c2527dd6f45f63f0d71adb36b8549fb58", + "to": null, + "contractAddress": "0xc7315f4faab2f700fc6b4704bb801c46ff6327ac", + "l1Fee": "0x3cb62880edf", + "l1GasPrice": "0x7771008b", + "l1GasUsed": "0x1d504" + }, + { + "status": "0x1", + "cumulativeGasUsed": "0x1ba2c", + "logs": [ + { + "address": "0xc7315f4faab2f700fc6b4704bb801c46ff6327ac", + "topics": [ + "0x42cbc405e4dbf1b691e85b9a34b08ecfcf7a9ad9078bf4d645ccfa1fac11c10b" + ], + "data": "0xc9c5c3ff2bc0e187905fe3434e17655c1e2c2aed85f008c04156d8ddb7d4b151", + "blockHash": "0xb270ebc8e08aa379c9146908f8d060db397d54a5472a155a9e33400398949cee", + "blockNumber": "0x238f3c", + "transactionHash": "0x3d3b3f46df903bd3300c42bf5d56d93bdd79a9df16f84c87567b77d5469bbc24", + "transactionIndex": "0x1", + "logIndex": "0x0", + "removed": false + } + ], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000001000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x3d3b3f46df903bd3300c42bf5d56d93bdd79a9df16f84c87567b77d5469bbc24", + "transactionIndex": "0x1", + "blockHash": "0xb270ebc8e08aa379c9146908f8d060db397d54a5472a155a9e33400398949cee", + "blockNumber": "0x238f3c", + "gasUsed": "0x10ef9", + "effectiveGasPrice": "0x408", + "from": "0xbfc03d7c2527dd6f45f63f0d71adb36b8549fb58", + "to": "0xc7315f4faab2f700fc6b4704bb801c46ff6327ac", + "contractAddress": null, + "l1Fee": "0x121702ddcb", + "l1GasPrice": "0x7771008b", + "l1GasUsed": "0x8bc" + }, + { + "status": "0x1", + "cumulativeGasUsed": "0x27517", + "logs": [ + { + "address": "0xc7315f4faab2f700fc6b4704bb801c46ff6327ac", + "topics": [ + "0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700", + "0x000000000000000000000000bfc03d7c2527dd6f45f63f0d71adb36b8549fb58", + "0x000000000000000000000000394ae9d48eeca1c69a989b5a8c787081595c55a7" + ], + "data": "0x", + "blockHash": "0xb270ebc8e08aa379c9146908f8d060db397d54a5472a155a9e33400398949cee", + "blockNumber": "0x238f3c", + "transactionHash": "0x2c7093ee9c73c50038675280f64a19e1be341e8bbcd05d0ec64fbcba2d8aa706", + "transactionIndex": "0x2", + "logIndex": "0x1", + "removed": false + } + ], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000800000040000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000020000000000000000000000000000000000000400000000000000002000000000000000080000000000000000000000000000000000002000000000008000000000010000000020000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x2c7093ee9c73c50038675280f64a19e1be341e8bbcd05d0ec64fbcba2d8aa706", + "transactionIndex": "0x2", + "blockHash": "0xb270ebc8e08aa379c9146908f8d060db397d54a5472a155a9e33400398949cee", + "blockNumber": "0x238f3c", + "gasUsed": "0xbaeb", + "effectiveGasPrice": "0x408", + "from": "0xbfc03d7c2527dd6f45f63f0d71adb36b8549fb58", + "to": "0xc7315f4faab2f700fc6b4704bb801c46ff6327ac", + "contractAddress": null, + "l1Fee": "0x111e7a3d83", + "l1GasPrice": "0x7771008b", + "l1GasUsed": "0x844" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1719389671, + "chain": 1135, + "commit": "74a0da4" +} \ No newline at end of file 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/artifacts/records/sepolia/L2Airdrop.s.sol/run-1717681663.json b/deployment/artifacts/records/sepolia/L2Airdrop.s.sol/run-1717681663.json new file mode 100644 index 00000000..7d1d90ad --- /dev/null +++ b/deployment/artifacts/records/sepolia/L2Airdrop.s.sol/run-1717681663.json @@ -0,0 +1,56 @@ +{ + "transactions": [ + { + "hash": "0x0a17ff0315e6c8471c0ad843380aa5a31d67fc8dc7d933232659f42a8cb9dc57", + "transactionType": "CREATE", + "contractName": "L2Airdrop", + "contractAddress": "0xdde1998b8842b1c925eef7edfdaa2df24a75048a", + "function": null, + "arguments": [ + "0x8a21CF9Ba08Ae709D64Cb25AfAA951183EC9FF6D", + "0x3D4190b08E3E30183f5AdE3A116f2534Ee3a4f94", + "0x1220Cd967ED2EE4c593211EabCb2E3b1dC8E4930", + "0xa52Ba291Ec45d8037510D5Da857f59abfA3DC0C5", + "0xaF3f4B5033Ef666b3F3EA91a0f360541cC21e5d7" + ], + "transaction": { + "from": "0xc5827d97ed612500e9b35a470d053563b1555aea", + "gas": "0x1e6374", + "value": "0x0", + "input": "0x6101206040523480156200001257600080fd5b5060405162001e8038038062001e80833981016040819052620000359162000389565b33806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200006881620002fe565b506001600160a01b038516620000e75760405162461bcd60e51b815260206004820152603960248201527f4c3241697264726f703a204c32204c69736b20546f6b656e20636f6e7472616360448201527f7420616464726573732063616e206e6f74206265207a65726f00000000000000606482015260840162000054565b6001600160a01b038416620001655760405162461bcd60e51b815260206004820152603460248201527f4c3241697264726f703a204c3220436c61696d20636f6e74726163742061646460448201527f726573732063616e206e6f74206265207a65726f000000000000000000000000606482015260840162000054565b6001600160a01b038316620001e35760405162461bcd60e51b815260206004820152603f60248201527f4c3241697264726f703a204c32204c6f636b696e6720506f736974696f6e206360448201527f6f6e747261637420616464726573732063616e206e6f74206265207a65726f00606482015260840162000054565b6001600160a01b038216620002615760405162461bcd60e51b815260206004820152603b60248201527f4c3241697264726f703a204c3220566f74696e6720506f77657220636f6e747260448201527f61637420616464726573732063616e206e6f74206265207a65726f0000000000606482015260840162000054565b6001600160a01b038116620002d35760405162461bcd60e51b815260206004820152603160248201527f4c3241697264726f703a2041697264726f702077616c6c657420616464726573604482015270732063616e206e6f74206265207a65726f60781b606482015260840162000054565b6001600160a01b0394851660805291841660c05291831660a05290821660e0521661010052620003f9565b600180546001600160a01b031916905562000319816200031c565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200038457600080fd5b919050565b600080600080600060a08688031215620003a257600080fd5b620003ad866200036c565b9450620003bd602087016200036c565b9350620003cd604087016200036c565b9250620003dd606087016200036c565b9150620003ed608087016200036c565b90509295509295909350565b60805160a05160c05160e05161010051611a036200047d6000396000818161039901528181610e6e0152610f8001526000818161040c0152611186015260008181610433015261133001526000818161032e0152818161063d01526108fe0152600081816102b601528181610b9e01528181610de40152610ea30152611a036000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c80639ce3fdac11610125578063d586b74c116100ad578063e83c91371161007c578063e83c91371461050e578063eff6edd71461053e578063f1e88e9114610546578063f2fde38b14610559578063f31886791461056c57600080fd5b8063d586b74c146104b8578063d65a7cb3146104c6578063e30c3978146104f5578063e3fe1cfb1461050657600080fd5b8063afda4a14116100f4578063afda4a141461042e578063b1e70fd414610455578063c020de751461045d578063c90950ef14610465578063c9c5841a1461049557600080fd5b80639ce3fdac14610394578063a88bedea146103bb578063ad1eba5d146103d8578063ae259f631461040757600080fd5b80634e49ca56116101a8578063715018a611610177578063715018a61461035857806379ba5097146103605780637cb64759146103685780638da5cb5b1461037b5780638f6bb5951461038c57600080fd5b80634e49ca56146103035780635b1f3b0b146103165780635b26dfcd146103295780636fe895bb1461035057600080fd5b806336e10675116101e457806336e10675146102a057806340306fb6146102a8578063469b8c8a146102b15780634b169ec5146102f057600080fd5b8063014f91eb146102165780630c1646b71461025a5780632eb4a7ab1461026f57806336b5b05a14610286575b600080fd5b6102456102243660046115aa565b6001600160601b031916600090815260046020526040902054600816151590565b60405190151581526020015b60405180910390f35b61026d610268366004611659565b610574565b005b61027860025481565b604051908152602001610251565b61028e600581565b60405160ff9091168152602001610251565b61028e600281565b61027860035481565b6102d87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610251565b6102456102fe366004611720565b610cc7565b610245610311366004611744565b610d09565b610245610324366004611744565b610d20565b6102d87f000000000000000000000000000000000000000000000000000000000000000081565b61026d610d2e565b61026d610fe5565b61026d610ff9565b61026d610376366004611770565b61103d565b6000546001600160a01b03166102d8565b61028e600181565b6102d87f000000000000000000000000000000000000000000000000000000000000000081565b6103c3601e81565b60405163ffffffff9091168152602001610251565b6102456103e63660046115aa565b6001600160601b031916600090815260046020526040902054600216151590565b6102d87f000000000000000000000000000000000000000000000000000000000000000081565b6102d87f000000000000000000000000000000000000000000000000000000000000000081565b6103c360b481565b61028e600481565b6102456104733660046115aa565b6001600160601b031916600090815260046020526040902054600f9081161490565b61028e6104a33660046115aa565b60046020526000908152604090205460ff1681565b610278662386f26fc1000081565b6102456104d43660046115aa565b6001600160601b031916600090815260046020526040902054600116151590565b6001546001600160a01b03166102d8565b61027860b481565b61024561051c3660046115aa565b6001600160601b03191660009081526004602081905260409091205416151590565b61028e600f81565b610245610554366004611720565b61113f565b61026d610567366004611720565b611208565b61028e600881565b60025460000361059f5760405162461bcd60e51b815260040161059690611789565b60405180910390fd5b6105ad60b4620151806117e5565b6003546105ba91906117fc565b4211156106135760405162461bcd60e51b815260206004820152602160248201527f4c3241697264726f703a2061697264726f7020706572696f64206973206f76656044820152603960f91b6064820152608401610596565b60405163132cebed60e01b81526001600160601b0319841660048201526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063132cebed90602401602060405180830381865afa158015610684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a8919061180f565b6001600160a01b0316036107245760405162461bcd60e51b815260206004820152603d60248201527f4c3241697264726f703a20746f6b656e732077657265206e6f7420636c61696d60448201527f6564207965742066726f6d2074686973204c69736b20616464726573730000006064820152608401610596565b600082116107745760405162461bcd60e51b815260206004820152601960248201527f4c3241697264726f703a20616d6f756e74206973207a65726f000000000000006044820152606401610596565b60008151116107c55760405162461bcd60e51b815260206004820181905260248201527f4c3241697264726f703a204d65726b6c652070726f6f6620697320656d7074796044820152606401610596565b600254604080516001600160601b03198616602082015290810184905261082391839160600160408051601f198184030181528282528051602091820120908301520160405160208183030381529060405280519060200120611279565b61086f5760405162461bcd60e51b815260206004820152601f60248201527f4c3241697264726f703a20696e76616c6964204d65726b6c652070726f6f66006044820152606401610596565b6001600160601b03198316600090815260046020526040902054600f16600e19016108dc5760405162461bcd60e51b815260206004820152601f60248201527f4c3241697264726f703a2066756c6c2061697264726f7020636c61696d6564006044820152606401610596565b60405163132cebed60e01b81526001600160601b0319841660048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063132cebed90602401602060405180830381865afa15801561094d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610971919061180f565b905060008061099b866001600160601b031916600090815260046020526040902054600116151590565b15156000036109fa576109ad83610cc7565b156109fa576109bd60048661182c565b6109c790836117fc565b6001600160601b031987166000908152600460205260409020805460ff19811660ff909116176001908117909155909250175b6001600160601b0319861660009081526004602052604081205460021615159003610a7557610a288361113f565b15610a7557610a3860048661182c565b610a4290836117fc565b6001600160601b031987166000908152600460205260409020805460ff19811660ff909116176002908117909155909250175b6001600160601b0319861660009081526004602081905260408220541615159003610af057610aa48386610d20565b15610af057610ab460048661182c565b610abe90836117fc565b6001600160601b031987166000908152600460208190526040909120805460ff19811660ff9091161782179055909250175b6001600160601b0319861660009081526004602052604081205460081615159003610b6c57610b1f8386610d09565b15610b6c57610b2f60048661182c565b610b3990836117fc565b6001600160601b031987166000908152600460205260409020805460ff19811660ff909116176008908117909155909250175b60ff811615610cbf5760405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490526000917f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303816000875af1158015610be9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0d919061184e565b905080610c6b5760405162461bcd60e51b815260206004820152602660248201527f4c3241697264726f703a204c324c69736b546f6b656e207472616e736665722060448201526519985a5b195960d21b6064820152608401610596565b6040805184815260ff841660208201526001600160a01b038616916001600160601b03198a16917f3b2bfebdc6e7973dbf6f6d7611b2002bc8d86694eec4b69d713aa50c88a5e334910160405180910390a3505b505050505050565b60006001600160a01b038216610cef5760405162461bcd60e51b815260040161059690611870565b50662386f26fc100006001600160a01b0390911631101590565b6000610d17838360b461128f565b90505b92915050565b6000610d178383601e61128f565b610d36611485565b600254600003610d585760405162461bcd60e51b815260040161059690611789565b42610d6760b4620151806117e5565b600354610d7491906117fc565b10610dcc5760405162461bcd60e51b815260206004820152602260248201527f4c3241697264726f703a2061697264726f70206973206e6f74206f7665722079604482015261195d60f21b6064820152608401610596565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610e33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5791906118b8565b60405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390529192506000917f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015610eec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f10919061184e565b905080610f7e5760405162461bcd60e51b815260206004820152603660248201527f4c3241697264726f703a204c534b20746f6b656e207472616e7366657220746f60448201527508105a5c991c9bdc081dd85b1b195d0819985a5b195960521b6064820152608401610596565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f29818c26d013f471105834e90742e8b609d6a9990c9843162c3859f2dd3ff6f883604051610fd991815260200190565b60405180910390a25050565b610fed611485565b610ff760006114b2565b565b60015433906001600160a01b031681146110315760405163118cdaa760e01b81526001600160a01b0382166004820152602401610596565b61103a816114b2565b50565b611045611485565b60008190036110a55760405162461bcd60e51b815260206004820152602660248201527f4c3241697264726f703a204d65726b6c6520726f6f742063616e206e6f74206260448201526565207a65726f60d01b6064820152608401610596565b600254156111005760405162461bcd60e51b815260206004820152602260248201527f4c3241697264726f703a204d65726b6c6520726f6f7420616c72656164792073604482015261195d60f21b6064820152608401610596565b6002819055426003556040518181527f42cbc405e4dbf1b691e85b9a34b08ecfcf7a9ad9078bf4d645ccfa1fac11c10b9060200160405180910390a150565b60006001600160a01b0382166111675760405162461bcd60e51b815260040161059690611870565b604051632c3e6f0f60e11b81526001600160a01b0383811660048301527f00000000000000000000000000000000000000000000000000000000000000009160009183169063587cde1e90602401602060405180830381865afa1580156111d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f6919061180f565b6001600160a01b031614159392505050565b611210611485565b600180546001600160a01b0383166001600160a01b031990911681179091556112416000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60008261128685846114cb565b14949350505050565b60006001600160a01b0384166112b75760405162461bcd60e51b815260040161059690611870565b600083116113115760405162461bcd60e51b815260206004820152602160248201527f4c3241697264726f703a2061697264726f7020616d6f756e74206973207a65726044820152606f60f81b6064820152608401610596565b60405163390f0add60e21b81526001600160a01b0385811660048301527f00000000000000000000000000000000000000000000000000000000000000009160009183169063e43c2b7490602401600060405180830381865afa15801561137c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113a491908101906118d1565b90506000805b82518110156114685760008382815181106113c7576113c76119a4565b60200260200101519050600081606001511115611406578663ffffffff168160600151106114015760208101516113fe90846117fc565b92505b61145e565b611413620151804261182c565b816040015110156114245750611460565b63ffffffff8716611438620151804261182c565b826040015161144791906119ba565b1061145e57602081015161145b90846117fc565b92505b505b6001016113aa565b5060006114768760056117e5565b90911015979650505050505050565b6000546001600160a01b03163314610ff75760405163118cdaa760e01b8152336004820152602401610596565b600180546001600160a01b031916905561103a8161150e565b600081815b8451811015611506576114fc828683815181106114ef576114ef6119a4565b602002602001015161155e565b91506001016114d0565b509392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081831061157a576000828152602084905260409020610d17565b6000838152602083905260409020610d17565b80356001600160601b0319811681146115a557600080fd5b919050565b6000602082840312156115bc57600080fd5b610d178261158d565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff811182821017156115fe576115fe6115c5565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561162d5761162d6115c5565b604052919050565b600067ffffffffffffffff82111561164f5761164f6115c5565b5060051b60200190565b60008060006060848603121561166e57600080fd5b6116778461158d565b92506020808501359250604085013567ffffffffffffffff81111561169b57600080fd5b8501601f810187136116ac57600080fd5b80356116bf6116ba82611635565b611604565b81815260059190911b820183019083810190898311156116de57600080fd5b928401925b828410156116fc578335825292840192908401906116e3565b80955050505050509250925092565b6001600160a01b038116811461103a57600080fd5b60006020828403121561173257600080fd5b813561173d8161170b565b9392505050565b6000806040838503121561175757600080fd5b82356117628161170b565b946020939093013593505050565b60006020828403121561178257600080fd5b5035919050565b60208082526026908201527f4c3241697264726f703a2061697264726f7020686173206e6f742073746172746040820152651959081e595d60d21b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610d1a57610d1a6117cf565b80820180821115610d1a57610d1a6117cf565b60006020828403121561182157600080fd5b815161173d8161170b565b60008261184957634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561186057600080fd5b8151801515811461173d57600080fd5b60208082526028908201527f4c3241697264726f703a20726563697069656e7420697320746865207a65726f604082015267206164647265737360c01b606082015260800190565b6000602082840312156118ca57600080fd5b5051919050565b600060208083850312156118e457600080fd5b825167ffffffffffffffff8111156118fb57600080fd5b8301601f8101851361190c57600080fd5b805161191a6116ba82611635565b81815260079190911b8201830190838101908783111561193957600080fd5b928401925b8284101561199957608084890312156119575760008081fd5b61195f6115db565b845161196a8161170b565b81528486015186820152604080860151908201526060808601519082015282526080909301929084019061193e565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b81810381811115610d1a57610d1a6117cf56fea2646970667358221220eda5c333112b82a7b5f246081065b9f44f3160b21000474b59f71a29a0c7373d64736f6c634300081700330000000000000000000000008a21cf9ba08ae709d64cb25afaa951183ec9ff6d0000000000000000000000003d4190b08e3e30183f5ade3a116f2534ee3a4f940000000000000000000000001220cd967ed2ee4c593211eabcb2e3b1dc8e4930000000000000000000000000a52ba291ec45d8037510d5da857f59abfa3dc0c5000000000000000000000000af3f4b5033ef666b3f3ea91a0f360541cc21e5d7", + "nonce": "0x67", + "chainId": "0x106a" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xcba580dac467a77d9f58b44a39a556db59d545e570d8198d7ba6c98d50704864", + "transactionType": "CALL", + "contractName": "L2Airdrop", + "contractAddress": "0xdde1998b8842b1c925eef7edfdaa2df24a75048a", + "function": "transferOwnership(address)", + "arguments": [ + "0x84277C9255b3B6904aCfe12C2c45c6a36E81B059" + ], + "transaction": { + "from": "0xc5827d97ed612500e9b35a470d053563b1555aea", + "to": "0xdde1998b8842b1c925eef7edfdaa2df24a75048a", + "gas": "0x1115d", + "value": "0x0", + "input": "0xf2fde38b00000000000000000000000084277c9255b3b6904acfe12c2c45c6a36e81b059", + "nonce": "0x68", + "chainId": "0x106a" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1717681663, + "chain": 4202, + "commit": "c3982ef" +} \ No newline at end of file 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/documentation/README.md b/documentation/README.md index 4ef4c24c..22e56d35 100644 --- a/documentation/README.md +++ b/documentation/README.md @@ -11,3 +11,5 @@ This folder contains the following documents essential for understanding the dep 4. [Vesting Documentation](./vesting.md): This page explains the technical details concerning implementation, deployment and maintenance of vesting smart contracts that hold LSK tokens and release them according to predefined schedules. 5. [Migration Airdrop Documentation](./airdrop.md): This page explains the technical details concerning design and lifecycle of the migration airdrop smart contract that distributes LSK tokens as a reward to the users that migrated from the Lisk L1 network. + +6. [Staking and Lisk DAO Documentation](./staking-governance.md): This page explains the technical details concerning Staking and Lisk DAO. The two topics are combined in one document as they are strongly linked to each other. \ No newline at end of file diff --git a/documentation/diagrams/delegating.png b/documentation/diagrams/delegating.png index 7cb6efb9..f4466f99 100644 Binary files a/documentation/diagrams/delegating.png and b/documentation/diagrams/delegating.png differ diff --git a/documentation/staking-governance.md b/documentation/staking-governance.md index c24b792b..a3d5b1fb 100644 --- a/documentation/staking-governance.md +++ b/documentation/staking-governance.md @@ -13,37 +13,53 @@ This design with selectable locking duration helps to align token holders with t The mechanism for locking tokens works as follows: -- Users can lock tokens for a specific locking duration (between 2 weeks and 2 years). After the locking duration ends, the users can redeem their tokens. -- Users can modify their locking positions (increase amount, extend locking duration) at any time. -- Users have the option to pause their locking period countdown. That means, the remaining locking duration remains fixed until the user decides to resume it. Note that this results in higher voting power and staking rewards as described below. +- Users can **lock** tokens for a specific locking duration (between 2 weeks and 2 years). After the locking duration ends, the users can unlock their tokens. +- Users can **modify** their locking positions (increase amount, extend locking duration) at any time. +- Users have the option to **pause** their locking period countdown. That means, the remaining locking duration remains fixed until the user decides to resume it. Note that this results in higher voting power and staking rewards as [described below](#pausing-a-locking-position). - Each user may have multiple locking positions. -- Locking positions are represented using NFTs for composability into DeFi and potential future uses. -- In case a user wants to unlock earlier than the end of the locking duration, there is a fast unlock option. The fast unlock implies a penalty, i.e., an amount that is deducted from the locked LSK tokens. The penalty is set to `0.5 * lockedAmount * (remainingLockingDurationInDays / maximumLockingDuration)`, where `maximumLockingDuration` is set to 2 years. Users can then redeem their tokens after a 3-day emergency locking period. +- Locking positions are represented using **NFTs** for composability into DeFi and potential future uses. +- In case a user wants to unlock earlier than the end of the locking duration, there is a **fast unlock** option. The fast unlock implies a penalty, i.e., an amount that is deducted from the locked LSK tokens. The penalty is set to `0.5 * lockedAmount * (remainingLockingDurationInDays / maximumLockingDuration)`, where `maximumLockingDuration` is set to 2 years. Users can then unlock their tokens after a 3-day emergency locking period. - Confiscated tokens are immediately redirected to the staking rewards pool to be distributed over the next 14 days period on top of the guaranteed rewards. - - Users do not have the option to cancel the fast un-stake during this 3 day window. + - Users do not have the option to cancel the fast unlock during this 3 day window. ## Voting Power -The voting power for a locked amount of tokens is computed as follows: +The voting power of an account is expressed by the account's balance of another ERC20 contract, the *Voting Power* contract. The token symbol of this contract `vpLSK`. The voting power for a locked amount of tokens is computed as follows: -- Generally, locked tokens provide a voting power proportional to the amount of locked tokens. Concretely, 1 locked LSK provides one unit of voting power. -- In case a user pauses their locking period countdown, they receives a boost of the voting power meaning the voting power is set to `lockedAmount * (1 + remainingLockingDurationInDays/365)`. Hence, the voting power can be increased by up to 200%. +- Generally, locked tokens provide a voting power proportional to the amount of locked tokens. Concretely, 1 locked LSK provides 1 vpLSK. +- In case a user pauses their locking period countdown, they receive a boost of the voting power meaning the voting power is set to `lockedAmount * (1 + remainingLockingDurationInDays/365)`. Hence, the voting power can be increased by up to 200% by pausing a locking position with the maximum locking period of 2 years. + +### Voting Power for a Concrete Proposal + +At the time a proposal is created, a snapshot of the delegated voting power is taken and the voting result is based on this snapshot. Consequently, neither any changes in the voting power nor any delegations made after the proposal creation have any influence on the voting result. ## Staking Rewards -Users receive rewards for their locking tokens as follows: +Users receive rewards for locking their tokens as follows: + +- Rewards are calculated on a daily basis, based on the amount locked and the remaining locking duration. Concretely, the weight for a locked amount is given by `lockedAmount * (remainingLockingDurationInDays + 150)`. The total daily amount of staking rewards is then shared by all users proportional to their weight. That means, a position with weight `w` receives `totalDailyRewards * w / totalWeight`. +- Users can claim their rewards (and restake them immediately if they want) at any time. + +## Pausing a Locking Position -- Rewards are calculated on a daily basis, based on the amount locked and the remaining locking duration. Concretely, the weight for a locked amount is given by `lockedAmount * (remainingLockingDurationInDays + 150)`. The total daily amount of staking rewards is then shared by all users proportional to their weight. -- Users can claim their rewards (and restake them immediately if they want) at any time. +As mentioned in several places above, it is possible *to pause* the countdown of a locking position. This can be done at any time. Once paused, the remaining locking duration does not decrease anymore. The owner of the locking position can *resume* the countdown of the locking period an any point in time. Once resumed, the remaining locking duration descreases again daily. + +**Example**: A users creates a locking position on day 1 and with a locking duration of 30 days. On day 6, the remaining locking duration is 25 days. On the same day, the user pauses the locking pausition. On day 50, the remaining locking duration is still 25. The users resumes the countdown of the locking position on this day. On day 75, the reamining locking duration is zero and the user can unlock their tokens. + +What are the consequences of pausing the countdown: + +- The voting power is boosted, i.e. increased from `lockedAmount` to `lockedAmount * (1 + remainingLockingDurationInDays/365)`. +- The weight on the rewards calculation (`lockedAmount * (remainingLockingDurationInDays + 150)`) does not decrease daily (in contrast to unpaused locking positions) but remains fixed for the duration that the position remains paused. This results in higher staking rewards. +- The locking position does not expire. ## Onchain Governance -The main aspects of our onchain governance system are planned as follows: +The main aspects of our onchain governance system are as follows: - We use OpenZeppelin’s Governor contract framework and also manage the Lisk DAO treasury with it. - The following parameters are used: - - **Proposal threshold**: For creating a proposal, the voting power of the proposer must be at least 300,000, i.e., the value corresponding to 100,000 LSK locked for 2 years where the countdown is paused. - - **Quorum**: For a proposal to pass, the “yes” and “abstain” votes must sum up at least to 22,500,000, i.e., the value that corresponds to 7,500,000 LSK locked for 2 years where the countdown is paused. + - **Proposal threshold**: For creating a proposal, the voting power of the proposer must be at least 300,000 vpLSK, i.e., the value corresponding to 100,000 LSK locked for 2 years where the countdown is paused. + - **Quorum**: For a proposal to pass, the “yes” and “abstain” votes must sum up at least to 24,000,000 vpLSK, i.e., the value that corresponds to 8,000,000 LSK locked for 2 years where the countdown is paused. - A proposal is accepted if the quorum, as defined above, is reached, and if there are strictly more “yes” than “no” votes. - The onchain governance allows the following two proposal types: - **Funding proposals**: A proposal for receiving a certain amount of funds to an address. If passed, the recipient receives the amount given in the proposal. @@ -58,7 +74,7 @@ The graphic above shows all contracts involved in the staking and governance sys ### User Interaction -### Locking/Unlocking +#### Locking/Unlocking ![Locking/Unlocking/Modifying](diagrams/lock_unlock.png) @@ -66,23 +82,24 @@ There are two ways how the user can lock/unlock/modify a staking position. In th In the second way, the user calls the Reward contract. The Reward contract will call lock/unlock/modify in the Staking contract, which will trigger the same forwarded calls as in the first way. The difference is that the user will receive rewards for locking positions create this way. -### Delegating +#### Delegating ![Delegating](diagrams/delegating.png) For delegating, the user is interacting with the Voting Power contract directly. The Voting Power contract will emit events which will be used by Tally for indexing. -### Creating Proposals and Voting +#### Creating Proposals and Voting ![Creating Proposals](diagrams/create_proposal.png) For creating a proposal or voting on a proposal, the user is interacting with the Governor contract. The Governor contract will request the voting power of the proposer/voter in order to see if the user has enough voting power to create a proposal or for counting the voting results. Moreover, the Governor contract will emit events which will be used by Tally for indexing. -### Queueing and Executing Proposals +#### Queueing and Executing Proposals ![Queueing](diagrams/queue.png) If a proposal has an attached execution, e.g. a transfer of some treasury funds, and the proposal passed, then the proposal must be queued and then executed. For this, a user (this can be any user) must interact with the Governor contract. This one is forwarding the queue/execute operation to the Timelock Controller contract, and the Governor contract additionally emits events which Tally uses for indexing. The Governor contract is the only account that is allowed to queue proposals at the Timelock Controller. As all executions are eventually executed by the Timelock Controller, contracts owned by the Lisk DAO must be owned by the Timelock Controller, and the DAO treasury must be held by it as well. ### Implementation of Lisk Staking -[See Lisk Staking implementation page](./staking.md) \ No newline at end of file + +For details about the implementation of the staking sytem, see the [Lisk Staking implementation page](./staking-implementation.md) \ No newline at end of file diff --git a/documentation/staking.md b/documentation/staking-implementation.md similarity index 93% rename from documentation/staking.md rename to documentation/staking-implementation.md index 3e697db3..6f118d57 100644 --- a/documentation/staking.md +++ b/documentation/staking-implementation.md @@ -1,8 +1,4 @@ -# L2 Lisk Staking - -Staking L2 tokens creates additional utility of L2 Lisk token by allowing user to stake (Locking Position) an amount of token for a certain period of time allowing them to earn daily rewards and contribute to Governance. - -## Implementation +# Staking Implementation Implementation of L2 staking functionality is separated into, @@ -15,7 +11,7 @@ Implementation of L2 staking functionality is separated into, - `L2VotingPower` contract is an implementation of `ERC20Votes` token standard that maintains the voting power of an account. -### Structure of a Locking position +## Structure of a Locking position A locking position (or a stake) is represented as a custom data structure containing: ![Structure of a Locking position](diagrams/locking_position.png) @@ -27,11 +23,11 @@ A locking position (or a stake) is represented as a custom data structure contai | expDate | `uint256` | The expiration date, i.e., the day when the locked amount becomes claimable for the user. | | pausedLockingDuration | `uint256` | Remaining duration in days till the expiry once a paused locking position is resumed. It is set to zero if the locking position is not paused. | -### Identifying a Locking Position +## Identifying a Locking Position `L2LockingPosition` contract maintains a collection of locking positions against each user and uniquely identifies them with an identifier of type `uint256`. -### L2Reward Contract -#### Events emitted on interactions +## L2Reward Contract +### Events emitted on interactions `L2Reward` communicates changes to state made by the contract or other contracts it consumes through events: | Contract | Event | Description | @@ -44,12 +40,12 @@ A locking position (or a stake) is represented as a custom data structure contai | `L2LockingPosition` | `Transfer` | Emitted when a locking position is transferred to another account. | | `L2VotingPower` | `Transfer` | Emitted when external account creates or modifies a locking position, as the parameters of a locking position impact its owner's voting power by minting or burning some voting power tokens. | -#### API accessible to external user and Events +### API accessible to external user and Events The diagram highlights the public API accessible to external accounts and how creation and manipulations of locking positions consumes other smart contracts and the relevant events that are emitted. ![API accessible to external user and Events](diagrams/l2reward_external_account_api_and_events.png) -#### API accessible to the owner of L2Reward contract and Events +### API accessible to the owner of L2Reward contract and Events L2Reward contract is ownable and allows the contract owner to add funds for rewarding locking positions. Its owner can allocate new funds and unused rewards accumulated due to reward capping for a certain duration. ![API accessible to the owner of L2Reward contract and Events](diagrams/l2reward_owner_api_and_events.png) @@ -60,7 +56,7 @@ This contract exposes the public API to retrieve information about locking posit ![API L2LockingPosition](diagrams/l2lockingposition_api.png) -# Representing Time +## Representing Time Contracts involved in L2 Lisk staking maintains (UNIX epoch) time at the granularity of a day, instead of seconds. The day 19740, will be 19740 x 60 x 60 x 24 i.e. 1705536000 epoch seconds, any interactions at other higher-level environment must convert days to epoch time. \ No newline at end of file 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/data/mainnet/airdrop-merkle-root.json b/script/data/mainnet/airdrop-merkle-root.json new file mode 100644 index 00000000..1d955f99 --- /dev/null +++ b/script/data/mainnet/airdrop-merkle-root.json @@ -0,0 +1,3 @@ +{ + "merkleRoot": "0xc9c5c3ff2bc0e187905fe3434e17655c1e2c2aed85f008c04156d8ddb7d4b151" +} \ No newline at end of file diff --git a/script/data/testnet/airdrop-merkle-root.json b/script/data/testnet/airdrop-merkle-root.json new file mode 100644 index 00000000..742d622e --- /dev/null +++ b/script/data/testnet/airdrop-merkle-root.json @@ -0,0 +1,3 @@ +{ + "merkleRoot": "0x9062cfbcd3feb028693b125d9507e3e3abf363a0e08524216145ea093b1909c0" +} \ No newline at end of file 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..."