On-chain method
Last updated
Last updated
tgUSD staking contract address: EQDsRxOvYyhOAi-zHBSN2NkHcjwFB1aaMSnqJG7Chm14x02P
Send an OP_PROVIDE_CURRENT_QUOTE
message to the tgUSD Staking contract, which will respond with an OP_TAKE_CURRENT_QUOTE
message containing the rate information.
OP_PROVIDE_CURRENT_QUOTE
Message:
OP_PROVIDE_CURRENT_QUOTE
uint32
0x984d8449
0
queryId
uint64
0
recipient
Address
The address who receive OP_TAKE_CURRENT_QUOTE
0
customPayload
Maybe<Cell>
Send OP_TAKE_CURRENT_QUOTE
to recipient with this customPayload
0
OP_TAKE_CURRENT_QUOTE
Message:
OP_TAKE_CURRENT_QUOTE
uint32
0x80ed6c2e
0
queryId
uint64
0
totalActiveStake
coins
Currently active staked amount (including distributed rewards)
0
totalShares
coins
0
timestamp
uint32
The timestamp when the rate information is provided
0
customPayload
Maybe<Cell>
0
totalActiveStake
/ totalShares
represents the current conversion rate of 1 stgUSD in tgUSD (You can control the rounding precision as needed)