-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathCwTokenSwap.ts
64 lines (63 loc) · 1.09 KB
/
CwTokenSwap.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import { Addr, Binary, Uint128 } from './common'
export type TokenInfo =
| {
native: {
amount: Uint128
denom: string
}
}
| {
cw20: {
amount: Uint128
contract_addr: string
}
}
export interface InstantiateMsg {
counterparty_one: Counterparty
counterparty_two: Counterparty
}
export interface Counterparty {
address: string
promise: TokenInfo
}
export type ExecuteMsg =
| {
receive: Cw20ReceiveMsg
}
| {
fund: {}
}
| {
withdraw: {}
}
export interface Cw20ReceiveMsg {
amount: Uint128
msg: Binary
sender: string
}
export type QueryMsg = {
status: {}
}
export interface MigrateMsg {}
export type CheckedTokenInfo =
| {
native: {
amount: Uint128
denom: string
}
}
| {
cw20: {
amount: Uint128
contract_addr: Addr
}
}
export interface StatusResponse {
counterparty_one: CheckedCounterparty
counterparty_two: CheckedCounterparty
}
export interface CheckedCounterparty {
address: Addr
promise: CheckedTokenInfo
provided: boolean
}