loom_defi_abi/curve/
pools.rs

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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
use alloy_sol_macro::sol;

sol! {
    #[sol(abi = true, rpc)]
    #[derive(Debug, PartialEq, Eq)]
    interface ICurveI128_2 {
            function get_dy(int128,int128,uint256) external view returns (uint256);
            function calc_withdraw_one_coin(uint256,int128) external view returns (uint256);
            function calc_token_amount(uint256[2],bool) external view returns (uint256);
            function exchange(int128,int128,uint256,uint256) external;
            function remove_liquidity_one_coin(uint256,int128,uint256) external;
            function add_liquidity(uint256[2],uint256) external;
    }

}

sol! {
    #[sol(abi = true, rpc)]
    #[derive(Debug, PartialEq, Eq)]
    interface ICurveI128_2_To_Meta {
            function get_dy(int128,int128,uint256) external view returns (uint256);
            function get_dy_underlying(int128,int128,uint256) external view returns (uint256);
            function calc_withdraw_one_coin(uint256,int128) external view returns (uint256);
            function calc_token_amount(uint256[2],bool) external view returns (uint256);
            function exchange(int128,int128,uint256,uint256,address) external;
            function exchange_underlying(int128,int128,uint256,uint256,address) external;
            function remove_liquidity_one_coin(uint256,int128,uint256) external;
            function add_liquidity(uint256[2],uint256) external;
    }
}

sol! {
    #[sol(abi = true, rpc)]
    #[derive(Debug, PartialEq, Eq)]
    interface ICurveI128_2_To {
            function get_dy(int128,int128,uint256) external view returns (uint256);
            function get_dx(int128,int128,uint256) external view returns (uint256);
            function calc_withdraw_one_coin(uint256,int128) external view returns (uint256);
            function calc_token_amount(uint256[2],bool) external view returns (uint256);
            function exchange(int128,int128,uint256,uint256,address) external;
            function remove_liquidity_one_coin(uint256,int128,uint256) external;
            function add_liquidity(uint256[2],uint256) external;
    }
}

sol! {
    #[sol(abi = true, rpc)]
    #[derive(Debug, PartialEq, Eq)]
    interface ICurveI128_3 {
        function get_dy(int128,int128,uint256) external view returns (uint256);
        function calc_withdraw_one_coin(uint256,int128) external view returns (uint256);
        function calc_token_amount(uint256[3],bool) external view returns (uint256);
        function exchange(int128,int128,uint256,uint256) external;
        function remove_liquidity_one_coin(uint256,int128,uint256) external;
        function add_liquidity(uint256[3],uint256) external;
    }
}

sol! {
    #[sol(abi = true, rpc)]
    #[derive(Debug, PartialEq, Eq)]
    interface ICurveI128_4 {
        function get_dy(int128,int128,uint256) external view returns (uint256);
        function calc_token_amount(uint256[4],bool) external view returns (uint256);
        function exchange(int128,int128,uint256,uint256) external;
        function add_liquidity(uint256[4],uint256) external;
    }
}

sol! {
    #[sol(abi = true, rpc)]
    #[derive(Debug, PartialEq, Eq)]
    interface ICurveU256_2_To{
        function get_dy(uint256,uint256,uint256) external view returns (uint256);
        function calc_withdraw_one_coin(uint256,int128) external view returns (uint256);
        function calc_token_amount(uint256[2],bool) external view returns (uint256);
        function exchange(uint256,uint256,uint256,uint256,address) external;
        function remove_liquidity_one_coin(uint256,uint128,uint256) external;
        function add_liquidity(uint256[2],uint256) external;
    }
}

sol! {
    #[sol(abi = true, rpc)]
    #[derive(Debug, PartialEq, Eq)]
    interface ICurveU256_2{
        function get_dy(uint256,uint256,uint256) external view returns (uint256);
        function calc_withdraw_one_coin(uint256,uint256) external view returns (uint256);
        function calc_token_amount(uint256[2]) external view returns (uint256);
        function exchange(uint256,uint256,uint256,uint256) external;
        function remove_liquidity_one_coin(uint256,uint256,uint256) external;
        function add_liquidity(uint256[2],uint256) external;
    }
}

sol! {
    #[sol(abi = true, rpc)]
    #[derive(Debug, PartialEq, Eq)]
    interface ICurveU256_2_Eth_To {
        function get_dy(uint256,uint256,uint256) external view returns (uint256);
        function get_dx(uint256,uint256,uint256) external view returns (uint256);
        function calc_withdraw_one_coin(uint256,int128) external view returns (uint256);
        function calc_token_amount(uint256[2],bool) external view returns (uint256);
        function exchange(uint256,uint256,uint256,uint256,bool,address) external;
        function remove_liquidity_one_coin(uint256,uint128,uint256) external;
        function add_liquidity(uint256[2],uint256) external;
    }
}

sol! {
    #[sol(abi = true, rpc)]
    #[derive(Debug, PartialEq, Eq)]
    interface ICurveU256_3_Eth{
        function get_dy(uint256,uint256,uint256) external view returns (uint256);
        function calc_withdraw_one_coin(uint256,uint256) external view returns (uint256);
        function calc_token_amount(uint256[3],bool) external view returns (uint256);
        function exchange(uint256,uint256,uint256,uint256,bool) external;
        function remove_liquidity_one_coin(uint256,uint256,uint256) external;
        function add_liquidity(uint256[3],uint256) external;
    }
}

sol! {
    #[sol(abi = true, rpc)]
    #[derive(Debug, PartialEq, Eq)]
    interface ICurveU256_3_Eth_To{
        function get_dy(uint256,uint256,uint256) external view returns (uint256);
        function get_dx(uint256,uint256,uint256) external view returns (uint256);
        function calc_token_amount(uint256[3],bool) external view returns (uint256);
        function calc_withdraw_one_coin(uint256,int128) external  view returns (uint256);
        function exchange(uint256,uint256,uint256,uint256,bool,address) external;
        function remove_liquidity_one_coin(uint256,uint256,uint256) external;
        function add_liquidity(uint256[3],uint256) external;
    }
}

sol! {
    #[sol(abi = true, rpc)]
    #[derive(Debug, PartialEq, Eq)]
    interface ICurveU256_3_Eth_To2 {
        function get_dy(uint256,uint256,uint256) external view returns (uint256);
        function get_dx(uint256,uint256,uint256) external view returns (uint256);
        function calc_token_amount(uint256[3], bool) external view returns (uint256);
        function calc_withdraw_one_coin(uint256,uint256) external  view returns (uint256);
        function exchange(uint256,uint256,uint256,uint256,bool,address) external;
        function remove_liquidity_one_coin(uint256,uint256,uint256) external;
        function add_liquidity(uint256[3],uint256) external;
    }
}