Search…
depositForPermitted()
Bundle approval with the deposit transaction on behalf of a different address

Function depositForPermitted()

1
function depositForPermitted(
2
address provider,
3
Token pool,
4
uint256 tokenAmount,
5
uint256 deadline,
6
uint8 v,
7
bytes32 r,
8
bytes32 s
9
)
10
external
Copied!
depositForPermitted is a deposit function that allows you to bundle the approval with the deposit transaction and send the pool tokens received at the end of the transaction to an address that is different from the initiating one.

Function Arguments

Name
Type
Description
provider
address
The address that should receive the pool tokens at the end of the transaction
pool
Token
The address of the token deposited into the pool
tokenAmount
uint256
The amount to deposit
deadline
uint256
Setting a timestamp after which the permission is no longer valid
v
uint8
Must produce valid secp256k1 signature from the holder along with r and s
r
bytes32
Must produce valid secp256k1 signature from the holder along with v and s
s
bytes32
Must produce valid secp256k1 signature from the holder along with r and v
All pools on Bancor are initiated at 1:1 ratio between reserve to pool token. Once fees are collected, this ratio will change to represent the increased value of pool tokens to reserve. For example, if the ratio is 1 pool token : 2 reserve, it means that the pool token value has doubled since initiation.
See Errors and Troubleshooting for a list of common errors and how to resolve them.