diff --git a/config.json b/config.json index 5c105df..3075b15 100644 --- a/config.json +++ b/config.json @@ -90,6 +90,9 @@ "stakeLocker": { "contracts": ["StakeLocker", "StakeLockerFactory"] }, + "syrupRouter": { + "contracts": ["SyrupRouter"] + }, "withdrawalManager": { "contracts": ["WithdrawalManager"] }, diff --git a/src/abis/SyrupRouter.abi.json b/src/abis/SyrupRouter.abi.json new file mode 100644 index 0000000..e434d6c --- /dev/null +++ b/src/abis/SyrupRouter.abi.json @@ -0,0 +1,295 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "pool_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "asset", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "bitmap_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline_", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "auth_v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "auth_r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "auth_s", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "depositData_", + "type": "bytes32" + } + ], + "name": "authorizeAndDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "shares_", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "bitmap_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "auth_deadline_", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "auth_v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "auth_r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "auth_s", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "depositData_", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "permit_deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "permit_v_", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "permit_r_", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "permit_s_", + "type": "bytes32" + } + ], + "name": "authorizeAndDepositWithPermit", + "outputs": [ + { + "internalType": "uint256", + "name": "shares_", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "depositData_", + "type": "bytes32" + } + ], + "name": "deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "shares_", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline_", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v_", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r_", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s_", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "depositData_", + "type": "bytes32" + } + ], + "name": "depositWithPermit", + "outputs": [ + { + "internalType": "uint256", + "name": "shares_", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolPermissionManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "depositData", + "type": "bytes32" + } + ], + "name": "DepositData", + "type": "event" + } +] diff --git a/src/index.ts b/src/index.ts index e169928..8babc49 100644 --- a/src/index.ts +++ b/src/index.ts @@ -27,6 +27,7 @@ import * as poolV2Imports from './typechain/poolV2' import * as poolV201Imports from './typechain/poolV201' import * as poolV3Imports from './typechain/poolV3' import * as stakeLockerImports from './typechain/stakeLocker' +import * as syrupRouterImports from './typechain/syrupRouter' import * as withdrawalManagerImports from './typechain/withdrawalManager' import * as withdrawalManagerCyclicalImports from './typechain/withdrawalManagerCyclical' import * as withdrawalManagerQueueImports from './typechain/withdrawalManagerQueue' @@ -213,6 +214,10 @@ const stakeLocker = { factory: stakeLockerImports.StakeLockerFactoryAbi__factory } +const syrupRouter = { + core: syrupRouterImports.SyrupRouterAbi__factory +} + const withdrawalManager = { core: withdrawalManagerImports.WithdrawalManagerAbi__factory } @@ -346,6 +351,9 @@ interface ContractTypes { stakeLocker: stakeLockerImports.StakeLockerAbi stakeLockerFactory: stakeLockerImports.StakeLockerFactoryAbi + // Syrup Router + syrupRouter: syrupRouterImports.SyrupRouterAbi + // withdrawalManager withdrawalManager: withdrawalManagerImports.WithdrawalManagerAbi @@ -403,6 +411,7 @@ export { poolManagerV3, poolPermissionManager, stakeLocker, + syrupRouter, withdrawalManager, withdrawalManagerCyclical, withdrawalManagerQueue,