Skip to content
This repository has been archived by the owner on Oct 14, 2022. It is now read-only.

Latest commit

 

History

History

terraswap_factory

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

TerraSwap Factory

The factory contract can create instances of the Terraswap Pair contract. It is also used as a directory contract for all pools ever created.

The Factory is permissioned.

InstantiateMsg

{
  "pair_code_id": 123,
  "token_code_id": 123,
  "fee_collector_addr": "juno1..."
}

ExecuteMsg

update_config

{
  "update_config": {
    "owner": "juno1...",
    "fee_collector_addr": "juno1...",
    "token_id": 123,
    "pair_code_id": 123
  }
}

create_pair

{
  "create_pair": {
    "asset_infos": [
      {
        "token": {
          "contract_addr": "juno1..."
        }
      },
      {
        "native_token": {
          "denom": "ujuno"
        }
      }
    ]
  }
}

add_native_token_decimals

{
  "add_native_token_decimals": {
    "denom": "ujuno",
    "decimals": 6
  }
}

QueryMsg

config

{
  "config": {}
}

pair

{
  "pair": {
    "asset_infos": [
      {
        "token": {
          "contract_addr": "juno1..."
        }
      },
      {
        "native_token": {
          "denom": "ujuno"
        }
      }
    ]
  }
}

pairs

{
  "pairs": {
    "start_after": [
      {
        "token": {
          "contract_addr": "juno1..."
        }
      },
      {
        "native_token": {
          "denom": "ujuno"
        }
      }
    ],
    "limit": 30
  }
}

native_token_decimals

{
  "native_token_decimals": {
    "denom": "ujuno"
  }
}