Skip to content

Latest commit

 

History

History

oraiswap_router

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Oraiswap Router

The Router Contract contains the logic to facilitate multi-hop swap operations via oraiswap.

On-chain swap & Oraiswap is supported.

Oraiswap Router Contract:

Tx:

Operations Assertion

The contract will check whether the resulting token is swapped into one token.

Example

Swap KRT => Orai => mABNB If the token is ow20 Orai, we can convert it to native first

{
   "execute_swap_operations":{
      "operations":[
         {
            "orai_swap":{
               "offer_asset_info":{
                  "token":{
                     "contract_addr":"orai1avryzxnsn2denq7p2d7ukm6nkck9s0rz2llgnc"
                  }
               },
               "ask_asset_info":{
                  "native_token":{
                     "denom":"orai"
                  }
               }
            }
         },
         {
            "orai_swap":{
               "offer_asset_info":{
                  "native_token":{
                     "denom":"orai"
                  }
               },
               "ask_asset_info":{
                  "token":{
                     "contract_addr":"orai1avryzxnsn2denq7p2d7ukm6nkck9s0rz2llgnc"
                  }
               }
            }
         }
      ],
      "minimum_receive":"88000"
   }
}