For the complete documentation index, see llms.txt. This page is also available as Markdown.

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, Pool Manager, and Pool Permission Manager addresses.

Functions

asset

The address of the underlying asset used by the ERC-4626 Pool.

    function asset()
        view
        returns (
            address asset
        );

Return Values:

Index
Name
Type
Internal Type
Description

0

asset

address

address

The address of the underlying asset.

pool

The address of the ERC-4626 Pool.

    function pool()
        view
        returns (
            address pool
        );

Return Values:

Index
Name
Type
Internal Type
Description

0

pool

address

address

The address of the ERC-4626 Pool.

poolManager

The address of the Pool Manager.

Return Values:

Index
Name
Type
Internal Type
Description

0

poolManager

address

address

The address of the Pool Manager.

poolPermissionManager

The address of the Pool Permission Manager.

Return Values:

Index
Name
Type
Internal Type
Description

0

poolPermissionManager

address

address

The address of the Pool Permission Manager.

nonces

Returns the nonce for the given owner.

Parameters:

Index
Name
Type
Internal Type
Description

0

owner_

address

address

The address of the owner account.

Return Values:

Index
Name
Type
Internal Type
Description

0

nonce_

uint256

uint256

The nonce for the given owner.

authorizeAndDeposit

Authorizes and deposits assets into the Pool.

Parameters:

Index
Name
Type
Internal Type
Description

0

bitmap_

uint256

uint256

The bitmap of the permission.

1

deadline_

uint256

uint256

The timestamp after which the authorize signature is no longer valid.

2

auth_v

uint8

uint8

ECDSA signature v component.

3

auth_r

bytes32

bytes32

ECDSA signature r component.

4

auth_s

bytes32

bytes32

ECDSA signature s component.

5

amount_

uint256

uint256

The amount of assets to deposit.

6

depositData_

bytes32

bytes32

Optional deposit data.

Return Values:

Index
Name
Type
Internal Type
Description

0

shares_

uint256

uint256

The amount of shares minted.

authorizeAndDepositWithPermit

Authorizes and deposits assets into the Pool with an ERC-2612 permit.

Parameters:

Index
Name
Type
Internal Type
Description

0

bitmap_

uint256

uint256

The bitmap of the permission.

1

auth_deadline_

uint256

uint256

The timestamp after which the authorize signature is no longer valid.

2

auth_v

uint8

uint8

ECDSA signature v component of the authorization.

3

auth_r

bytes32

bytes32

ECDSA signature r component of the authorization.

4

auth_s

bytes32

bytes32

ECDSA signature s component of the authorization.

5

amount_

uint256

uint256

The amount of assets to deposit.

6

depositData_

bytes32

bytes32

Optional deposit data.

7

permit_deadline

uint256

uint256

The timestamp after which the permit signature is no longer valid.

8

permit_v_

uint8

uint8

ECDSA signature v component of the token permit.

9

permit_r_

bytes32

bytes32

ECDSA signature r component of the token permit.

10

permit_s_

bytes32

bytes32

ECDSA signature s component of the token permit.

Return Values:

Index
Name
Type
Internal Type
Description

0

shares_

uint256

uint256

The amount of shares minted.

deposit

Mints shares to the sender by depositing assets into the Pool.

Parameters:

Index
Name
Type
Internal Type
Description

0

assets

uint256

uint256

The amount of assets to deposit.

1

depositData

bytes32

bytes32

Optional deposit data.

Return Values:

Index
Name
Type
Internal Type
Description

0

shares

uint256

uint256

The amount of shares minted.

depositWithPermit

Does an ERC-4626 deposit into a Maple Pool with an ERC-2612 permit.

Parameters:

Index
Name
Type
Internal Type
Description

0

amount

uint256

uint256

The amount of assets to deposit.

1

deadline

uint256

uint256

The timestamp after which the permit signature is no longer valid.

2

v

uint8

uint8

ECDSA signature v component.

3

r

bytes32

bytes32

ECDSA signature r component.

4

s

bytes32

bytes32

ECDSA signature s component.

5

depositData

bytes32

bytes32

Optional deposit data.

Return Values:

Index
Name
Type
Internal Type
Description

0

shares

uint256

uint256

The amount of shares minted.

Events

DepositData

Optional deposit data for off-chain processing.

Parameters:

Index
Name
Type
Internal Type
Description

0

owner

address

address

The receiver of the shares.

1

amount

uint256

uint256

The amount of assets to deposit.

2

depositData

bytes32

bytes32

Optional deposit data.

Last updated

Was this helpful?