SyrupRouter
Lightweight router for lender integrations with Syrup pools. Provides stable entry points for first‑time authorized deposits (with optional ERC‑2612 permits) and subsequent deposits, and exposes the underlying pool, manager, and permission manager addresses.
Functions
asset
assetReturns the underlying asset of the ERC‑4626 vault (pool).
function asset()
view
returns (
address asset
);pool
poolReturns the Maple Pool (ERC‑4626 vault) address.
function pool()
view
returns (
address pool
);poolManager
poolManagerReturns the Pool Manager address.
poolPermissionManager
poolPermissionManagerReturns the Pool Permission Manager address.
nonces
noncesReturns the current nonce for the owner (used in authorization signatures).
Parameters:
0
owner
address
address
Address to get nonce for
authorizeAndDeposit
authorizeAndDepositAuthorizes the lender and deposits assets.
Parameters:
0
bitmap
uint256
uint256
Lender permission bitmap
1
deadline
uint256
uint256
Authorization expiry timestamp
2
v
uint8
uint8
ECDSA v component
3
r
bytes32
bytes32
ECDSA r component
4
s
bytes32
bytes32
ECDSA s component
5
amount
uint256
uint256
Asset amount to deposit
6
depositData
bytes32
bytes32
Optional deposit metadata
authorizeAndDepositWithPermit
authorizeAndDepositWithPermitAuthorizes the lender and deposits with an ERC‑2612 permit.
Parameters:
0
bitmap
uint256
uint256
Lender permission bitmap
1
authDeadline
uint256
uint256
Authorization expiry timestamp
2
authV
uint8
uint8
Auth ECDSA v component
3
authR
bytes32
bytes32
Auth ECDSA r component
4
authS
bytes32
bytes32
Auth ECDSA s component
5
amount
uint256
uint256
Asset amount to deposit
6
depositData
bytes32
bytes32
Optional deposit metadata
7
permitDeadline
uint256
uint256
Permit expiry timestamp
8
permitV
uint8
uint8
Permit ECDSA v component
9
permitR
bytes32
bytes32
Permit ECDSA r component
10
permitS
bytes32
bytes32
Permit ECDSA s component
deposit
depositDeposits assets when already authorized.
Parameters:
0
amount
uint256
uint256
Asset amount to deposit
1
depositData
bytes32
bytes32
Optional deposit metadata
depositWithPermit
depositWithPermitDeposits with an ERC‑2612 permit when already authorized.
Parameters:
0
amount
uint256
uint256
Asset amount to deposit
1
deadline
uint256
uint256
Permit expiry timestamp
2
v
uint8
uint8
ECDSA v component
3
r
bytes32
bytes32
ECDSA r component
4
s
bytes32
bytes32
ECDSA s component
5
depositData
bytes32
bytes32
Optional deposit metadata
Events
Last updated