Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

deployments: holesky instance for consensys #96

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deploy/2_deploy_staking_contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const getMaxFeeBps = (network: string): number => {
case "goerli_consensys":
return 5000;
case "goerli_consensys_dev":
return 5000;
return 5000;
case "goerli_vault":
return 5000;
case "goerli_live":
Expand Down Expand Up @@ -54,7 +54,7 @@ const getFeeBps = (network: string): number => {
case "goerli_consensys":
return 500;
case "goerli_consensys_dev":
return 500;
return 500;
case "goerli_vault":
return 700;
case "goerli_live":
Expand Down
18 changes: 17 additions & 1 deletion deploy/5_deploy_consensys_staking_contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ const getMaxFeeBps = (network: string): number => {
return 5000;
case "goerli_dev_consensys":
return 5000;
case "holesky_dev_consensys":
return 5000;
case "holesky_uat_consensys":
return 5000;
case "mainnet_consensys":
return 1500; //15% max fee

Expand All @@ -23,6 +27,10 @@ const getMaxOperatorFeeBps = (network: string): number => {
return 5000;
case "goerli_dev_consensys":
return 5000;
case "holesky_dev_consensys":
return 5000;
case "holesky_uat_consensys":
return 5000;
case "mainnet_consensys":
return 10000; //100% of 15% = 15%

Expand All @@ -37,6 +45,10 @@ const getFeeBps = (network: string): number => {
return 500;
case "goerli_dev_consensys":
return 500;
case "holesky_dev_consensys":
return 500;
case "holesky_uat_consensys":
return 500;
case "mainnet_consensys":
return 1000; //10% end-user fee

Expand All @@ -51,6 +63,10 @@ const getOperatorFeeBps = (network: string): number => {
return 500;
case "goerli_dev_consensys":
return 500;
case "holesky_dev_consensys":
return 500;
case "holesky_uat_consensys":
return 500;
case "mainnet_consensys":
return 9000; //90% of 10% = 9% for consensys, 1% for kiln

Expand Down Expand Up @@ -131,7 +147,7 @@ const func: DeployFunction = async function ({
};

func.skip = async function ({ deployments, network }: HardhatRuntimeEnvironment): Promise<boolean> {
const shouldSkip = network.name !== "goerli_uat_consensys" && network.name !== "goerli_dev_consensys" && network.name !== "mainnet_consensys";
const shouldSkip = !network.name.endsWith("_consensys");
if (shouldSkip) {
console.log("Skipped");
}
Expand Down
16 changes: 16 additions & 0 deletions deployment.holesky_dev_consensys.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "holesky_dev_consensys",
"chainId": "17000",
"contracts": {
"ConsensusLayerFeeDispatcher": "0xbAaCC77b259877D36318E66ecDBc7e6fb9a38FFf",
"ExecutionLayerFeeDispatcher": "0x271c4AD940f0390B452673E035a276E12591bf0E",
"FeeRecipient": "0x71D5470Ed6B234AADC4C9c53E1f8fF58dBA014a7",
"StakingContract": "0x5daBD1606a83d8f8eD0Ea16C8cc0D3491e7EAFaf"
},
"namedAccounts": {
"deployer": "0x8798a59C60349CAb0a6063F2e13400F5c745c90a",
"admin": "0xe8e738c2F1C383aB8282EbE30579118EC9CE4534",
"depositContract": "0x4242424242424242424242424242424242424242",
"treasury": "0xe8e738c2F1C383aB8282EbE30579118EC9CE4534"
}
}
16 changes: 16 additions & 0 deletions deployment.holesky_uat_consensys.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "holesky_uat_consensys",
"chainId": "17000",
"contracts": {
"ConsensusLayerFeeDispatcher": "0xeE2b27f9F75A51d512445998016f7764645781F7",
"ExecutionLayerFeeDispatcher": "0x526712fa42c07CdE943ce111B180d38C262d100a",
"FeeRecipient": "0x14932Cad089fc0EFcdF94e0064a799123741C488",
"StakingContract": "0x6bfe26d8EF78C4D88cD512fC5dBE4b118Fc109e8"
},
"namedAccounts": {
"deployer": "0x8798a59C60349CAb0a6063F2e13400F5c745c90a",
"admin": "0xe8e738c2F1C383aB8282EbE30579118EC9CE4534",
"depositContract": "0x4242424242424242424242424242424242424242",
"treasury": "0xe8e738c2F1C383aB8282EbE30579118EC9CE4534"
}
}
1 change: 1 addition & 0 deletions deployments/holesky_dev_consensys/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
17000
241 changes: 241 additions & 0 deletions deployments/holesky_dev_consensys/ConsensusLayerFeeDispatcher.json

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions deployments/holesky_dev_consensys/ExecutionLayerFeeDispatcher.json

Large diffs are not rendered by default.

169 changes: 169 additions & 0 deletions deployments/holesky_dev_consensys/FeeRecipient.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
{
"address": "0x71D5470Ed6B234AADC4C9c53E1f8fF58dBA014a7",
"abi": [
{
"inputs": [],
"name": "AlreadyInitialized",
"type": "error"
},
{
"stateMutability": "payable",
"type": "fallback"
},
{
"inputs": [],
"name": "getPublicKeyRoot",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getWithdrawer",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_dispatcher",
"type": "address"
},
{
"internalType": "bytes32",
"name": "_publicKeyRoot",
"type": "bytes32"
}
],
"name": "init",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "withdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
],
"transactionHash": "0x076f21078fbc37dde965f1f766590abcdc9d84c2f7936f1eba06587271b0d107",
"receipt": {
"to": null,
"from": "0x8798a59C60349CAb0a6063F2e13400F5c745c90a",
"contractAddress": "0x71D5470Ed6B234AADC4C9c53E1f8fF58dBA014a7",
"transactionIndex": 13,
"gasUsed": "233362",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xa552119a4ea9ec08238d4f399af7c96cbfdb4a14546fbe2f974931ae3ac92eeb",
"transactionHash": "0x076f21078fbc37dde965f1f766590abcdc9d84c2f7936f1eba06587271b0d107",
"logs": [],
"blockNumber": 977044,
"cumulativeGasUsed": "1100177",
"status": 1,
"byzantium": true
},
"args": [],
"numDeployments": 1,
"solcInputHash": "e20c74109a1c61285ef1a2afbbbc70eb",
"metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"getPublicKeyRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWithdrawer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_dispatcher\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_publicKeyRoot\",\"type\":\"bytes32\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"init(address,bytes32)\":{\"params\":{\"_dispatcher\":\"Address that will handle the fee dispatching\",\"_publicKeyRoot\":\"Public Key root assigned to this receiver\"}},\"withdraw()\":{\"details\":\"Can be called by any wallet as recipients are not parameters\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getPublicKeyRoot()\":{\"notice\":\"Retrieve the assigned public key root\"},\"getWithdrawer()\":{\"notice\":\"retrieve the assigned withdrawer\"},\"init(address,bytes32)\":{\"notice\":\"Initializes the receiver\"},\"withdraw()\":{\"notice\":\"Triggers a withdrawal by sending its funds + its public key root to the dispatcher\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/contracts/FeeRecipient.sol\":\"FeeRecipient\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"src/contracts/FeeRecipient.sol\":{\"content\":\"//SPDX-License-Identifier: BUSL-1.1\\npragma solidity >=0.8.10;\\n\\nimport \\\"./interfaces/IFeeDispatcher.sol\\\";\\n\\ncontract FeeRecipient {\\n /// @notice Constructor replay prevention\\n bool internal initialized;\\n /// @notice Address where funds are sent to be dispatched\\n IFeeDispatcher internal dispatcher;\\n /// @notice Public Key root assigned to this receiver\\n bytes32 internal publicKeyRoot;\\n\\n error AlreadyInitialized();\\n\\n /// @notice Initializes the receiver\\n /// @param _dispatcher Address that will handle the fee dispatching\\n /// @param _publicKeyRoot Public Key root assigned to this receiver\\n function init(address _dispatcher, bytes32 _publicKeyRoot) external {\\n if (initialized) {\\n revert AlreadyInitialized();\\n }\\n initialized = true;\\n dispatcher = IFeeDispatcher(_dispatcher);\\n publicKeyRoot = _publicKeyRoot;\\n }\\n\\n /// @notice Empty calldata fallback\\n receive() external payable {}\\n\\n /// @notice Non-empty calldata fallback\\n fallback() external payable {}\\n\\n /// @notice Triggers a withdrawal by sending its funds + its public key root to the dispatcher\\n /// @dev Can be called by any wallet as recipients are not parameters\\n function withdraw() external {\\n dispatcher.dispatch{value: address(this).balance}(publicKeyRoot);\\n }\\n\\n /// @notice Retrieve the assigned public key root\\n function getPublicKeyRoot() external view returns (bytes32) {\\n return publicKeyRoot;\\n }\\n\\n /// @notice retrieve the assigned withdrawer\\n function getWithdrawer() external view returns (address) {\\n return dispatcher.getWithdrawer(publicKeyRoot);\\n }\\n}\\n\",\"keccak256\":\"0xf788bf2e0e2112b0322904479f0704ac8fb23601f760326fec7f564ec0101090\",\"license\":\"BUSL-1.1\"},\"src/contracts/interfaces/IFeeDispatcher.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.10;\\n\\ninterface IFeeDispatcher {\\n function dispatch(bytes32 _publicKeyRoot) external payable;\\n\\n function getWithdrawer(bytes32 _publicKeyRoot) external view returns (address);\\n}\\n\",\"keccak256\":\"0x75efa5a697b32235188a62f730b7ab2a2fc5c422a93010aa0b18e93ea1bade45\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50610348806100206000396000f3fe6080604052600436106100405760003560e01c80632cc0b254146100495780633ccfd60b146100695780637d38d21f1461007e5780637f763702146100bd57005b3661004757005b005b34801561005557600080fd5b506100476100643660046102c2565b6100db565b34801561007557600080fd5b5061004761016c565b34801561008a57600080fd5b506100936101fc565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100c957600080fd5b506001546040519081526020016100b4565b60005460ff1615610118576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805473ffffffffffffffffffffffffffffffffffffffff909316610100027fffffffffffffffffffffff0000000000000000000000000000000000000000009093169290921760019081179092559055565b6000546001546040517fce120650000000000000000000000000000000000000000000000000000000008152600481019190915261010090910473ffffffffffffffffffffffffffffffffffffffff169063ce1206509047906024016000604051808303818588803b1580156101e157600080fd5b505af11580156101f5573d6000803e3d6000fd5b5050505050565b600080546001546040517f27de9016000000000000000000000000000000000000000000000000000000008152600481019190915261010090910473ffffffffffffffffffffffffffffffffffffffff16906327de901690602401602060405180830381865afa158015610274573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061029891906102ee565b905090565b73ffffffffffffffffffffffffffffffffffffffff811681146102bf57600080fd5b50565b600080604083850312156102d557600080fd5b82356102e08161029d565b946020939093013593505050565b60006020828403121561030057600080fd5b815161030b8161029d565b939250505056fea2646970667358221220b126dc994bed0492fb480c2169ce4878eff8e5f378432ddaf44ae3ceeb35a64064736f6c634300080d0033",
"deployedBytecode": "0x6080604052600436106100405760003560e01c80632cc0b254146100495780633ccfd60b146100695780637d38d21f1461007e5780637f763702146100bd57005b3661004757005b005b34801561005557600080fd5b506100476100643660046102c2565b6100db565b34801561007557600080fd5b5061004761016c565b34801561008a57600080fd5b506100936101fc565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100c957600080fd5b506001546040519081526020016100b4565b60005460ff1615610118576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805473ffffffffffffffffffffffffffffffffffffffff909316610100027fffffffffffffffffffffff0000000000000000000000000000000000000000009093169290921760019081179092559055565b6000546001546040517fce120650000000000000000000000000000000000000000000000000000000008152600481019190915261010090910473ffffffffffffffffffffffffffffffffffffffff169063ce1206509047906024016000604051808303818588803b1580156101e157600080fd5b505af11580156101f5573d6000803e3d6000fd5b5050505050565b600080546001546040517f27de9016000000000000000000000000000000000000000000000000000000008152600481019190915261010090910473ffffffffffffffffffffffffffffffffffffffff16906327de901690602401602060405180830381865afa158015610274573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061029891906102ee565b905090565b73ffffffffffffffffffffffffffffffffffffffff811681146102bf57600080fd5b50565b600080604083850312156102d557600080fd5b82356102e08161029d565b946020939093013593505050565b60006020828403121561030057600080fd5b815161030b8161029d565b939250505056fea2646970667358221220b126dc994bed0492fb480c2169ce4878eff8e5f378432ddaf44ae3ceeb35a64064736f6c634300080d0033",
"devdoc": {
"kind": "dev",
"methods": {
"init(address,bytes32)": {
"params": {
"_dispatcher": "Address that will handle the fee dispatching",
"_publicKeyRoot": "Public Key root assigned to this receiver"
}
},
"withdraw()": {
"details": "Can be called by any wallet as recipients are not parameters"
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"getPublicKeyRoot()": {
"notice": "Retrieve the assigned public key root"
},
"getWithdrawer()": {
"notice": "retrieve the assigned withdrawer"
},
"init(address,bytes32)": {
"notice": "Initializes the receiver"
},
"withdraw()": {
"notice": "Triggers a withdrawal by sending its funds + its public key root to the dispatcher"
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 1850,
"contract": "src/contracts/FeeRecipient.sol:FeeRecipient",
"label": "initialized",
"offset": 0,
"slot": "0",
"type": "t_bool"
},
{
"astId": 1854,
"contract": "src/contracts/FeeRecipient.sol:FeeRecipient",
"label": "dispatcher",
"offset": 1,
"slot": "0",
"type": "t_contract(IFeeDispatcher)5045"
},
{
"astId": 1857,
"contract": "src/contracts/FeeRecipient.sol:FeeRecipient",
"label": "publicKeyRoot",
"offset": 0,
"slot": "1",
"type": "t_bytes32"
}
],
"types": {
"t_bool": {
"encoding": "inplace",
"label": "bool",
"numberOfBytes": "1"
},
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(IFeeDispatcher)5045": {
"encoding": "inplace",
"label": "contract IFeeDispatcher",
"numberOfBytes": "20"
}
}
}
}
Loading
Loading