diff --git a/abi/newReward/AddAllowedRecipient.abi.json b/abi/newReward/AddAllowedRecipient.abi.json new file mode 100644 index 00000000..c73e072e --- /dev/null +++ b/abi/newReward/AddAllowedRecipient.abi.json @@ -0,0 +1,60 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_trustedCaller", + "type": "address" + }, + { + "internalType": "address", + "name": "_allowedRecipientsRegistry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "allowedRecipientsRegistry", + "outputs": [ + { + "internalType": "contract AllowedRecipientsRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_creator", "type": "address" }, + { "internalType": "bytes", "name": "_evmScriptCallData", "type": "bytes" } + ], + "name": "createEVMScript", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes", "name": "_evmScriptCallData", "type": "bytes" } + ], + "name": "decodeEVMScriptCallData", + "outputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "string", "name": "", "type": "string" } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "trustedCaller", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + } +] diff --git a/abi/newReward/AddAllowedRecipientLDO.abi.json b/abi/newReward/AddAllowedRecipientLDO.abi.json deleted file mode 100644 index cff62f3c..00000000 --- a/abi/newReward/AddAllowedRecipientLDO.abi.json +++ /dev/null @@ -1 +0,0 @@ -[{"inputs":[{"internalType":"address","name":"_trustedCaller","type":"address"},{"internalType":"address","name":"_allowedRecipientsRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"allowedRecipientsRegistry","outputs":[{"internalType":"contract AllowedRecipientsRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_creator","type":"address"},{"internalType":"bytes","name":"_evmScriptCallData","type":"bytes"}],"name":"createEVMScript","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_evmScriptCallData","type":"bytes"}],"name":"decodeEVMScriptCallData","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"trustedCaller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}] diff --git a/abi/newReward/AllowedRecipientsRegistry.abi.json b/abi/newReward/AllowedRecipientsRegistry.abi.json new file mode 100644 index 00000000..a931f36a --- /dev/null +++ b/abi/newReward/AllowedRecipientsRegistry.abi.json @@ -0,0 +1,462 @@ +[ + { + "inputs": [ + { "internalType": "address", "name": "_admin", "type": "address" }, + { + "internalType": "address[]", + "name": "_addRecipientToAllowedListRoleHolders", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "_removeRecipientFromAllowedListRoleHolders", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "_setParametersRoleHolders", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "_updateSpentAmountRoleHolders", + "type": "address[]" + }, + { + "internalType": "contract IBokkyPooBahsDateTimeContract", + "name": "_bokkyPooBahsDateTimeContract", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_newAddress", + "type": "address" + } + ], + "name": "BokkyPooBahsDateTimeContractChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_periodStartTimestamp", + "type": "uint256" + } + ], + "name": "CurrentPeriodAdvanced", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_limit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_periodDurationMonths", + "type": "uint256" + } + ], + "name": "LimitsParametersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "_title", + "type": "string" + } + ], + "name": "RecipientAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_recipient", + "type": "address" + } + ], + "name": "RecipientRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_alreadySpentAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_spendableBalance", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_periodStartTimestamp", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_periodEndTimestamp", + "type": "uint256" + } + ], + "name": "SpendableAmountChanged", + "type": "event" + }, + { + "inputs": [], + "name": "ADD_RECIPIENT_TO_ALLOWED_LIST_ROLE", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "REMOVE_RECIPIENT_FROM_ALLOWED_LIST_ROLE", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SET_PARAMETERS_ROLE", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPDATE_SPENT_AMOUNT_ROLE", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_recipient", "type": "address" }, + { "internalType": "string", "name": "_title", "type": "string" } + ], + "name": "addRecipient", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "name": "allowedRecipients", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "bokkyPooBahsDateTimeContract", + "outputs": [ + { + "internalType": "contract IBokkyPooBahsDateTimeContract", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAllowedRecipients", + "outputs": [ + { "internalType": "address[]", "name": "", "type": "address[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLimitParameters", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPeriodState", + "outputs": [ + { + "internalType": "uint256", + "name": "_alreadySpentAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_spendableBalanceInPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_periodStartTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_periodEndTimestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" } + ], + "name": "getRoleAdmin", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "hasRole", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_recipient", "type": "address" } + ], + "name": "isRecipientAllowed", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_payoutAmount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "_motionDuration", + "type": "uint256" + } + ], + "name": "isUnderSpendableBalance", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_recipient", "type": "address" } + ], + "name": "removeRecipient", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_bokkyPooBahsDateTimeContract", + "type": "address" + } + ], + "name": "setBokkyPooBahsDateTimeContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_limit", "type": "uint256" }, + { + "internalType": "uint256", + "name": "_periodDurationMonths", + "type": "uint256" + } + ], + "name": "setLimitParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "spendableBalance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" } + ], + "name": "supportsInterface", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_payoutAmount", "type": "uint256" } + ], + "name": "updateSpentAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/abi/newReward/AllowedRecipientsRegistryLDO.abi.json b/abi/newReward/AllowedRecipientsRegistryLDO.abi.json deleted file mode 100644 index 4166e5e3..00000000 --- a/abi/newReward/AllowedRecipientsRegistryLDO.abi.json +++ /dev/null @@ -1 +0,0 @@ -[{"inputs":[{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address[]","name":"_addRecipientToAllowedListRoleHolders","type":"address[]"},{"internalType":"address[]","name":"_removeRecipientFromAllowedListRoleHolders","type":"address[]"},{"internalType":"address[]","name":"_setParametersRoleHolders","type":"address[]"},{"internalType":"address[]","name":"_updateSpentAmountRoleHolders","type":"address[]"},{"internalType":"contract IBokkyPooBahsDateTimeContract","name":"_bokkyPooBahsDateTimeContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_newAddress","type":"address"}],"name":"BokkyPooBahsDateTimeContractChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_periodStartTimestamp","type":"uint256"}],"name":"CurrentPeriodAdvanced","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_limit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_periodDurationMonths","type":"uint256"}],"name":"LimitsParametersChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_recipient","type":"address"},{"indexed":false,"internalType":"string","name":"_title","type":"string"}],"name":"RecipientAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_recipient","type":"address"}],"name":"RecipientRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_alreadySpentAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_spendableBalance","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_periodStartTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_periodEndTimestamp","type":"uint256"}],"name":"SpendableAmountChanged","type":"event"},{"inputs":[],"name":"ADD_RECIPIENT_TO_ALLOWED_LIST_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REMOVE_RECIPIENT_FROM_ALLOWED_LIST_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SET_PARAMETERS_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPDATE_SPENT_AMOUNT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"string","name":"_title","type":"string"}],"name":"addRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allowedRecipients","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bokkyPooBahsDateTimeContract","outputs":[{"internalType":"contract IBokkyPooBahsDateTimeContract","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllowedRecipients","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLimitParameters","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPeriodState","outputs":[{"internalType":"uint256","name":"_alreadySpentAmount","type":"uint256"},{"internalType":"uint256","name":"_spendableBalanceInPeriod","type":"uint256"},{"internalType":"uint256","name":"_periodStartTimestamp","type":"uint256"},{"internalType":"uint256","name":"_periodEndTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"isRecipientAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_payoutAmount","type":"uint256"},{"internalType":"uint256","name":"_motionDuration","type":"uint256"}],"name":"isUnderSpendableBalance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"removeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bokkyPooBahsDateTimeContract","type":"address"}],"name":"setBokkyPooBahsDateTimeContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_limit","type":"uint256"},{"internalType":"uint256","name":"_periodDurationMonths","type":"uint256"}],"name":"setLimitParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"spendableBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_payoutAmount","type":"uint256"}],"name":"updateSpentAmount","outputs":[],"stateMutability":"nonpayable","type":"function"}] diff --git a/abi/newReward/RemoveAllowedRecipient.abi.json b/abi/newReward/RemoveAllowedRecipient.abi.json new file mode 100644 index 00000000..25079835 --- /dev/null +++ b/abi/newReward/RemoveAllowedRecipient.abi.json @@ -0,0 +1,63 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_trustedCaller", + "type": "address" + }, + { + "internalType": "address", + "name": "_allowedRecipientsRegistry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "allowedRecipientsRegistry", + "outputs": [ + { + "internalType": "contract AllowedRecipientsRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_creator", "type": "address" }, + { "internalType": "bytes", "name": "_evmScriptCallData", "type": "bytes" } + ], + "name": "createEVMScript", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes", "name": "_evmScriptCallData", "type": "bytes" } + ], + "name": "decodeEVMScriptCallData", + "outputs": [ + { + "internalType": "address", + "name": "recipientAddress", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "trustedCaller", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + } +] diff --git a/abi/newReward/RemoveAllowedRecipientLDO.abi.json b/abi/newReward/RemoveAllowedRecipientLDO.abi.json deleted file mode 100644 index dcddeca9..00000000 --- a/abi/newReward/RemoveAllowedRecipientLDO.abi.json +++ /dev/null @@ -1 +0,0 @@ -[{"inputs":[{"internalType":"address","name":"_trustedCaller","type":"address"},{"internalType":"address","name":"_allowedRecipientsRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"allowedRecipientsRegistry","outputs":[{"internalType":"contract AllowedRecipientsRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_creator","type":"address"},{"internalType":"bytes","name":"_evmScriptCallData","type":"bytes"}],"name":"createEVMScript","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_evmScriptCallData","type":"bytes"}],"name":"decodeEVMScriptCallData","outputs":[{"internalType":"address","name":"recipientAddress","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"trustedCaller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}] diff --git a/abi/newReward/TopUpAllowedRecipients.abi.json b/abi/newReward/TopUpAllowedRecipients.abi.json new file mode 100644 index 00000000..f8b591ad --- /dev/null +++ b/abi/newReward/TopUpAllowedRecipients.abi.json @@ -0,0 +1,92 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_trustedCaller", + "type": "address" + }, + { + "internalType": "address", + "name": "_allowedRecipientsRegistry", + "type": "address" + }, + { "internalType": "address", "name": "_finance", "type": "address" }, + { "internalType": "address", "name": "_token", "type": "address" }, + { "internalType": "address", "name": "_easyTrack", "type": "address" } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "allowedRecipientsRegistry", + "outputs": [ + { + "internalType": "contract AllowedRecipientsRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_creator", "type": "address" }, + { "internalType": "bytes", "name": "_evmScriptCallData", "type": "bytes" } + ], + "name": "createEVMScript", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes", "name": "_evmScriptCallData", "type": "bytes" } + ], + "name": "decodeEVMScriptCallData", + "outputs": [ + { + "internalType": "address[]", + "name": "recipients", + "type": "address[]" + }, + { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "easyTrack", + "outputs": [ + { "internalType": "contract EasyTrack", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "finance", + "outputs": [ + { "internalType": "contract IFinance", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "trustedCaller", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + } +] diff --git a/abi/newReward/TopUpAllowedRecipientsLDO.abi.json b/abi/newReward/TopUpAllowedRecipientsLDO.abi.json deleted file mode 100644 index 7ac84c5f..00000000 --- a/abi/newReward/TopUpAllowedRecipientsLDO.abi.json +++ /dev/null @@ -1 +0,0 @@ -[{"inputs":[{"internalType":"address","name":"_trustedCaller","type":"address"},{"internalType":"address","name":"_allowedRecipientsRegistry","type":"address"},{"internalType":"address","name":"_finance","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_easyTrack","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"allowedRecipientsRegistry","outputs":[{"internalType":"contract AllowedRecipientsRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_creator","type":"address"},{"internalType":"bytes","name":"_evmScriptCallData","type":"bytes"}],"name":"createEVMScript","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_evmScriptCallData","type":"bytes"}],"name":"decodeEVMScriptCallData","outputs":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"easyTrack","outputs":[{"internalType":"contract EasyTrack","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finance","outputs":[{"internalType":"contract IFinance","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedCaller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}] diff --git a/modules/blockChain/contractAddresses.ts b/modules/blockChain/contractAddresses.ts index a015b6ff..5c58bf25 100644 --- a/modules/blockChain/contractAddresses.ts +++ b/modules/blockChain/contractAddresses.ts @@ -149,3 +149,12 @@ export const gasFunderETHRegistry = { [CHAINS.Kovan]: '0x0000000000000000000000000000000000000000', [CHAINS.Kintsugi]: '0x0000000000000000000000000000000000000000', } + +export const StethRewardProgramRegistry = { + [CHAINS.Mainnet]: '0x48c4929630099b217136b64089E8543dB0E5163a', + [CHAINS.Ropsten]: '0x0000000000000000000000000000000000000000', + [CHAINS.Rinkeby]: '0x0000000000000000000000000000000000000000', + [CHAINS.Goerli]: '0x78797efCca6C537BF92FA6b25cBb14A6f1c128A0', + [CHAINS.Kovan]: '0x0000000000000000000000000000000000000000', + [CHAINS.Kintsugi]: '0x0000000000000000000000000000000000000000', +} diff --git a/modules/blockChain/contracts.ts b/modules/blockChain/contracts.ts index 9af90bad..ee796c60 100644 --- a/modules/blockChain/contracts.ts +++ b/modules/blockChain/contracts.ts @@ -16,11 +16,11 @@ import { EvmAddReferralPartnerAbi__factory, EvmRemoveReferralPartnerAbi__factory, EvmTopUpReferralPartnersAbi__factory, - AllowedRecipientsRegistryLDOAbi__factory, - AllowedRecipientsRegistryLDOAbi, - AddAllowedRecipientLDOAbi__factory, - RemoveAllowedRecipientLDOAbi__factory, - TopUpAllowedRecipientsLDOAbi__factory, + AllowedRecipientsRegistryAbi__factory, + AllowedRecipientsRegistryAbi, + AddAllowedRecipientAbi__factory, + RemoveAllowedRecipientAbi__factory, + TopUpAllowedRecipientsAbi__factory, RegistryWithLimitsAbi__factory, RegistryWithLimitsAbi, TopUpWithLimitsAbi__factory, @@ -35,8 +35,7 @@ export type ContractTypeEasyTrack = EasyTrackAbi */ export type ContractTypeRewardProgramRegistry = RewardProgramRegistryAbi export type ContractTypeReferralPartnersRegistry = ReferralPartnersRegistryAbi -export type ContractTypeAllowedRecipientRegistry = - AllowedRecipientsRegistryLDOAbi +export type ContractTypeAllowedRecipientRegistry = AllowedRecipientsRegistryAbi export type ContractTypeRegistryWithLimits = RegistryWithLimitsAbi export const ContractNodeOperatorsRegistry = createContractHelpers({ @@ -58,57 +57,57 @@ export const ContractRewardProgramRegistry = createContractHelpers({ }) export const ContractAllowedRecipientRegistry = createContractHelpers({ - factory: AllowedRecipientsRegistryLDOAbi__factory, + factory: AllowedRecipientsRegistryAbi__factory, address: CONTRACT_ADDRESSES.AllowedRecipientRegistry, }) export const ContractEvmAllowedRecipientAdd = createContractHelpers({ - factory: AddAllowedRecipientLDOAbi__factory, + factory: AddAllowedRecipientAbi__factory, address: EvmAddressesByType[MotionType.AllowedRecipientAdd], }) export const ContractEvmAllowedRecipientRemove = createContractHelpers({ - factory: RemoveAllowedRecipientLDOAbi__factory, + factory: RemoveAllowedRecipientAbi__factory, address: EvmAddressesByType[MotionType.AllowedRecipientRemove], }) export const ContractEvmAllowedRecipientTopUp = createContractHelpers({ - factory: TopUpAllowedRecipientsLDOAbi__factory, + factory: TopUpAllowedRecipientsAbi__factory, address: EvmAddressesByType[MotionType.AllowedRecipientTopUp], }) // DAI Referral export const ContractAllowedRecipientReferralDaiRegistry = createContractHelpers({ - factory: AllowedRecipientsRegistryLDOAbi__factory, + factory: AllowedRecipientsRegistryAbi__factory, address: CONTRACT_ADDRESSES.AllowedRecipientReferralDaiRegistry, }) export const ContractEvmAllowedRecipientAddReferralDai = createContractHelpers({ - factory: AddAllowedRecipientLDOAbi__factory, + factory: AddAllowedRecipientAbi__factory, address: EvmAddressesByType[MotionType.AllowedRecipientAddReferralDai], }) export const ContractEvmAllowedRecipientRemoveReferralDai = createContractHelpers({ - factory: RemoveAllowedRecipientLDOAbi__factory, + factory: RemoveAllowedRecipientAbi__factory, address: EvmAddressesByType[MotionType.AllowedRecipientRemoveReferralDai], }) export const ContractEvmAllowedRecipientTopUpReferralDai = createContractHelpers({ - factory: TopUpAllowedRecipientsLDOAbi__factory, + factory: TopUpAllowedRecipientsAbi__factory, address: EvmAddressesByType[MotionType.AllowedRecipientTopUpReferralDai], }) // LDO TRP export const ContractAllowedRecipientTrpLdoRegistry = createContractHelpers({ - factory: AllowedRecipientsRegistryLDOAbi__factory, + factory: AllowedRecipientsRegistryAbi__factory, address: CONTRACT_ADDRESSES.AllowedRecipientTrpLdoRegistry, }) export const ContractEvmAllowedRecipientTopUpTrpLdo = createContractHelpers({ - factory: TopUpAllowedRecipientsLDOAbi__factory, + factory: TopUpAllowedRecipientsAbi__factory, address: EvmAddressesByType[MotionType.AllowedRecipientTopUpTrpLdo], }) @@ -230,3 +229,23 @@ export const ContractReferralPartnersRegistry = createContractHelpers({ factory: ReferralPartnersRegistryAbi__factory, address: CONTRACT_ADDRESSES.ReferralPartnersRegistry, }) + +export const ContractStethRewardProgramRegistry = createContractHelpers({ + factory: AllowedRecipientsRegistryAbi__factory, + address: CONTRACT_ADDRESSES.StethRewardProgramRegistry, +}) + +export const ContractStethRewardProgramAdd = createContractHelpers({ + factory: AddAllowedRecipientAbi__factory, + address: EvmAddressesByType[MotionType.StethRewardProgramAdd], +}) + +export const ContractStethRewardProgramRemove = createContractHelpers({ + factory: RemoveAllowedRecipientAbi__factory, + address: EvmAddressesByType[MotionType.StethRewardProgramRemove], +}) + +export const ContractStethRewardProgramTopUp = createContractHelpers({ + factory: TopUpAllowedRecipientsAbi__factory, + address: EvmAddressesByType[MotionType.StethRewardProgramTopUp], +}) diff --git a/modules/motions/evmAddresses.ts b/modules/motions/evmAddresses.ts index aea2a07b..5c027182 100644 --- a/modules/motions/evmAddresses.ts +++ b/modules/motions/evmAddresses.ts @@ -48,6 +48,12 @@ export const EvmAddressesByChain = { [MotionType.AtcDAITopUp]: '0x67Fb97ABB9035E2e93A7e3761a0d0571c5d7CD07', [MotionType.GasFunderETHTopUp]: '0x41F9daC5F89092dD6061E59578A2611849317dc8', + [MotionType.StethRewardProgramAdd]: + '0x935cb3366Faf2cFC415B2099d1F974Fd27202b77', + [MotionType.StethRewardProgramRemove]: + '0x22010d1747CaFc370b1f1FBBa61022A313c5693b', + [MotionType.StethRewardProgramTopUp]: + '0x1F2b79FE297B7098875930bBA6dd17068103897E', }, // Rinkeby @@ -79,6 +85,9 @@ export const EvmAddressesByChain = { [MotionType.PmlDAITopUp]: '0x', [MotionType.AtcDAITopUp]: '0x', [MotionType.GasFunderETHTopUp]: '0x', + [MotionType.StethRewardProgramAdd]: '0x', + [MotionType.StethRewardProgramRemove]: '0x', + [MotionType.StethRewardProgramTopUp]: '0x', }, // Goerli @@ -120,6 +129,12 @@ export const EvmAddressesByChain = { [MotionType.PmlDAITopUp]: '0xc749aD24572263887Bc888d3Cb854FCD50eCCB61', [MotionType.AtcDAITopUp]: '0xF4b8b5760EE4b5c5Cb154edd0f0841465d821006', [MotionType.GasFunderETHTopUp]: '0x', + [MotionType.StethRewardProgramAdd]: + '0x785A8B1CDC03Bb191670Ed4696e9ED5B11Af910A', + [MotionType.StethRewardProgramRemove]: + '0xEFEa524D1739800fF6F7d2532ED4C8508220239a', + [MotionType.StethRewardProgramTopUp]: + '0xF2f7FC1E8879c10D4579Bc82D5FEa923A5a228dE', }, } diff --git a/modules/motions/hooks/useContractEvmScript.ts b/modules/motions/hooks/useContractEvmScript.ts index b9ace38d..6bb6f831 100644 --- a/modules/motions/hooks/useContractEvmScript.ts +++ b/modules/motions/hooks/useContractEvmScript.ts @@ -25,6 +25,9 @@ import { ContractEvmPmlDAITopUp, ContractEvmAtcDAITopUp, ContractEvmGasFunderETHTopUp, + ContractStethRewardProgramAdd, + ContractStethRewardProgramRemove, + ContractStethRewardProgramTopUp, } from 'modules/blockChain/contracts' import { EvmUnrecognized } from '../evmAddresses' @@ -54,6 +57,9 @@ export const EVM_CONTRACTS = { [MotionType.PmlDAITopUp]: ContractEvmPmlDAITopUp, [MotionType.AtcDAITopUp]: ContractEvmAtcDAITopUp, [MotionType.GasFunderETHTopUp]: ContractEvmGasFunderETHTopUp, + [MotionType.StethRewardProgramAdd]: ContractStethRewardProgramAdd, + [MotionType.StethRewardProgramRemove]: ContractStethRewardProgramRemove, + [MotionType.StethRewardProgramTopUp]: ContractStethRewardProgramTopUp, } as const export function useContractEvmScript( diff --git a/modules/motions/hooks/useEVMScriptDecoder.ts b/modules/motions/hooks/useEVMScriptDecoder.ts index 1df32763..acab3cab 100644 --- a/modules/motions/hooks/useEVMScriptDecoder.ts +++ b/modules/motions/hooks/useEVMScriptDecoder.ts @@ -7,7 +7,7 @@ import { ABIProviderLocal } from '@lidofinance/evm-script-decoder/lib/ABIProvide import ReferralPartnersRegistry from 'abi/ReferralPartnersRegistry.abi.json' import RewardProgramRegistryAbi from 'abi/RewardProgramRegistry.abi.json' import NodeOperatorsRegistryAbi from 'abi/NodeOperators.abi.json' -import AllowedRecipientsRegistryLDOAbi from 'abi/newReward/AllowedRecipientsRegistryLDO.abi.json' +import AllowedRecipientsRegistryAbi from 'abi/newReward/AllowedRecipientsRegistry.abi.json' import RegistryWithLimitsAbi from 'abi/TopUp/RegistryWithLimits.abi.json' import FinanceAbi from 'abi/Finance.abi.json' import * as CONTRACT_ADDRESSES from 'modules/blockChain/contractAddresses' @@ -27,11 +27,11 @@ export function useEVMScriptDecoder() { NodeOperatorsRegistryAbi as any, [CONTRACT_ADDRESSES.Finance[chainId]]: FinanceAbi as any, [CONTRACT_ADDRESSES.AllowedRecipientRegistry[chainId]]: - AllowedRecipientsRegistryLDOAbi as any, + AllowedRecipientsRegistryAbi as any, [CONTRACT_ADDRESSES.AllowedRecipientReferralDaiRegistry[chainId]]: - AllowedRecipientsRegistryLDOAbi as any, + AllowedRecipientsRegistryAbi as any, [CONTRACT_ADDRESSES.AllowedRecipientTrpLdoRegistry[chainId]]: - AllowedRecipientsRegistryLDOAbi as any, + AllowedRecipientsRegistryAbi as any, [CONTRACT_ADDRESSES.LegoLDORegistry[chainId]]: RegistryWithLimitsAbi as any, [CONTRACT_ADDRESSES.LegoDAIRegistry[chainId]]: @@ -44,6 +44,8 @@ export function useEVMScriptDecoder() { RegistryWithLimitsAbi as any, [CONTRACT_ADDRESSES.gasFunderETHRegistry[chainId]]: RegistryWithLimitsAbi as any, + [CONTRACT_ADDRESSES.StethRewardProgramRegistry[chainId]]: + RegistryWithLimitsAbi as any, }), ), `evm-script-decoder-${chainId}`, diff --git a/modules/motions/hooks/usePeriodLimitsInfo.ts b/modules/motions/hooks/usePeriodLimitsInfo.ts index 793520a3..3861f2f0 100644 --- a/modules/motions/hooks/usePeriodLimitsInfo.ts +++ b/modules/motions/hooks/usePeriodLimitsInfo.ts @@ -11,6 +11,7 @@ import { ContractAtcDAIRegistry, ContractGasFunderETHRegistry, ContractPmlDAIRegistry, + ContractStethRewardProgramRegistry, } from 'modules/blockChain/contracts' import { useWeb3 } from 'modules/blockChain/hooks/useWeb3' import { useSWR, SWRResponse } from 'modules/network/hooks/useSwr' @@ -111,6 +112,7 @@ const registryByMotionType: { ContractAllowedRecipientReferralDaiRegistry, [MotionType.AllowedRecipientTopUpTrpLdo]: ContractAllowedRecipientTrpLdoRegistry, + [MotionType.StethRewardProgramTopUp]: ContractStethRewardProgramRegistry, } export const usePeriodLimitsInfoByMotionType = (props: { diff --git a/modules/motions/hooks/useRegistryWithLimits.ts b/modules/motions/hooks/useRegistryWithLimits.ts index 943bf033..95c09481 100644 --- a/modules/motions/hooks/useRegistryWithLimits.ts +++ b/modules/motions/hooks/useRegistryWithLimits.ts @@ -11,6 +11,7 @@ import { ContractAllowedRecipientRegistry, ContractAllowedRecipientReferralDaiRegistry, ContractAllowedRecipientTrpLdoRegistry, + ContractStethRewardProgramRegistry, } from 'modules/blockChain/contracts' import { getEventsRecipientAdded } from 'modules/motions/utils' import { MotionType } from 'modules/motions/types' @@ -40,6 +41,9 @@ export const REGISTRY_WITH_LIMITS_BY_MOTION_TYPE = { ContractAllowedRecipientReferralDaiRegistry, [MotionType.AllowedRecipientTopUpTrpLdo]: ContractAllowedRecipientTrpLdoRegistry, + [MotionType.StethRewardProgramAdd]: ContractStethRewardProgramRegistry, + [MotionType.StethRewardProgramRemove]: ContractStethRewardProgramRegistry, + [MotionType.StethRewardProgramTopUp]: ContractStethRewardProgramRegistry, } type HookArgs = { diff --git a/modules/motions/hooks/useTokenByTopUpType.ts b/modules/motions/hooks/useTokenByTopUpType.ts index b5bf8a4f..cbf84052 100644 --- a/modules/motions/hooks/useTokenByTopUpType.ts +++ b/modules/motions/hooks/useTokenByTopUpType.ts @@ -46,6 +46,10 @@ const TOKEN = { value: (chainId: CHAINS) => ContractGovernanceToken.address[chainId] as string, }, + [MotionType.StethRewardProgramTopUp]: { + label: 'stETH', + value: (chainId: CHAINS) => CONTRACT_ADDRESSES.STETH[chainId], + }, } const isTopUpType = (type: unknown): type is keyof typeof TOKEN => { diff --git a/modules/motions/types.ts b/modules/motions/types.ts index fae8b0af..56318641 100644 --- a/modules/motions/types.ts +++ b/modules/motions/types.ts @@ -27,6 +27,9 @@ export const MotionType = { PmlDAITopUp: 'PmlDAITopUp', AtcDAITopUp: 'AtcDAITopUp', GasFunderETHTopUp: 'GasFunderETHTopUp', + StethRewardProgramAdd: 'StethRewardProgramAdd', + StethRewardProgramRemove: 'StethRewardProgramRemove', + StethRewardProgramTopUp: 'StethRewardProgramTopUp', } as const // intentionally // eslint-disable-next-line @typescript-eslint/no-redeclare diff --git a/modules/motions/ui/MotionDescription/DescAllowedRecipient.tsx b/modules/motions/ui/MotionDescription/DescAllowedRecipient.tsx index 27efbfbc..b5a4c870 100644 --- a/modules/motions/ui/MotionDescription/DescAllowedRecipient.tsx +++ b/modules/motions/ui/MotionDescription/DescAllowedRecipient.tsx @@ -11,16 +11,16 @@ import { MotionTypeDisplayNames } from 'modules/motions/utils' import { formatEther } from 'ethers/lib/utils' import { - AddAllowedRecipientLDOAbi, - RemoveAllowedRecipientLDOAbi, - TopUpAllowedRecipientsLDOAbi, + AddAllowedRecipientAbi, + RemoveAllowedRecipientAbi, + TopUpAllowedRecipientsAbi, } from 'generated' import { NestProps } from './types' export function DescAllowedRecipientAdd({ callData, registryType, -}: NestProps & { +}: NestProps & { registryType: keyof typeof REGISTRY_WITH_LIMITS_BY_MOTION_TYPE }) { const name = MotionTypeDisplayNames[registryType] @@ -36,7 +36,7 @@ export function DescAllowedRecipientAdd({ export function DescAllowedRecipientTopUp({ callData, registryType, -}: NestProps & { +}: NestProps & { registryType: keyof typeof REGISTRY_WITH_LIMITS_BY_MOTION_TYPE }) { const token = useTokenByTopUpType({ registryType }) @@ -68,7 +68,7 @@ export function DescAllowedRecipientTopUp({ export function DescAllowedRecipientRemove({ callData, registryType, -}: NestProps & { +}: NestProps & { registryType: keyof typeof REGISTRY_WITH_LIMITS_BY_MOTION_TYPE }) { const { data: allowedRecipients } = useRecipientAll({ diff --git a/modules/motions/ui/MotionDescription/MotionDescription.tsx b/modules/motions/ui/MotionDescription/MotionDescription.tsx index 9cb78e07..550f5baf 100644 --- a/modules/motions/ui/MotionDescription/MotionDescription.tsx +++ b/modules/motions/ui/MotionDescription/MotionDescription.tsx @@ -25,8 +25,8 @@ import { DescTopUpWithLimits } from './DescTopUpWithLimits' import { TopUpWithLimitsAbi, - RemoveAllowedRecipientLDOAbi, - AddAllowedRecipientLDOAbi, + RemoveAllowedRecipientAbi, + AddAllowedRecipientAbi, } from 'generated' import { Motion, MotionType } from 'modules/motions/types' import { EvmUnrecognized } from 'modules/motions/evmAddresses' @@ -37,10 +37,10 @@ type DescWithLimitsProps = NestProps< TopUpWithLimitsAbi['decodeEVMScriptCallData'] > type DescAllowedRecipientRemoveProps = NestProps< - RemoveAllowedRecipientLDOAbi['decodeEVMScriptCallData'] + RemoveAllowedRecipientAbi['decodeEVMScriptCallData'] > type DescAllowedRecipientAddProps = NestProps< - AddAllowedRecipientLDOAbi['decodeEVMScriptCallData'] + AddAllowedRecipientAbi['decodeEVMScriptCallData'] > const MOTION_DESCRIPTIONS = { @@ -123,6 +123,24 @@ const MOTION_DESCRIPTIONS = { registryType={MotionType.GasFunderETHTopUp} /> ), + [MotionType.StethRewardProgramAdd]: (props: DescWithLimitsProps) => ( + + ), + [MotionType.StethRewardProgramRemove]: (props: DescWithLimitsProps) => ( + + ), + [MotionType.StethRewardProgramTopUp]: (props: DescWithLimitsProps) => ( + + ), } as const type Props = { diff --git a/modules/motions/ui/MotionFormStartNew/Parts/StartNewAllowedRecipientAdd.tsx b/modules/motions/ui/MotionFormStartNew/Parts/StartNewAllowedRecipientAdd.tsx index 238d3186..82b9d063 100644 --- a/modules/motions/ui/MotionFormStartNew/Parts/StartNewAllowedRecipientAdd.tsx +++ b/modules/motions/ui/MotionFormStartNew/Parts/StartNewAllowedRecipientAdd.tsx @@ -10,6 +10,7 @@ import { Fieldset, MessageBox } from '../CreateMotionFormStyle' import { ContractEvmAllowedRecipientAdd, ContractEvmAllowedRecipientAddReferralDai, + ContractStethRewardProgramAdd, } from 'modules/blockChain/contracts' import { MotionType } from 'modules/motions/types' import { createMotionFormPart } from './createMotionFormPart' @@ -24,6 +25,10 @@ export const ALLOWED_RECIPIENT_ADD_MAP = { evmContract: ContractEvmAllowedRecipientAddReferralDai, motionType: MotionType.AllowedRecipientAddReferralDai, }, + [MotionType.StethRewardProgramAdd]: { + evmContract: ContractStethRewardProgramAdd, + motionType: MotionType.StethRewardProgramAdd, + }, } export const formParts = ({ diff --git a/modules/motions/ui/MotionFormStartNew/Parts/StartNewAllowedRecipientRemove.tsx b/modules/motions/ui/MotionFormStartNew/Parts/StartNewAllowedRecipientRemove.tsx index 498368ee..e16f3c82 100644 --- a/modules/motions/ui/MotionFormStartNew/Parts/StartNewAllowedRecipientRemove.tsx +++ b/modules/motions/ui/MotionFormStartNew/Parts/StartNewAllowedRecipientRemove.tsx @@ -9,6 +9,7 @@ import { Fieldset, MessageBox } from '../CreateMotionFormStyle' import { ContractEvmAllowedRecipientRemove, ContractEvmAllowedRecipientRemoveReferralDai, + ContractStethRewardProgramRemove, } from 'modules/blockChain/contracts' import { MotionType } from 'modules/motions/types' import { createMotionFormPart } from './createMotionFormPart' @@ -23,6 +24,10 @@ export const ALLOWED_RECIPIENT_REMOVE_MAP = { evmContract: ContractEvmAllowedRecipientRemoveReferralDai, motionType: MotionType.AllowedRecipientRemoveReferralDai, }, + [MotionType.StethRewardProgramRemove]: { + evmContract: ContractStethRewardProgramRemove, + motionType: MotionType.StethRewardProgramRemove, + }, } export const formParts = ({ diff --git a/modules/motions/ui/MotionFormStartNew/Parts/StartNewAllowedRecipientTopUp.tsx b/modules/motions/ui/MotionFormStartNew/Parts/StartNewAllowedRecipientTopUp.tsx index 36606772..b5aaedbc 100644 --- a/modules/motions/ui/MotionFormStartNew/Parts/StartNewAllowedRecipientTopUp.tsx +++ b/modules/motions/ui/MotionFormStartNew/Parts/StartNewAllowedRecipientTopUp.tsx @@ -31,6 +31,7 @@ import { ContractEvmAllowedRecipientTopUp, ContractEvmAllowedRecipientTopUpReferralDai, ContractEvmAllowedRecipientTopUpTrpLdo, + ContractStethRewardProgramTopUp, } from 'modules/blockChain/contracts' import { MotionType } from 'modules/motions/types' import { createMotionFormPart } from './createMotionFormPart' @@ -63,6 +64,10 @@ export const ALLOWED_RECIPIENT_TOPUP_MAP = { evmContract: ContractEvmAllowedRecipientTopUpTrpLdo, motionType: MotionType.AllowedRecipientTopUpTrpLdo, }, + [MotionType.StethRewardProgramTopUp]: { + evmContract: ContractStethRewardProgramTopUp, + motionType: MotionType.StethRewardProgramTopUp, + }, } export const formParts = ({ diff --git a/modules/motions/ui/MotionFormStartNew/Parts/index.ts b/modules/motions/ui/MotionFormStartNew/Parts/index.ts index 4a9e6618..4918bf04 100644 --- a/modules/motions/ui/MotionFormStartNew/Parts/index.ts +++ b/modules/motions/ui/MotionFormStartNew/Parts/index.ts @@ -66,6 +66,15 @@ export const formParts = { [MotionType.GasFunderETHTopUp]: StartNewTopUpWithLimits.formParts({ registryType: MotionType.GasFunderETHTopUp, }), + [MotionType.StethRewardProgramAdd]: formAllowedRecipientAdd.formParts({ + registryType: MotionType.StethRewardProgramAdd, + }), + [MotionType.StethRewardProgramRemove]: formAllowedRecipientRemove.formParts({ + registryType: MotionType.StethRewardProgramRemove, + }), + [MotionType.StethRewardProgramTopUp]: formAllowedRecipientTopUp.formParts({ + registryType: MotionType.StethRewardProgramTopUp, + }), } as const export type FormData = { diff --git a/modules/motions/utils/getMotionTypeDisplayName.ts b/modules/motions/utils/getMotionTypeDisplayName.ts index bed233ce..fc3b7777 100644 --- a/modules/motions/utils/getMotionTypeDisplayName.ts +++ b/modules/motions/utils/getMotionTypeDisplayName.ts @@ -30,6 +30,9 @@ export const MotionTypeDisplayNames: Record< [MotionType.PmlDAITopUp]: 'Top up PML DAI', [MotionType.AtcDAITopUp]: 'Top up ATC DAI', [MotionType.GasFunderETHTopUp]: 'Top up Gas Funder ETH', + [MotionType.StethRewardProgramAdd]: 'Add stETH reward program', + [MotionType.StethRewardProgramRemove]: 'Remove stETH reward program', + [MotionType.StethRewardProgramTopUp]: 'Top up stETH reward program', [EvmUnrecognized]: 'Unrecognized evm factory', } as const