[
    {
        "type": "event",
        "name": "TokenExchange",
        "inputs": [
            {
                "type": "address",
                "name": "buyer",
                "indexed": true
            },
            {
                "type": "uint256",
                "name": "sold_id",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "tokens_sold",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "bought_id",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "tokens_bought",
                "indexed": false
            }
        ],
        "anonymous": false
    },
    {
        "type": "event",
        "name": "AddLiquidity",
        "inputs": [
            {
                "type": "address",
                "name": "provider",
                "indexed": true
            },
            {
                "type": "uint256[3]",
                "name": "token_amounts",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "fee",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "token_supply",
                "indexed": false
            }
        ],
        "anonymous": false
    },
    {
        "type": "event",
        "name": "RemoveLiquidity",
        "inputs": [
            {
                "type": "address",
                "name": "provider",
                "indexed": true
            },
            {
                "type": "uint256[3]",
                "name": "token_amounts",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "token_supply",
                "indexed": false
            }
        ],
        "anonymous": false
    },
    {
        "type": "event",
        "name": "RemoveLiquidityOne",
        "inputs": [
            {
                "type": "address",
                "name": "provider",
                "indexed": true
            },
            {
                "type": "uint256",
                "name": "token_amount",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "coin_index",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "coin_amount",
                "indexed": false
            }
        ],
        "anonymous": false
    },
    {
        "type": "event",
        "name": "CommitNewAdmin",
        "inputs": [
            {
                "type": "uint256",
                "name": "deadline",
                "indexed": true
            },
            {
                "type": "address",
                "name": "admin",
                "indexed": true
            }
        ],
        "anonymous": false
    },
    {
        "type": "event",
        "name": "NewAdmin",
        "inputs": [
            {
                "type": "address",
                "name": "admin",
                "indexed": true
            }
        ],
        "anonymous": false
    },
    {
        "type": "event",
        "name": "CommitNewParameters",
        "inputs": [
            {
                "type": "uint256",
                "name": "deadline",
                "indexed": true
            },
            {
                "type": "uint256",
                "name": "admin_fee",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "mid_fee",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "out_fee",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "fee_gamma",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "allowed_extra_profit",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "adjustment_step",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "ma_half_time",
                "indexed": false
            }
        ],
        "anonymous": false
    },
    {
        "type": "event",
        "name": "NewParameters",
        "inputs": [
            {
                "type": "uint256",
                "name": "admin_fee",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "mid_fee",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "out_fee",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "fee_gamma",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "allowed_extra_profit",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "adjustment_step",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "ma_half_time",
                "indexed": false
            }
        ],
        "anonymous": false
    },
    {
        "type": "event",
        "name": "RampAgamma",
        "inputs": [
            {
                "type": "uint256",
                "name": "initial_A",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "future_A",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "initial_gamma",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "future_gamma",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "initial_time",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "future_time",
                "indexed": false
            }
        ],
        "anonymous": false
    },
    {
        "type": "event",
        "name": "StopRampA",
        "inputs": [
            {
                "type": "uint256",
                "name": "current_A",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "current_gamma",
                "indexed": false
            },
            {
                "type": "uint256",
                "name": "time",
                "indexed": false
            }
        ],
        "anonymous": false
    },
    {
        "type": "event",
        "name": "ClaimAdminFee",
        "inputs": [
            {
                "type": "address",
                "name": "admin",
                "indexed": true
            },
            {
                "type": "uint256",
                "name": "tokens",
                "indexed": false
            }
        ],
        "anonymous": false
    },
    {
        "type": "constructor",
        "stateMutability": "nonpayable",
        "outputs": [],
        "inputs": [
            {
                "type": "address",
                "name": "owner"
            },
            {
                "type": "address",
                "name": "admin_fee_receiver"
            },
            {
                "type": "uint256",
                "name": "A"
            },
            {
                "type": "uint256",
                "name": "gamma"
            },
            {
                "type": "uint256",
                "name": "mid_fee"
            },
            {
                "type": "uint256",
                "name": "out_fee"
            },
            {
                "type": "uint256",
                "name": "allowed_extra_profit"
            },
            {
                "type": "uint256",
                "name": "fee_gamma"
            },
            {
                "type": "uint256",
                "name": "adjustment_step"
            },
            {
                "type": "uint256",
                "name": "admin_fee"
            },
            {
                "type": "uint256",
                "name": "ma_half_time"
            },
            {
                "type": "uint256[2]",
                "name": "initial_prices"
            }
        ]
    },
    {
        "type": "fallback",
        "stateMutability": "payable"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "price_oracle",
        "inputs": [
            {
                "type": "uint256",
                "name": "k"
            }
        ],
        "gas": "3189"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "price_scale",
        "inputs": [
            {
                "type": "uint256",
                "name": "k"
            }
        ],
        "gas": "3219"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "last_prices",
        "inputs": [
            {
                "type": "uint256",
                "name": "k"
            }
        ],
        "gas": "3249"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "address",
                "name": ""
            }
        ],
        "name": "token",
        "inputs": [],
        "gas": "540"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "address",
                "name": ""
            }
        ],
        "name": "coins",
        "inputs": [
            {
                "type": "uint256",
                "name": "i"
            }
        ],
        "gas": "684"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "A",
        "inputs": [],
        "gas": "703"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "gamma",
        "inputs": [],
        "gas": "11360"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "fee",
        "inputs": [],
        "gas": "21008"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "fee_calc",
        "inputs": [
            {
                "type": "uint256[3]",
                "name": "xp"
            }
        ],
        "gas": "10799"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "get_virtual_price",
        "inputs": [],
        "gas": "11241"
    },
    {
        "type": "function",
        "stateMutability": "payable",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "exchange",
        "inputs": [
            {
                "type": "uint256",
                "name": "i"
            },
            {
                "type": "uint256",
                "name": "j"
            },
            {
                "type": "uint256",
                "name": "dx"
            },
            {
                "type": "uint256",
                "name": "min_dy"
            },
            {
                "type": "bool",
                "name": "use_eth"
            }
        ],
        "gas": "775369"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "get_dy",
        "inputs": [
            {
                "type": "uint256",
                "name": "i"
            },
            {
                "type": "uint256",
                "name": "j"
            },
            {
                "type": "uint256",
                "name": "dx"
            }
        ],
        "gas": "3208"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "calc_token_fee",
        "inputs": [
            {
                "type": "uint256[3]",
                "name": "amounts"
            },
            {
                "type": "uint256[3]",
                "name": "xp"
            }
        ],
        "gas": "15069"
    },
    {
        "type": "function",
        "stateMutability": "nonpayable",
        "outputs": [],
        "name": "add_liquidity",
        "inputs": [
            {
                "type": "uint256[3]",
                "name": "amounts"
            },
            {
                "type": "uint256",
                "name": "min_mint_amount"
            }
        ],
        "gas": "726697"
    },
    {
        "type": "function",
        "stateMutability": "nonpayable",
        "outputs": [],
        "name": "remove_liquidity",
        "inputs": [
            {
                "type": "uint256",
                "name": "_amount"
            },
            {
                "type": "uint256[3]",
                "name": "min_amounts"
            }
        ],
        "gas": "233147"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "calc_token_amount",
        "inputs": [
            {
                "type": "uint256[3]",
                "name": "amounts"
            },
            {
                "type": "bool",
                "name": "deposit"
            }
        ],
        "gas": "3524"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "calc_withdraw_one_coin",
        "inputs": [
            {
                "type": "uint256",
                "name": "token_amount"
            },
            {
                "type": "uint256",
                "name": "i"
            }
        ],
        "gas": "12128"
    },
    {
        "type": "function",
        "stateMutability": "nonpayable",
        "outputs": [],
        "name": "remove_liquidity_one_coin",
        "inputs": [
            {
                "type": "uint256",
                "name": "token_amount"
            },
            {
                "type": "uint256",
                "name": "i"
            },
            {
                "type": "uint256",
                "name": "min_amount"
            }
        ],
        "gas": "637383"
    },
    {
        "type": "function",
        "stateMutability": "nonpayable",
        "outputs": [],
        "name": "claim_admin_fees",
        "inputs": [],
        "gas": "360524"
    },
    {
        "type": "function",
        "stateMutability": "nonpayable",
        "outputs": [],
        "name": "ramp_A_gamma",
        "inputs": [
            {
                "type": "uint256",
                "name": "future_A"
            },
            {
                "type": "uint256",
                "name": "future_gamma"
            },
            {
                "type": "uint256",
                "name": "future_time"
            }
        ],
        "gas": "161064"
    },
    {
        "type": "function",
        "stateMutability": "nonpayable",
        "outputs": [],
        "name": "stop_ramp_A_gamma",
        "inputs": [],
        "gas": "156373"
    },
    {
        "type": "function",
        "stateMutability": "nonpayable",
        "outputs": [],
        "name": "commit_new_parameters",
        "inputs": [
            {
                "type": "uint256",
                "name": "_new_mid_fee"
            },
            {
                "type": "uint256",
                "name": "_new_out_fee"
            },
            {
                "type": "uint256",
                "name": "_new_admin_fee"
            },
            {
                "type": "uint256",
                "name": "_new_fee_gamma"
            },
            {
                "type": "uint256",
                "name": "_new_allowed_extra_profit"
            },
            {
                "type": "uint256",
                "name": "_new_adjustment_step"
            },
            {
                "type": "uint256",
                "name": "_new_ma_half_time"
            }
        ],
        "gas": "305138"
    },
    {
        "type": "function",
        "stateMutability": "nonpayable",
        "outputs": [],
        "name": "apply_new_parameters",
        "inputs": [],
        "gas": "652722"
    },
    {
        "type": "function",
        "stateMutability": "nonpayable",
        "outputs": [],
        "name": "revert_new_parameters",
        "inputs": [],
        "gas": "23231"
    },
    {
        "type": "function",
        "stateMutability": "nonpayable",
        "outputs": [],
        "name": "commit_transfer_ownership",
        "inputs": [
            {
                "type": "address",
                "name": "_owner"
            }
        ],
        "gas": "78866"
    },
    {
        "type": "function",
        "stateMutability": "nonpayable",
        "outputs": [],
        "name": "apply_transfer_ownership",
        "inputs": [],
        "gas": "67134"
    },
    {
        "type": "function",
        "stateMutability": "nonpayable",
        "outputs": [],
        "name": "revert_transfer_ownership",
        "inputs": [],
        "gas": "23321"
    },
    {
        "type": "function",
        "stateMutability": "nonpayable",
        "outputs": [],
        "name": "kill_me",
        "inputs": [],
        "gas": "40544"
    },
    {
        "type": "function",
        "stateMutability": "nonpayable",
        "outputs": [],
        "name": "unkill_me",
        "inputs": [],
        "gas": "23381"
    },
    {
        "type": "function",
        "stateMutability": "nonpayable",
        "outputs": [],
        "name": "set_admin_fee_receiver",
        "inputs": [
            {
                "type": "address",
                "name": "_admin_fee_receiver"
            }
        ],
        "gas": "38565"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "last_prices_timestamp",
        "inputs": [],
        "gas": "3450"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "initial_A_gamma",
        "inputs": [],
        "gas": "3480"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "future_A_gamma",
        "inputs": [],
        "gas": "3510"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "initial_A_gamma_time",
        "inputs": [],
        "gas": "3540"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "future_A_gamma_time",
        "inputs": [],
        "gas": "3570"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "allowed_extra_profit",
        "inputs": [],
        "gas": "3600"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "future_allowed_extra_profit",
        "inputs": [],
        "gas": "3630"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "fee_gamma",
        "inputs": [],
        "gas": "3660"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "future_fee_gamma",
        "inputs": [],
        "gas": "3690"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "adjustment_step",
        "inputs": [],
        "gas": "3720"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "future_adjustment_step",
        "inputs": [],
        "gas": "3750"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "ma_half_time",
        "inputs": [],
        "gas": "3780"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "future_ma_half_time",
        "inputs": [],
        "gas": "3810"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "mid_fee",
        "inputs": [],
        "gas": "3840"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "out_fee",
        "inputs": [],
        "gas": "3870"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "admin_fee",
        "inputs": [],
        "gas": "3900"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "future_mid_fee",
        "inputs": [],
        "gas": "3930"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "future_out_fee",
        "inputs": [],
        "gas": "3960"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "future_admin_fee",
        "inputs": [],
        "gas": "3990"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "balances",
        "inputs": [
            {
                "type": "uint256",
                "name": "arg0"
            }
        ],
        "gas": "4065"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "D",
        "inputs": [],
        "gas": "4050"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "address",
                "name": ""
            }
        ],
        "name": "owner",
        "inputs": [],
        "gas": "4080"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "address",
                "name": ""
            }
        ],
        "name": "future_owner",
        "inputs": [],
        "gas": "4110"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "xcp_profit",
        "inputs": [],
        "gas": "4140"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "xcp_profit_a",
        "inputs": [],
        "gas": "4170"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "virtual_price",
        "inputs": [],
        "gas": "4200"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "bool",
                "name": ""
            }
        ],
        "name": "is_killed",
        "inputs": [],
        "gas": "4230"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "kill_deadline",
        "inputs": [],
        "gas": "4260"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "transfer_ownership_deadline",
        "inputs": [],
        "gas": "4290"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "uint256",
                "name": ""
            }
        ],
        "name": "admin_actions_deadline",
        "inputs": [],
        "gas": "4320"
    },
    {
        "type": "function",
        "stateMutability": "view",
        "outputs": [
            {
                "type": "address",
                "name": ""
            }
        ],
        "name": "admin_fee_receiver",
        "inputs": [],
        "gas": "4350"
    }
]
