Module brontes_classifier::CurveBase4

source ·
Expand description

Generated by the following Solidity interface…

interface CurveBase4 {
    event AddLiquidity(address indexed provider, uint256[4] token_amounts, uint256[4] fees, uint256 invariant, uint256 token_supply);
    event CommitNewAdmin(uint256 indexed deadline, address indexed admin);
    event CommitNewParameters(uint256 indexed deadline, uint256 A, uint256 fee, uint256 admin_fee);
    event NewAdmin(address indexed admin);
    event NewParameters(uint256 A, uint256 fee, uint256 admin_fee);
    event RemoveLiquidity(address indexed provider, uint256[4] token_amounts, uint256[4] fees, uint256 token_supply);
    event RemoveLiquidityImbalance(address indexed provider, uint256[4] token_amounts, uint256[4] fees, uint256 invariant, uint256 token_supply);
    event TokenExchange(address indexed buyer, int128 sold_id, uint256 tokens_sold, int128 bought_id, uint256 tokens_bought);
    event TokenExchangeUnderlying(address indexed buyer, int128 sold_id, uint256 tokens_sold, int128 bought_id, uint256 tokens_bought);

    constructor(address[4] _coins, address[4] _underlying_coins, address _pool_token, uint256 _A, uint256 _fee);

    function A() external view returns (uint256 out);
    function add_liquidity(uint256[4] memory amounts, uint256 min_mint_amount) external;
    function admin_actions_deadline() external view returns (uint256 out);
    function admin_fee() external view returns (uint256 out);
    function apply_new_parameters() external;
    function apply_transfer_ownership() external;
    function balances(int128 arg0) external view returns (uint256 out);
    function calc_token_amount(uint256[4] memory amounts, bool deposit) external view returns (uint256 out);
    function coins(int128 arg0) external view returns (address out);
    function commit_new_parameters(uint256 amplification, uint256 new_fee, uint256 new_admin_fee) external;
    function commit_transfer_ownership(address _owner) external;
    function exchange(int128 i, int128 j, uint256 dx, uint256 min_dy) external;
    function exchange_underlying(int128 i, int128 j, uint256 dx, uint256 min_dy) external;
    function fee() external view returns (uint256 out);
    function future_A() external view returns (uint256 out);
    function future_admin_fee() external view returns (uint256 out);
    function future_fee() external view returns (uint256 out);
    function future_owner() external view returns (address out);
    function get_dx(int128 i, int128 j, uint256 dy) external view returns (uint256 out);
    function get_dx_underlying(int128 i, int128 j, uint256 dy) external view returns (uint256 out);
    function get_dy(int128 i, int128 j, uint256 dx) external view returns (uint256 out);
    function get_dy_underlying(int128 i, int128 j, uint256 dx) external view returns (uint256 out);
    function get_virtual_price() external view returns (uint256 out);
    function kill_me() external;
    function owner() external view returns (address out);
    function remove_liquidity(uint256 _amount, uint256[4] memory min_amounts) external;
    function remove_liquidity_imbalance(uint256[4] memory amounts, uint256 max_burn_amount) external;
    function revert_new_parameters() external;
    function revert_transfer_ownership() external;
    function transfer_ownership_deadline() external view returns (uint256 out);
    function underlying_coins(int128 arg0) external view returns (address out);
    function unkill_me() external;
    function withdraw_admin_fees() external;
}

…which was generated by the following JSON ABI:

[
  {
    "type": "constructor",
    "inputs": [
      {
        "name": "_coins",
        "type": "address[4]"
      },
      {
        "name": "_underlying_coins",
        "type": "address[4]"
      },
      {
        "name": "_pool_token",
        "type": "address"
      },
      {
        "name": "_A",
        "type": "uint256"
      },
      {
        "name": "_fee",
        "type": "uint256"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "A",
    "inputs": [],
    "outputs": [
      {
        "name": "out",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "add_liquidity",
    "inputs": [
      {
        "name": "amounts",
        "type": "uint256[4]"
      },
      {
        "name": "min_mint_amount",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "admin_actions_deadline",
    "inputs": [],
    "outputs": [
      {
        "name": "out",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "admin_fee",
    "inputs": [],
    "outputs": [
      {
        "name": "out",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "apply_new_parameters",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "apply_transfer_ownership",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "balances",
    "inputs": [
      {
        "name": "arg0",
        "type": "int128"
      }
    ],
    "outputs": [
      {
        "name": "out",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "calc_token_amount",
    "inputs": [
      {
        "name": "amounts",
        "type": "uint256[4]"
      },
      {
        "name": "deposit",
        "type": "bool"
      }
    ],
    "outputs": [
      {
        "name": "out",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "coins",
    "inputs": [
      {
        "name": "arg0",
        "type": "int128"
      }
    ],
    "outputs": [
      {
        "name": "out",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "commit_new_parameters",
    "inputs": [
      {
        "name": "amplification",
        "type": "uint256"
      },
      {
        "name": "new_fee",
        "type": "uint256"
      },
      {
        "name": "new_admin_fee",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "commit_transfer_ownership",
    "inputs": [
      {
        "name": "_owner",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "exchange",
    "inputs": [
      {
        "name": "i",
        "type": "int128"
      },
      {
        "name": "j",
        "type": "int128"
      },
      {
        "name": "dx",
        "type": "uint256"
      },
      {
        "name": "min_dy",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "exchange_underlying",
    "inputs": [
      {
        "name": "i",
        "type": "int128"
      },
      {
        "name": "j",
        "type": "int128"
      },
      {
        "name": "dx",
        "type": "uint256"
      },
      {
        "name": "min_dy",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "fee",
    "inputs": [],
    "outputs": [
      {
        "name": "out",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "future_A",
    "inputs": [],
    "outputs": [
      {
        "name": "out",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "future_admin_fee",
    "inputs": [],
    "outputs": [
      {
        "name": "out",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "future_fee",
    "inputs": [],
    "outputs": [
      {
        "name": "out",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "future_owner",
    "inputs": [],
    "outputs": [
      {
        "name": "out",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "get_dx",
    "inputs": [
      {
        "name": "i",
        "type": "int128"
      },
      {
        "name": "j",
        "type": "int128"
      },
      {
        "name": "dy",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "out",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "get_dx_underlying",
    "inputs": [
      {
        "name": "i",
        "type": "int128"
      },
      {
        "name": "j",
        "type": "int128"
      },
      {
        "name": "dy",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "out",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "get_dy",
    "inputs": [
      {
        "name": "i",
        "type": "int128"
      },
      {
        "name": "j",
        "type": "int128"
      },
      {
        "name": "dx",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "out",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "get_dy_underlying",
    "inputs": [
      {
        "name": "i",
        "type": "int128"
      },
      {
        "name": "j",
        "type": "int128"
      },
      {
        "name": "dx",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "out",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "get_virtual_price",
    "inputs": [],
    "outputs": [
      {
        "name": "out",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "kill_me",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "owner",
    "inputs": [],
    "outputs": [
      {
        "name": "out",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "remove_liquidity",
    "inputs": [
      {
        "name": "_amount",
        "type": "uint256"
      },
      {
        "name": "min_amounts",
        "type": "uint256[4]"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "remove_liquidity_imbalance",
    "inputs": [
      {
        "name": "amounts",
        "type": "uint256[4]"
      },
      {
        "name": "max_burn_amount",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "revert_new_parameters",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "revert_transfer_ownership",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "transfer_ownership_deadline",
    "inputs": [],
    "outputs": [
      {
        "name": "out",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "underlying_coins",
    "inputs": [
      {
        "name": "arg0",
        "type": "int128"
      }
    ],
    "outputs": [
      {
        "name": "out",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "unkill_me",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "withdraw_admin_fees",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "event",
    "name": "AddLiquidity",
    "inputs": [
      {
        "name": "provider",
        "type": "address",
        "indexed": true
      },
      {
        "name": "token_amounts",
        "type": "uint256[4]",
        "indexed": false
      },
      {
        "name": "fees",
        "type": "uint256[4]",
        "indexed": false
      },
      {
        "name": "invariant",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "token_supply",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "CommitNewAdmin",
    "inputs": [
      {
        "name": "deadline",
        "type": "uint256",
        "indexed": true
      },
      {
        "name": "admin",
        "type": "address",
        "indexed": true
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "CommitNewParameters",
    "inputs": [
      {
        "name": "deadline",
        "type": "uint256",
        "indexed": true
      },
      {
        "name": "A",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "fee",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "admin_fee",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "NewAdmin",
    "inputs": [
      {
        "name": "admin",
        "type": "address",
        "indexed": true
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "NewParameters",
    "inputs": [
      {
        "name": "A",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "fee",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "admin_fee",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "RemoveLiquidity",
    "inputs": [
      {
        "name": "provider",
        "type": "address",
        "indexed": true
      },
      {
        "name": "token_amounts",
        "type": "uint256[4]",
        "indexed": false
      },
      {
        "name": "fees",
        "type": "uint256[4]",
        "indexed": false
      },
      {
        "name": "token_supply",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "RemoveLiquidityImbalance",
    "inputs": [
      {
        "name": "provider",
        "type": "address",
        "indexed": true
      },
      {
        "name": "token_amounts",
        "type": "uint256[4]",
        "indexed": false
      },
      {
        "name": "fees",
        "type": "uint256[4]",
        "indexed": false
      },
      {
        "name": "invariant",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "token_supply",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "TokenExchange",
    "inputs": [
      {
        "name": "buyer",
        "type": "address",
        "indexed": true
      },
      {
        "name": "sold_id",
        "type": "int128",
        "indexed": false
      },
      {
        "name": "tokens_sold",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "bought_id",
        "type": "int128",
        "indexed": false
      },
      {
        "name": "tokens_bought",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "TokenExchangeUnderlying",
    "inputs": [
      {
        "name": "buyer",
        "type": "address",
        "indexed": true
      },
      {
        "name": "sold_id",
        "type": "int128",
        "indexed": false
      },
      {
        "name": "tokens_sold",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "bought_id",
        "type": "int128",
        "indexed": false
      },
      {
        "name": "tokens_bought",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  }
]

Structs§

Enums§