diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 0e30be74..3fe3d98f 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -35,9 +35,6 @@ jobs: restore-keys: | ${{ runner.os }}-pnpm-store- - - name: Add yarn to pnpm - run: pnpm add -g yarn - - name: Install dependencies run: pnpm install diff --git a/packages/contracts/.gitignore b/packages/contracts/.gitignore index 47b588eb..58c384b5 100644 --- a/packages/contracts/.gitignore +++ b/packages/contracts/.gitignore @@ -1 +1,2 @@ -abis/* \ No newline at end of file +# TODO - Investigate proper abi post-install generation +# abis/* \ No newline at end of file diff --git a/packages/contracts/abis/BN256G1.ts b/packages/contracts/abis/BN256G1.ts new file mode 100644 index 00000000..1a3986bc --- /dev/null +++ b/packages/contracts/abis/BN256G1.ts @@ -0,0 +1,6 @@ +// This file is generated by the generate-abis script. Do not modify it manually. + +/** + * Generated ABI for the BN256G1 contract. + */ +export const BN256G1Abi = [] as const; \ No newline at end of file diff --git a/packages/contracts/abis/BN256G2.ts b/packages/contracts/abis/BN256G2.ts new file mode 100644 index 00000000..a0cbef83 --- /dev/null +++ b/packages/contracts/abis/BN256G2.ts @@ -0,0 +1,6 @@ +// This file is generated by the generate-abis script. Do not modify it manually. + +/** + * Generated ABI for the BN256G2 contract. + */ +export const BN256G2Abi = [] as const; \ No newline at end of file diff --git a/packages/contracts/abis/Pairing.ts b/packages/contracts/abis/Pairing.ts new file mode 100644 index 00000000..df885144 --- /dev/null +++ b/packages/contracts/abis/Pairing.ts @@ -0,0 +1,6 @@ +// This file is generated by the generate-abis script. Do not modify it manually. + +/** + * Generated ABI for the Pairing contract. + */ +export const PairingAbi = [] as const; \ No newline at end of file diff --git a/packages/contracts/abis/RewardRatePool.ts b/packages/contracts/abis/RewardRatePool.ts new file mode 100644 index 00000000..fba283c0 --- /dev/null +++ b/packages/contracts/abis/RewardRatePool.ts @@ -0,0 +1,398 @@ +// This file is generated by the generate-abis script. Do not modify it manually. + +/** + * Generated ABI for the RewardRatePool contract. + */ +export const RewardRatePoolAbi = [ + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "AddressInsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newBeneficiary", + "type": "address" + } + ], + "name": "BeneficiaryUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "FundsReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "ANNUAL_INTEREST_RATE", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "BASIS_POINTS", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SENT", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "beneficiary", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeElapsed", + "type": "uint256" + } + ], + "name": "calculateInterestAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "calculateReleasedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "calculateTotalDeposited", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_beneficiary", + "type": "address" + }, + { + "internalType": "address", + "name": "_sent", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lastPaidOutTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "payoutReleased", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "rewardRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newBeneficiary", + "type": "address" + } + ], + "name": "setBeneficiary", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "totalPaidOut", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; \ No newline at end of file diff --git a/packages/contracts/abis/SENT.ts b/packages/contracts/abis/SENT.ts new file mode 100644 index 00000000..13ade93d --- /dev/null +++ b/packages/contracts/abis/SENT.ts @@ -0,0 +1,331 @@ +// This file is generated by the generate-abis script. Do not modify it manually. + +/** + * Generated ABI for the SENT contract. + */ +export const SENTAbi = [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "totalSupply_", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiverGenesisAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; \ No newline at end of file diff --git a/packages/contracts/abis/ServiceNodeContribution.ts b/packages/contracts/abis/ServiceNodeContribution.ts new file mode 100644 index 00000000..63c8f290 --- /dev/null +++ b/packages/contracts/abis/ServiceNodeContribution.ts @@ -0,0 +1,597 @@ +// This file is generated by the generate-abis script. Do not modify it manually. + +/** + * Generated ABI for the ServiceNodeContribution contract. + */ +export const ServiceNodeContributionAbi = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_stakingRewardsContract", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxContributors", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "X", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Y", + "type": "uint256" + } + ], + "internalType": "struct BN256G1.G1Point", + "name": "_blsPubkey", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "serviceNodePubkey", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceNodeSignature1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceNodeSignature2", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "fee", + "type": "uint16" + } + ], + "internalType": "struct IServiceNodeRewards.ServiceNodeParams", + "name": "_serviceNodeParams", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "AddressInsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "serviceNodePubkey", + "type": "uint256" + } + ], + "name": "Cancelled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "serviceNodePubkey", + "type": "uint256" + } + ], + "name": "Finalized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "contributor", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "NewContribution", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "contributor", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "WithdrawContribution", + "type": "event" + }, + { + "inputs": [], + "name": "SENT", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WITHDRAWAL_DELAY", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "blsPubkey", + "outputs": [ + { + "internalType": "uint256", + "name": "X", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Y", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "blsSignature", + "outputs": [ + { + "internalType": "uint256", + "name": "sigs0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs2", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs3", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "contributionRemaining", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numContributors", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxNumContributors", + "type": "uint256" + } + ], + "name": "calcMinimumContribution", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "cancelNode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cancelled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "contributeFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "sigs0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs2", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs3", + "type": "uint256" + } + ], + "internalType": "struct IServiceNodeRewards.BLSSignatureParams", + "name": "_blsSignature", + "type": "tuple" + } + ], + "name": "contributeOperatorFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "contributionTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "contributions", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "contributorAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "contributorAddressesLength", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "finalized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxContributors", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minimumContribution", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_stakingRequirement", + "type": "uint256" + } + ], + "name": "minimumOperatorContribution", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "operator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "operatorContribution", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "rescueERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "resetContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "serviceNodeParams", + "outputs": [ + { + "internalType": "uint256", + "name": "serviceNodePubkey", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceNodeSignature1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceNodeSignature2", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "fee", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "stakingRequirement", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "stakingRewardsContract", + "outputs": [ + { + "internalType": "contract IServiceNodeRewards", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalContribution", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawContribution", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; \ No newline at end of file diff --git a/packages/contracts/abis/ServiceNodeContributionFactory.ts b/packages/contracts/abis/ServiceNodeContributionFactory.ts new file mode 100644 index 00000000..a54a0257 --- /dev/null +++ b/packages/contracts/abis/ServiceNodeContributionFactory.ts @@ -0,0 +1,128 @@ +// This file is generated by the generate-abis script. Do not modify it manually. + +/** + * Generated ABI for the ServiceNodeContributionFactory contract. + */ +export const ServiceNodeContributionFactoryAbi = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_stakingRewardsContract", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "contributorContract", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "serviceNodePubkey", + "type": "uint256" + } + ], + "name": "NewServiceNodeContributionContract", + "type": "event" + }, + { + "inputs": [], + "name": "SENT", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "X", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Y", + "type": "uint256" + } + ], + "internalType": "struct BN256G1.G1Point", + "name": "blsPubkey", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "serviceNodePubkey", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceNodeSignature1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceNodeSignature2", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "fee", + "type": "uint16" + } + ], + "internalType": "struct IServiceNodeRewards.ServiceNodeParams", + "name": "serviceNodeParams", + "type": "tuple" + } + ], + "name": "deployContributionContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "maxContributors", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "stakingRewardsContract", + "outputs": [ + { + "internalType": "contract IServiceNodeRewards", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] as const; \ No newline at end of file diff --git a/packages/contracts/abis/ServiceNodeRewards.ts b/packages/contracts/abis/ServiceNodeRewards.ts new file mode 100644 index 00000000..673f742b --- /dev/null +++ b/packages/contracts/abis/ServiceNodeRewards.ts @@ -0,0 +1,1644 @@ +// This file is generated by the generate-abis script. Do not modify it manually. + +/** + * Generated ABI for the ServiceNodeRewards contract. + */ +export const ServiceNodeRewardsAbi = [ + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "AddressInsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "ArrayLengthMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "serviceNodeID", + "type": "uint64" + } + ], + "name": "BLSPubkeyAlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "serviceNodeID", + "type": "uint64" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "X", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Y", + "type": "uint256" + } + ], + "internalType": "struct BN256G1.G1Point", + "name": "pubkey", + "type": "tuple" + } + ], + "name": "BLSPubkeyDoesNotMatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "serviceNodeID", + "type": "uint64" + }, + { + "internalType": "address", + "name": "contributor", + "type": "address" + } + ], + "name": "CallerNotContributor", + "type": "error" + }, + { + "inputs": [], + "name": "ContractAlreadyStarted", + "type": "error" + }, + { + "inputs": [], + "name": "ContractNotStarted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "required", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "provided", + "type": "uint256" + } + ], + "name": "ContributionTotalMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "DeleteSentinelNodeNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "serviceNodeID", + "type": "uint64" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "EarlierLeaveRequestMade", + "type": "error" + }, + { + "inputs": [], + "name": "EnforcedPause", + "type": "error" + }, + { + "inputs": [], + "name": "ExpectedPause", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "contributor", + "type": "address" + } + ], + "name": "FirstContributorMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numSigners", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requiredSigners", + "type": "uint256" + } + ], + "name": "InsufficientBLSSignatures", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBLSProofOfPossession", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBLSSignature", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "serviceNodeID", + "type": "uint64" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "currenttime", + "type": "uint256" + } + ], + "name": "LeaveRequestTooEarly", + "type": "error" + }, + { + "inputs": [], + "name": "MaxContributorsExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [], + "name": "NullRecipient", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expectedRecipient", + "type": "address" + }, + { + "internalType": "address", + "name": "providedRecipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "serviceNodeID", + "type": "uint256" + } + ], + "name": "RecipientAddressDoesNotMatch", + "type": "error" + }, + { + "inputs": [], + "name": "RecipientRewardsTooLow", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "serviceNodeID", + "type": "uint64" + } + ], + "name": "ServiceNodeDoesntExist", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "serviceNodeID", + "type": "uint64" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "currenttime", + "type": "uint256" + } + ], + "name": "SignatureExpired", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newMax", + "type": "uint256" + } + ], + "name": "BLSNonSignerThresholdMaxUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "serviceNodeID", + "type": "uint64" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "X", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Y", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct BN256G1.G1Point", + "name": "pubkey", + "type": "tuple" + } + ], + "name": "NewSeededServiceNode", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "serviceNodeID", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "X", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Y", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct BN256G1.G1Point", + "name": "pubkey", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "serviceNodePubkey", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceNodeSignature1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceNodeSignature2", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "fee", + "type": "uint16" + } + ], + "indexed": false, + "internalType": "struct IServiceNodeRewards.ServiceNodeParams", + "name": "serviceNode", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "stakedAmount", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct IServiceNodeRewards.Contributor[]", + "name": "contributors", + "type": "tuple[]" + } + ], + "name": "NewServiceNode", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "recipientAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + } + ], + "name": "RewardsBalanceUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "recipientAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "RewardsClaimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "serviceNodeID", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "X", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Y", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct BN256G1.G1Point", + "name": "pubkey", + "type": "tuple" + } + ], + "name": "ServiceNodeLiquidated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "serviceNodeID", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "returnedAmount", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "X", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Y", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct BN256G1.G1Point", + "name": "pubkey", + "type": "tuple" + } + ], + "name": "ServiceNodeRemoval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "serviceNodeID", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "X", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Y", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct BN256G1.G1Point", + "name": "pubkey", + "type": "tuple" + } + ], + "name": "ServiceNodeRemovalRequest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newExpiry", + "type": "uint256" + } + ], + "name": "SignatureExpiryUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newRequirement", + "type": "uint256" + } + ], + "name": "StakingRequirementUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "LIST_SENTINEL", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_SERVICE_NODE_REMOVAL_WAIT_TIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_aggregatePubkey", + "outputs": [ + { + "internalType": "uint256", + "name": "X", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Y", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "X", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Y", + "type": "uint256" + } + ], + "internalType": "struct BN256G1.G1Point", + "name": "blsPubkey", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "sigs0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs2", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs3", + "type": "uint256" + } + ], + "internalType": "struct IServiceNodeRewards.BLSSignatureParams", + "name": "blsSignature", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "serviceNodePubkey", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceNodeSignature1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceNodeSignature2", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "fee", + "type": "uint16" + } + ], + "internalType": "struct IServiceNodeRewards.ServiceNodeParams", + "name": "serviceNodeParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "stakedAmount", + "type": "uint256" + } + ], + "internalType": "struct IServiceNodeRewards.Contributor[]", + "name": "contributors", + "type": "tuple[]" + } + ], + "name": "addBLSPublicKey", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "aggregatePubkey", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "X", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Y", + "type": "uint256" + } + ], + "internalType": "struct BN256G1.G1Point", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "blsNonSignerThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "blsNonSignerThresholdMax", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claimRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "designatedToken", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "foundationPool", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + }, + { + "internalType": "address", + "name": "foundationPool_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "stakingRequirement_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxContributors_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "liquidatorRewardRatio_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "poolShareOfLiquidationRatio_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "recipientRatio_", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "serviceNodeID", + "type": "uint64" + } + ], + "name": "initiateRemoveBLSPublicKey", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isStarted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "X", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Y", + "type": "uint256" + } + ], + "internalType": "struct BN256G1.G1Point", + "name": "blsPubkey", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "sigs0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs2", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs3", + "type": "uint256" + } + ], + "internalType": "struct IServiceNodeRewards.BLSSignatureParams", + "name": "blsSignature", + "type": "tuple" + }, + { + "internalType": "uint64[]", + "name": "ids", + "type": "uint64[]" + } + ], + "name": "liquidateBLSPublicKeyWithSignature", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "liquidateTag", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "liquidatorRewardRatio", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxContributors", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nextServiceNodeID", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolShareOfLiquidationRatio", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proofOfPossessionTag", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "recipientRatio", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "recipients", + "outputs": [ + { + "internalType": "uint256", + "name": "rewards", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimed", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "removalTag", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "serviceNodeID", + "type": "uint64" + } + ], + "name": "removeBLSPublicKeyAfterWaitTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "X", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Y", + "type": "uint256" + } + ], + "internalType": "struct BN256G1.G1Point", + "name": "blsPubkey", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "sigs0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs2", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs3", + "type": "uint256" + } + ], + "internalType": "struct IServiceNodeRewards.BLSSignatureParams", + "name": "blsSignature", + "type": "tuple" + }, + { + "internalType": "uint64[]", + "name": "ids", + "type": "uint64[]" + } + ], + "name": "removeBLSPublicKeyWithSignature", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rewardTag", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "pkX", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "pkY", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "name": "seedPublicKeyList", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "blsPublicKey", + "type": "bytes" + } + ], + "name": "serviceNodeIDs", + "outputs": [ + { + "internalType": "uint64", + "name": "serviceNodeID", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "serviceNodeID", + "type": "uint64" + } + ], + "name": "serviceNodes", + "outputs": [ + { + "components": [ + { + "internalType": "uint64", + "name": "next", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "prev", + "type": "uint64" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "X", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Y", + "type": "uint256" + } + ], + "internalType": "struct BN256G1.G1Point", + "name": "pubkey", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "leaveRequestTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deposit", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "stakedAmount", + "type": "uint256" + } + ], + "internalType": "struct IServiceNodeRewards.Contributor[]", + "name": "contributors", + "type": "tuple[]" + } + ], + "internalType": "struct IServiceNodeRewards.ServiceNode", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "serviceNodesLength", + "outputs": [ + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newMax", + "type": "uint256" + } + ], + "name": "setBLSNonSignerThresholdMax", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newExpiry", + "type": "uint256" + } + ], + "name": "setSignatureExpiry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newRequirement", + "type": "uint256" + } + ], + "name": "setStakingRequirement", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "signatureExpiry", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "stakingRequirement", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "start", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "totalNodes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipientAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "recipientRewards", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "sigs0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs2", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs3", + "type": "uint256" + } + ], + "internalType": "struct IServiceNodeRewards.BLSSignatureParams", + "name": "blsSignature", + "type": "tuple" + }, + { + "internalType": "uint64[]", + "name": "ids", + "type": "uint64[]" + } + ], + "name": "updateRewardsBalance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateServiceNodesLength", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; \ No newline at end of file diff --git a/packages/contracts/abis/Shared.ts b/packages/contracts/abis/Shared.ts new file mode 100644 index 00000000..29aa50aa --- /dev/null +++ b/packages/contracts/abis/Shared.ts @@ -0,0 +1,6 @@ +// This file is generated by the generate-abis script. Do not modify it manually. + +/** + * Generated ABI for the Shared contract. + */ +export const SharedAbi = [] as const; \ No newline at end of file diff --git a/packages/contracts/abis/TokenConverter.ts b/packages/contracts/abis/TokenConverter.ts new file mode 100644 index 00000000..2f889fda --- /dev/null +++ b/packages/contracts/abis/TokenConverter.ts @@ -0,0 +1,329 @@ +// This file is generated by the generate-abis script. Do not modify it manually. + +/** + * Generated ABI for the TokenConverter contract. + */ +export const TokenConverterAbi = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenA", + "type": "address" + }, + { + "internalType": "address", + "name": "_tokenB", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_initialNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_initialDenominator", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "AddressInsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountA", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountB", + "type": "uint256" + } + ], + "name": "Conversion", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "numerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "denominator", + "type": "uint256" + } + ], + "name": "RateUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenBDeposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenBWithdrawn", + "type": "event" + }, + { + "inputs": [], + "name": "conversionRateDenominator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionRateNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amountA", + "type": "uint256" + } + ], + "name": "convertTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "depositTokenB", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "tokenA", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokenB", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_newDenominator", + "type": "uint256" + } + ], + "name": "updateConversionRate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokenB", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; \ No newline at end of file diff --git a/packages/contracts/abis/TokenVestingNoStaking.ts b/packages/contracts/abis/TokenVestingNoStaking.ts new file mode 100644 index 00000000..8b1a0594 --- /dev/null +++ b/packages/contracts/abis/TokenVestingNoStaking.ts @@ -0,0 +1,314 @@ +// This file is generated by the generate-abis script. Do not modify it manually. + +/** + * Generated ABI for the TokenVestingNoStaking contract. + */ +export const TokenVestingNoStakingAbi = [ + { + "inputs": [ + { + "internalType": "address", + "name": "beneficiary_", + "type": "address" + }, + { + "internalType": "address", + "name": "revoker_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "cliff_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end_", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "transferableBeneficiary_", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "AddressInsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldBeneficiary", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newBeneficiary", + "type": "address" + } + ], + "name": "BeneficiaryTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldRevoker", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newRevoker", + "type": "address" + } + ], + "name": "RevokerTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "refund", + "type": "uint256" + } + ], + "name": "TokenVestingRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokensReleased", + "type": "event" + }, + { + "inputs": [], + "name": "CLIFF_DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cliff", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "end", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getBeneficiary", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getRevoker", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + } + ], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "name": "released", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + } + ], + "name": "revoke", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "revoked", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "beneficiary_", + "type": "address" + } + ], + "name": "transferBeneficiary", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "revoker_", + "type": "address" + } + ], + "name": "transferRevoker", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "transferableBeneficiary", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] as const; \ No newline at end of file diff --git a/packages/contracts/abis/TokenVestingStaking.ts b/packages/contracts/abis/TokenVestingStaking.ts new file mode 100644 index 00000000..780df808 --- /dev/null +++ b/packages/contracts/abis/TokenVestingStaking.ts @@ -0,0 +1,480 @@ +// This file is generated by the generate-abis script. Do not modify it manually. + +/** + * Generated ABI for the TokenVestingStaking contract. + */ +export const TokenVestingStakingAbi = [ + { + "inputs": [ + { + "internalType": "address", + "name": "beneficiary_", + "type": "address" + }, + { + "internalType": "address", + "name": "revoker_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "start_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end_", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "transferableBeneficiary_", + "type": "bool" + }, + { + "internalType": "contract IServiceNodeRewards", + "name": "stakingRewardsContract_", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "sent_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "AddressInsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldBeneficiary", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newBeneficiary", + "type": "address" + } + ], + "name": "BeneficiaryTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldRevoker", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newRevoker", + "type": "address" + } + ], + "name": "RevokerTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "refund", + "type": "uint256" + } + ], + "name": "TokenVestingRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokensReleased", + "type": "event" + }, + { + "inputs": [], + "name": "SENT", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "X", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Y", + "type": "uint256" + } + ], + "internalType": "struct BN256G1.G1Point", + "name": "blsPubkey", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "sigs0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs2", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sigs3", + "type": "uint256" + } + ], + "internalType": "struct IServiceNodeRewards.BLSSignatureParams", + "name": "blsSignature", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "serviceNodePubkey", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceNodeSignature1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceNodeSignature2", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "fee", + "type": "uint16" + } + ], + "internalType": "struct IServiceNodeRewards.ServiceNodeParams", + "name": "serviceNodeParams", + "type": "tuple" + } + ], + "name": "addBLSPublicKey", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "beneficiary", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claimRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "end", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getBeneficiary", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getRevoker", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "serviceNodeID", + "type": "uint64" + } + ], + "name": "initiateRemoveBLSPublicKey", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "investorServiceNodes", + "outputs": [ + { + "internalType": "uint64", + "name": "serviceNodeID", + "type": "uint64" + }, + { + "internalType": "uint256", + "name": "deposit", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + } + ], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + } + ], + "name": "retrieveRevokedFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + } + ], + "name": "revoke", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "revoked", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "revoker", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "stakingRewardsContract", + "outputs": [ + { + "internalType": "contract IServiceNodeRewards", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "start", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "beneficiary_", + "type": "address" + } + ], + "name": "transferBeneficiary", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "revoker_", + "type": "address" + } + ], + "name": "transferRevoker", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "transferableBeneficiary", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] as const; \ No newline at end of file diff --git a/packages/contracts/abis/index.ts b/packages/contracts/abis/index.ts new file mode 100644 index 00000000..3d44e9d1 --- /dev/null +++ b/packages/contracts/abis/index.ts @@ -0,0 +1,42 @@ +// This file is generated by the generate-abis script. Do not modify it manually. + +import { RewardRatePoolAbi } from './RewardRatePool'; +import { SENTAbi } from './SENT'; +import { ServiceNodeContributionAbi } from './ServiceNodeContribution'; +import { ServiceNodeContributionFactoryAbi } from './ServiceNodeContributionFactory'; +import { ServiceNodeRewardsAbi } from './ServiceNodeRewards'; +import { BN256G1Abi } from './BN256G1'; +import { BN256G2Abi } from './BN256G2'; +import { PairingAbi } from './Pairing'; +import { SharedAbi } from './Shared'; +import { TokenConverterAbi } from './TokenConverter'; +import { TokenVestingNoStakingAbi } from './TokenVestingNoStaking'; +import { TokenVestingStakingAbi } from './TokenVestingStaking'; + +export const Contracts = { +RewardRatePool: RewardRatePoolAbi, +SENT: SENTAbi, +ServiceNodeContribution: ServiceNodeContributionAbi, +ServiceNodeContributionFactory: ServiceNodeContributionFactoryAbi, +ServiceNodeRewards: ServiceNodeRewardsAbi, +BN256G1: BN256G1Abi, +BN256G2: BN256G2Abi, +Pairing: PairingAbi, +Shared: SharedAbi, +TokenConverter: TokenConverterAbi, +TokenVestingNoStaking: TokenVestingNoStakingAbi, +TokenVestingStaking: TokenVestingStakingAbi +} as const;export type ContractWithAbiName = keyof typeof Contracts;export type ContractAbis = typeof Contracts;export { +RewardRatePoolAbi, +SENTAbi, +ServiceNodeContributionAbi, +ServiceNodeContributionFactoryAbi, +ServiceNodeRewardsAbi, +BN256G1Abi, +BN256G2Abi, +PairingAbi, +SharedAbi, +TokenConverterAbi, +TokenVestingNoStakingAbi, +TokenVestingStakingAbi, +}; \ No newline at end of file diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 11587649..3487c09c 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -15,7 +15,6 @@ "lint": "eslint .", "lint-staged": "lint-staged", "tsc": "pnpm generate", - "postinstall": "pnpm generate", "test": "jest" }, "dependencies": {