SecretSwap
Search…
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 the pair contract additionally.

Transaction

Create pair

Instantiate pair from uploaded WASM binary.
1
{
2
"pair_code_id": 1,
3
"pair_code_hash": "<HASH>",
4
"token_code_id": 2,
5
"token_code_hash": "<HASH>",
6
"init_hook": {
7
"msg": "<base64_encoded_json_string>",
8
"contract_addr": "secret...",
9
"code_hash": "<HASH>"
10
}
11
}
Copied!

Query

Config

1
{
2
"config": {}
3
}
Copied!

Pair

1
{
2
"pair": {
3
"asset_infos": [
4
{
5
"token": {
6
"contract_addr": "<HumanAddr>",
7
"token_code_hash": "<HASH>",
8
"viewing_key": "..."
9
}
10
},
11
{
12
"native_token": {
13
"denom": "uscrt"
14
}
15
}
16
]
17
}
18
}
19
Copied!

Pairs

1
{
2
"pairs": {
3
"start_after": [
4
//optional
5
{
6
"token": {
7
"contract_addr": "<HumanAddr>"
8
}
9
},
10
{
11
"native_token": {
12
"denom": "uscrt"
13
}
14
}
15
],
16
"limit": 10 //optional, default=10, max=30
17
}
18
}
Copied!
Last modified 6mo ago