Factory

Factory #

This contract registers the relation between your token and others.
It uses the pre-stored pair contract binary and instantiate it. So, you don’t have to execute pair contract additionally.

Transaction #

Create pair #

Instantiate pair from uploaded WASM binary. Please check this document in detail usage.

{
  "pair_code_id": "1",
  "token_code_id": "2",
  "init_hook": {
    "msg": "<base64_encoded_json_string>",
    "contract_addr": "<HumanAddr>"
  }
}

Query #

Config #

{
    "config": {}
}

Pair #

{
    "pair": {
        "asset_infos": [
            {
                "token": {
                    "contract_addr": "<HumanAddr>"
                }
            },
            {
                "native_token": {
                    "denom": "uluna"
                }
            }
        ]
    }
}

Pairs #

{
    "pairs": {
        "start_after": [ //optional
            {
                "token": {
                    "contract_addr": "<HumanAddr>"
                }
            },
            {
                "native_token": {
                    "denom": "uluna"
                }
            }
        ],
        "limit": 10 //optional, default=10, max=30
    }
}