Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add implementation + deployment of the ProtocolFeesWithdrawer #1301

Merged
merged 11 commits into from
May 18, 2022
1 change: 1 addition & 0 deletions pkg/deployments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,4 @@ Returns an object with all contracts from a deployment and their addresses.
| Fee Distributor for veBAL holders | [`20220420-fee-distributor`](./tasks/20220420-fee-distributor) |
| Distribution Scheduler for reward tokens on gauges | [`20220422-distribution-scheduler`](./tasks/20220422-distribution-scheduler) |
| Relayer with the fix for the Double Entrypoint issue | [`20220513-double-entrypoint-fix-relayer`](./tasks/20220513-double-entrypoint-fix-relayer) |
| Protocol Fee Withdrawer | [`20220517-protocol-fee-withdrawer`](./tasks/20220517-protocol-fee-withdrawer) |
8 changes: 8 additions & 0 deletions pkg/deployments/src/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ const CONTRACT_DEPLOYMENT_TRANSACTION_HASHES: Partial<Record<Network, Record<str
'0xbfD9769b061E57e478690299011A028194D66e3C': '0xb331661982566c968a83472b84ef2a49f617444d47454dfd26313a6c9b61540c',
// DoubleEntrypointFixRelayer
'0xcA96C4f198d343E251b1a01F3EBA061ef3DA73C1': '0x0dd98227681a13fde11f9943b285bfdd8b3ad67d12f0ead07a17f483a99de7ff',
// ProtocolFeesWithdrawer
'0x8c8951476529b0710cD878D3318Cf64B475654A7': '0xefa029a7f101e43804ab6d4c784dc20412dc99985354adf41d9055d5ff44380b',
},
polygon: {
// Authorizer
Expand Down Expand Up @@ -134,6 +136,8 @@ const CONTRACT_DEPLOYMENT_TRANSACTION_HASHES: Partial<Record<Network, Record<str
'0x3b8cA519122CdD8efb272b0D3085453404B25bD0': '0x0dcff784ada6e0e4e21db3da70e09545d31c3e425cf028df7d1289f914a7f1d5',
// DoubleEntrypointFixRelayer
'0x79d0011892fe558FC5a4ec7D4Ca5db59069f460f': '0x58c8f5e410528c1142d50ea574606d6dada84995f9825a7b88fd578321e17bfa',
// ProtocolFeesWithdrawer
'0xEF44D6786b2b4d544b7850Fe67CE6381626Bf2D6': '0x10fe0c38814c13801d3403502567ed387ab0b5cabcda83d9552386f2e1ad80ee',
},
arbitrum: {
// Authorizer
Expand Down Expand Up @@ -182,6 +186,8 @@ const CONTRACT_DEPLOYMENT_TRANSACTION_HASHES: Partial<Record<Network, Record<str
'0xb08E16cFc07C684dAA2f93C70323BAdb2A6CBFd2': '0x4cc294e3e988adc1d0f0244451426583284f5270acb865f87ac55e18fe405874',
// DoubleEntrypointFixRelayer
'0x8E5698dC4897DC12243c8642e77B4f21349Db97C': '0x88cce60b9ac6ef8842840f583bce4a3bd3299975999c9aa492a08db8a451526f',
// ProtocolFeesWithdrawer
'0x70Bbd023481788e443472e123AB963e5EBF58D06': '0x24208edcde0bc29a7531f930cb348d08a5ed98e55e4c76677d9acd7123eedd28',
},
optimism: {
// Authorizer
Expand All @@ -204,6 +210,8 @@ const CONTRACT_DEPLOYMENT_TRANSACTION_HASHES: Partial<Record<Network, Record<str
'0xf302f9F50958c5593770FDf4d4812309fF77414f': '0x14fb43f051eebdec645abf0125e52348dc875b0887b689f8db026d75f9c78dda',
// AuthorizerAdaptor
'0x8F42aDBbA1B16EaAE3BB5754915E0D06059aDd75': '0xec800daf64f1abbe293ce34cc8d1b6bb6fcbc33670bc673716561b5732a00b40',
// ProtocolFeesWithdrawer
'0xC128a9954e6c874eA3d62ce62B468bA073093F25': '0x21a4f21d09ee04fe14ac711a5f50b27f2778cfb5684c9d032a9b245863a5757d',
},
};

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
[
{
"inputs": [
{
"internalType": "contract IVault",
"name": "vault",
"type": "address"
},
{
"internalType": "contract IERC20[]",
"name": "initialDeniedTokens",
"type": "address[]"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "contract IERC20",
"name": "token",
"type": "address"
}
],
"name": "TokenAllowlisted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "contract IERC20",
"name": "token",
"type": "address"
}
],
"name": "TokenDenylisted",
"type": "event"
},
{
"inputs": [
{
"internalType": "contract IERC20",
"name": "token",
"type": "address"
}
],
"name": "allowlistToken",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract IERC20",
"name": "token",
"type": "address"
}
],
"name": "denylistToken",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "selector",
"type": "bytes4"
}
],
"name": "getActionId",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getAuthorizer",
"outputs": [
{
"internalType": "contract IAuthorizer",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
}
],
"name": "getDenylistedToken",
"outputs": [
{
"internalType": "contract IERC20",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getDenylistedTokensLength",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getProtocolFeesCollector",
"outputs": [
{
"internalType": "contract IProtocolFeesCollector",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getVault",
"outputs": [
{
"internalType": "contract IVault",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract IERC20",
"name": "token",
"type": "address"
}
],
"name": "isWithdrawableToken",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract IERC20[]",
"name": "tokens",
"type": "address[]"
}
],
"name": "isWithdrawableTokens",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract IERC20[]",
"name": "tokens",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "amounts",
"type": "uint256[]"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
}
],
"name": "withdrawCollectedFees",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
Loading