|
| 1 | +import type { Address } from 'viem' |
| 2 | + |
| 3 | +/** Polygon StakeManager proxy contract on Ethereum mainnet */ |
| 4 | +export const POLYGON_STAKE_MANAGER_ADDRESS: Address = '0x5e3Ef299fDDf15eAa0432E6e66473ace8c13D908' |
| 5 | + |
| 6 | +/** POL token contract on Ethereum mainnet (staking token, migrated from MATIC via PIP-42) */ |
| 7 | +export const POLYGON_STAKING_TOKEN_ADDRESS: Address = '0x455e53CBB86018Ac2B8092FdCd39d8444aFFC3F6' |
| 8 | + |
| 9 | +/** Chorus One Polygon ValidatorShare contract addresses */ |
| 10 | +export const CHORUS_ONE_POLYGON_VALIDATORS = { |
| 11 | + mainnet: '0xD9E6987D77bf2c6d0647b8181fd68A259f838C36' as Address |
| 12 | +} as const |
| 13 | + |
| 14 | +export const VALIDATOR_SHARE_ABI = [ |
| 15 | + { |
| 16 | + type: 'function', |
| 17 | + name: 'buyVoucherPOL', |
| 18 | + inputs: [ |
| 19 | + { name: '_amount', type: 'uint256', internalType: 'uint256' }, |
| 20 | + { name: '_minSharesToMint', type: 'uint256', internalType: 'uint256' } |
| 21 | + ], |
| 22 | + outputs: [{ name: 'amountToDeposit', type: 'uint256', internalType: 'uint256' }], |
| 23 | + stateMutability: 'nonpayable' |
| 24 | + }, |
| 25 | + { |
| 26 | + type: 'function', |
| 27 | + name: 'sellVoucher_newPOL', |
| 28 | + inputs: [ |
| 29 | + { name: 'claimAmount', type: 'uint256', internalType: 'uint256' }, |
| 30 | + { name: 'maximumSharesToBurn', type: 'uint256', internalType: 'uint256' } |
| 31 | + ], |
| 32 | + outputs: [], |
| 33 | + stateMutability: 'nonpayable' |
| 34 | + }, |
| 35 | + { |
| 36 | + type: 'function', |
| 37 | + name: 'unstakeClaimTokens_newPOL', |
| 38 | + inputs: [{ name: 'unbondNonce', type: 'uint256', internalType: 'uint256' }], |
| 39 | + outputs: [], |
| 40 | + stateMutability: 'nonpayable' |
| 41 | + }, |
| 42 | + { |
| 43 | + type: 'function', |
| 44 | + name: 'withdrawRewardsPOL', |
| 45 | + inputs: [], |
| 46 | + outputs: [], |
| 47 | + stateMutability: 'nonpayable' |
| 48 | + }, |
| 49 | + { |
| 50 | + type: 'function', |
| 51 | + name: 'restakePOL', |
| 52 | + inputs: [], |
| 53 | + outputs: [ |
| 54 | + { name: 'amountRestaked', type: 'uint256', internalType: 'uint256' }, |
| 55 | + { name: 'liquidReward', type: 'uint256', internalType: 'uint256' } |
| 56 | + ], |
| 57 | + stateMutability: 'nonpayable' |
| 58 | + }, |
| 59 | + { |
| 60 | + type: 'function', |
| 61 | + name: 'getTotalStake', |
| 62 | + inputs: [{ name: 'user', type: 'address', internalType: 'address' }], |
| 63 | + outputs: [ |
| 64 | + { name: '', type: 'uint256', internalType: 'uint256' }, |
| 65 | + { name: '', type: 'uint256', internalType: 'uint256' } |
| 66 | + ], |
| 67 | + stateMutability: 'view' |
| 68 | + }, |
| 69 | + { |
| 70 | + type: 'function', |
| 71 | + name: 'unbondNonces', |
| 72 | + inputs: [{ name: '', type: 'address', internalType: 'address' }], |
| 73 | + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], |
| 74 | + stateMutability: 'view' |
| 75 | + }, |
| 76 | + { |
| 77 | + type: 'function', |
| 78 | + name: 'unbonds_new', |
| 79 | + inputs: [ |
| 80 | + { name: '', type: 'address', internalType: 'address' }, |
| 81 | + { name: '', type: 'uint256', internalType: 'uint256' } |
| 82 | + ], |
| 83 | + outputs: [ |
| 84 | + { name: 'shares', type: 'uint256', internalType: 'uint256' }, |
| 85 | + { name: 'withdrawEpoch', type: 'uint256', internalType: 'uint256' } |
| 86 | + ], |
| 87 | + stateMutability: 'view' |
| 88 | + }, |
| 89 | + { |
| 90 | + type: 'function', |
| 91 | + name: 'getLiquidRewards', |
| 92 | + inputs: [{ name: 'user', type: 'address', internalType: 'address' }], |
| 93 | + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], |
| 94 | + stateMutability: 'view' |
| 95 | + } |
| 96 | +] as const |
| 97 | + |
| 98 | +export const ERC20_ABI = [ |
| 99 | + { |
| 100 | + type: 'function', |
| 101 | + name: 'approve', |
| 102 | + inputs: [ |
| 103 | + { name: 'spender', type: 'address', internalType: 'address' }, |
| 104 | + { name: 'amount', type: 'uint256', internalType: 'uint256' } |
| 105 | + ], |
| 106 | + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], |
| 107 | + stateMutability: 'nonpayable' |
| 108 | + }, |
| 109 | + { |
| 110 | + type: 'function', |
| 111 | + name: 'allowance', |
| 112 | + inputs: [ |
| 113 | + { name: 'owner', type: 'address', internalType: 'address' }, |
| 114 | + { name: 'spender', type: 'address', internalType: 'address' } |
| 115 | + ], |
| 116 | + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], |
| 117 | + stateMutability: 'view' |
| 118 | + } |
| 119 | +] as const |
| 120 | + |
| 121 | +export const STAKE_MANAGER_ABI = [ |
| 122 | + { |
| 123 | + type: 'function', |
| 124 | + name: 'epoch', |
| 125 | + inputs: [], |
| 126 | + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], |
| 127 | + stateMutability: 'view' |
| 128 | + } |
| 129 | +] as const |
0 commit comments