Quoter
Last updated
Last updated
Contract name: Quoter Protocol
Contract addresses:
Harmony Mainnet: 0xFFFD451F62bE856E0cADdAc7c9a2e60aC5842C48
Binance Smart Chain Mainnet: 0x76540F7e38dFCdF3b39A501Bb7ef77c3705f4F17
Harmony Testnet: 0x028739801886AC60E0428e918e2bC9cA5D06399E
Returns balance of a token available for use in Quoter.
Parameters:
token
address
Token address of a token to check balance of.
Returns:
uint256
Balance of given token
Cancels order's quote.
Paramaters:
orderInfo
uint256
Order info contains timestamp and order id
Creates or updates session that lets maker and taker to trade without signing messages through wallet.
Parameters:
sessionKey
address
Public key of a session
expirationTime
uint256
Expiration time in unix seconds timestamp
Returns:
SessionStatus
One of the value from enum (created, updated) that indicates the status of session
Deposits given token of frontend to the Quoter smart contract and stores the balance information.
token
address
Address of token to deposit, depositing wallet must give an allowance to the Quoter smart contract for given amount
amount
uint256
Amount of tokens to deposit
Returns:
uint256
The balance after depositing the tokens
Terminates active session
Fills order's quote, fully or partially (whichever is possible)
Parameters:
order
OrderRFQ
Order quote to fill
signature
bytes
Signature to confirm quote ownership
takingAmount
uint256
Taking amount
makingAmount
uint256
Making amount
Returns:
amounts
OrderRFQAmounts
Amounts - filled taking and making amounts
Fills order's quote, fully or partially (whichever is possible) and calls external contract function
Parameters:
order
OrderRFQ
Order quote to fill
signature
bytes
Signature to confirm quote ownership
takingAmount
uint256
Taking amount
makingAmount
uint256
Making amount
receiver
address
Address of contract that will receive the call after successful validation of RFQ order and transfer from taker to maker
data
bytes
external call data
Returns:
amounts
OrderRFQAmounts
Amounts - filled taking and making amounts
Returns session data
Parameters:
owner
address
Wallet address of the session's owner
Returns:
creator
adress
Wallet address of the session's owner
sessionKey
address
Session public key
expirationTime
uint256
Session expiration unix timestamp, might be zero if it was terminated
txCount
uint256
Number of transactions made during session
Returns expiration unix timestamp of given address session
Parameters:
owner
address
Wallet address of the session's owner
Returns:
expirationTime
uint256
Session expiration unix timestamp, might be zero if it was terminated
//Opis
Parameters:
bonus
uint256
//Opis
Parameters:
to
address
Address of wallet that will receive ownership
Returns:
oldOwner
address
Address of previous owner
newOwner
address
Address of new owner
Withdraws given token of frontend from the Quoter contract
Parameters:
token
address
Address of a token to withdraw
amount
uint256
Amount of tokens to withdraw
Returns:
uint256
Balance after withdrawing the tokens
Event emmited when RFQ order was filled.
Parameters:
orderHash
bytes32
Hash of the order
takingAmount
uint256
Taking amount
makingAmount
uint256
Making amount
//opis
Parameters:
from
address
to
address
Event emmited on successful session creation
Parameters:
creator
address
Address of wallet creating the session
sessionKey
address
Public key of the session
expirationTime
uint256
Session expiration time in unix timestamp
Event emmited on successful session termination
Parameters:
sender
address
Address of wallet terminating the session
sessionKey
address
Public key of the session
Event emitted on successful session update
Parameters:
sender
address
Address of wallet updating
the session
sessionKey
address
Public key of the session
expirationTime
uint256
Session expiration time in unix timestamp
Event emitted on successful transfer of fee token - split between contract owner and frontend
Parameters:
from
address
Address of wallet that transfers token
recipient
address
Address of first recipient
splitTo
address
Address of second recipient
token
address
Address of deposited token
splitPercentage
uint256
Percentage used to split amount between recipient and splitTo
amount
uint256
Desposit amount
balance
uint256
Balance after fee token transfer
Event emitted on successful deposit of token
sender
address
Address of wallet depositing the token
token
address
Address of the deposited token
amount
uint256
Deposit amount
balance
uint256
Balance after deposit
Event emitted on successful transfer of token
Parameters:
from
address
Address of wallet transfering the token
recipient
address
Address of the token recipient
token
address
Address of the transfered token
amount
uint256
Transfer amount
balance
uint256
Balance after transfer
Event emitted on successful withdrawn of token
Parameters:
sender
address
Address of wallet withdrawing the token
token
address
Address of the withdrawn token
amount
uint256
Withdraw amount
balance
uint256
Balance after withdraw
Properties:
creator
adress
Wallet address of the session's owner
sessionKey
address
Session public key
expirationTime
uint256
Session expiration unix timestamp, might be zero if it was terminated
txCount
uint256
Number of transactions made during session
Properties:
info
uint256
feeAmount
uint256
takerAsset
address
makerAsset
address
feeTokenAddress
address
frontendAddress
address
takerAssetData
bytes
makerAssetData
bytes
Properties:
takerAsset
address
makerAsset
address
takingAmount
uint256
makingAmount
uint256