This is a CosmWasm smart contract that allows you to query the Silohub contract on native sei. Silohub contract allows a user to query the contract to get the exchange rate of ISei to Sei.
The contract address of the Silohub contract is sei1e3gttzq5e5k49f9f5gzvrl0rltlav65xu6p9xc0aj7e84lantdjqp7cncc.
The contract address of the deployed ISei Silohub Query contract is sei1a7xygdcf8f0ztdlglh9kme7nm3l4x6avmmjxe3ss57wxc4j6vuhqqa453z.
The contract workflow is as follows:
- The contract queries the
Silohubcontract to get the exchange rates ofISeitoSei. - The
Silohubcontract returns the exchange rates to the contract in the following format:
{
"data": {
"exchange_rates": [
[
1727762390,
"1.033207463698531844"
]
],
"apr": null
}
}- The response is parsed by the contract and processed to return the first item in the
exchange_ratesarray which is the latest exchange rate ofISeitoSei. - The contract returns the processed exchange rate to the caller.