Page cover image

๐Ÿ”นFactory

The factory contract registers a pair between two tokens. It uses the pre-stored pair contract binary and instantiates it so that users do not need to execute a pair contract by themselves.

Transaction

Create pair

Instantiate a pair from uploaded WASM binary. Please check this document for detailed usage.

{
  "create_pair": {
    "assets": [
      {
        "info": {
          "token": {
            "contract_addr": "inj..."
          }
        },
        "amount": "0"
      },
      {
        "info": {
          "native_token": {
            "denom": "inj"
          }
        },
        "amount": "0"
      }
    ]
  }
}

Query

Config

{
    "config": {}
}

Pair

{
    "pair": {
        "asset_infos": [
            {
                "token": {
                    "contract_addr": "<Addr>"
                }
            },
            {
                "native_token": {
                    "denom": "inj"
                }
            }
        ]
    }
}

Pairs

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

Native Token Decimals

{
    "native_token_decimals": {
        "denom": "inj"
    }
}

Last updated