Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Overview
Max Total Supply
10,283,950,520,713,608,840
Holders
108
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 0 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Minimal Proxy Contract for 0xee8ac082aeb41b0f5a41aae8c4110744d4e3b45a
Contract Name:
BPool
Compiler Version
v0.5.7+commit.6da8b019
Optimization Enabled:
Yes with 200 runs
Other Settings:
byzantium EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526pragma solidity ^0.5.7;// Copyright BigchainDB GmbH and Ocean Protocol contributors// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)// Code is Apache-2.0 and docs are CC-BY-4.0import './BToken.sol';import './BMath.sol';/*** @title BPool** @dev Used by the (Ocean version) BFactory contract as a bytecode reference to* deploy new BPools.** This contract is is nearly identical to the BPool.sol contract at [1]* The only difference is the "Proxy contract functionality" section* given below. We'd inherit from BPool if we could, for simplicity.* But we can't, because the proxy section needs to access private* variables declared in BPool, and Solidity disallows this. Therefore* the best we can do for now is clearly demarcate the proxy section.** [1] https://github.com/balancer-labs/balancer-core/contracts/.*/contract BPool is BToken, BMath {struct Record {
1234567891011121314151617181920212223242526// This program is free software: you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation, either version 3 of the License, or// (at your option) any later version.// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.// You should have received a copy of the GNU General Public License// along with this program. If not, see <http://www.gnu.org/licenses/>.pragma solidity 0.5.7;contract BConst {uint public constant BONE = 10**18;uint public constant MIN_BOUND_TOKENS = 2;uint public constant MAX_BOUND_TOKENS = 8;uint public constant MIN_FEE = BONE / 10**6;uint public constant MAX_FEE = BONE / 10;uint public constant EXIT_FEE = 0;uint public constant MIN_WEIGHT = BONE;
1234567891011121314151617181920212223242526// This program is free software: you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation, either version 3 of the License, or// (at your option) any later version.// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.// You should have received a copy of the GNU General Public License// along with this program. If not, see <http://www.gnu.org/licenses/>.pragma solidity 0.5.7;import './BNum.sol';contract BMath is BConst, BNum {/**********************************************************************************************// calcSpotPrice //// sP = spotPrice //// bI = tokenBalanceIn ( bI / wI ) 1 //// bO = tokenBalanceOut sP = ----------- * ---------- //// wI = tokenWeightIn ( bO / wO ) ( 1 - sF ) //// wO = tokenWeightOut //// sF = swapFee //
1234567891011121314151617181920212223242526// This program is free software: you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation, either version 3 of the License, or// (at your option) any later version.// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.// You should have received a copy of the GNU General Public License// along with this program. If not, see <http://www.gnu.org/licenses/>.pragma solidity 0.5.7;import './BConst.sol';contract BNum is BConst {function btoi(uint a)internal purereturns (uint){return a / BONE;}
1234567891011121314151617181920212223242526// This program is free software: you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation, either version 3 of the License, or// (at your option) any later version.// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.// You should have received a copy of the GNU General Public License// along with this program. If not, see <http://www.gnu.org/licenses/>.pragma solidity 0.5.7;import './BNum.sol';import 'openzeppelin-solidity/contracts/token/ERC20/IERC20.sol';// Highly opinionated token implementation// interface IERC20 {// event Approval(address indexed src, address indexed dst, uint amt);// event Transfer(address indexed src, address indexed dst, uint amt);// function totalSupply() external view returns (uint);// function balanceOf(address whom) external view returns (uint);
1234567891011121314151617181920212223242526pragma solidity ^0.5.0;/*** @dev Interface of the ERC20 standard as defined in the EIP. Does not include* the optional functions; to access them see {ERC20Detailed}.*/interface IERC20 {/*** @dev Returns the amount of tokens in existence.*/function totalSupply() external view returns (uint256);/*** @dev Returns the amount of tokens owned by `account`.*/function balanceOf(address account) external view returns (uint256);/*** @dev Moves `amount` tokens from the caller's account to `recipient`.** Returns a boolean value indicating whether the operation succeeded.** Emits a {Transfer} event.*/function transfer(address recipient, uint256 amount) external returns (bool);
1234567891011121314151617181920{"remappings": [],"optimizer": {"enabled": true,"runs": 200},"evmVersion": "byzantium","libraries": {"": {}},"outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode","abi"]}}}
[{"constant":false,"inputs":[{"name":"tokenOut","type":"address"},{"name":"tokenAmountOut","type":"uint256"},{"name":"maxPoolAmountIn","type":"uint256"}],"name":"exitswapExternAmountOut","outputs":[{"name":"poolAmountIn","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"dst","type":"address"},{"name":"amt","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"MAX_TOTAL_WEIGHT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"tokenIn","type":"address"},{"name":"tokenOut","type":"address"}],"name":"getSpotPriceSansFee","outputs":[{"name":"spotPrice","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"tokenIn","type":"address"},{"name":"tokenOut","type":"address"}],"name":"getSpotPrice","outputs":[{"name":"spotPrice","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BPOW_PRECISION","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MIN_WEIGHT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"src","type":"address"},{"name":"dst","type":"address"},{"name":"amt","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"t","type":"address"}],"name":"isBound","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getController","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"swapFee","type":"uint256"}],"name":"setSwapFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isInitialized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"balance","type":"uint256"},{"name":"denorm","type":"uint256"}],"name":"rebind","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"tokenOut","type":"address"},{"name":"poolAmountIn","type":"uint256"},{"name":"minAmountOut","type":"uint256"}],"name":"exitswapPoolAmountIn","outputs":[{"name":"tokenAmountOut","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"public_","type":"bool"}],"name":"setPublicSwap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"finalize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"poolAmountOut","type":"uint256"},{"name":"maxAmountsIn","type":"uint256[]"}],"name":"joinPool","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"controller","type":"address"},{"name":"factory","type":"address"},{"name":"swapFee","type":"uint256"},{"name":"publicSwap","type":"bool"},{"name":"finalized","type":"bool"}],"name":"initialize","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"tokenBalanceIn","type":"uint256"},{"name":"tokenWeightIn","type":"uint256"},{"name":"poolSupply","type":"uint256"},{"name":"totalWeight","type":"uint256"},{"name":"poolAmountOut","type":"uint256"},{"name":"swapFee","type":"uint256"}],"name":"calcSingleInGivenPoolOut","outputs":[{"name":"tokenAmountIn","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"tokenIn","type":"address"},{"name":"tokenAmountIn","type":"uint256"},{"name":"minPoolAmountOut","type":"uint256"}],"name":"joinswapExternAmountIn","outputs":[{"name":"poolAmountOut","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"dst","type":"address"},{"name":"amt","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"tokenIn","type":"address"},{"name":"poolAmountOut","type":"uint256"},{"name":"maxAmountIn","type":"uint256"}],"name":"joinswapPoolAmountOut","outputs":[{"name":"tokenAmountIn","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"whom","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MIN_FEE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"tokenIn","type":"address"},{"name":"maxAmountIn","type":"uint256"},{"name":"tokenOut","type":"address"},{"name":"tokenAmountOut","type":"uint256"},{"name":"maxPrice","type":"uint256"}],"name":"swapExactAmountOut","outputs":[{"name":"tokenAmountIn","type":"uint256"},{"name":"spotPriceAfter","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"tokenIn","type":"address"},{"name":"tokenAmountIn","type":"uint256"},{"name":"tokenOut","type":"address"},{"name":"minAmountOut","type":"uint256"},{"name":"maxPrice","type":"uint256"}],"name":"swapExactAmountIn","outputs":[{"name":"tokenAmountOut","type":"uint256"},{"name":"spotPriceAfter","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"tokenBalanceOut","type":"uint256"},{"name":"tokenWeightOut","type":"uint256"},{"name":"poolSupply","type":"uint256"},{"name":"totalWeight","type":"uint256"},{"name":"tokenAmountOut","type":"uint256"},{"name":"swapFee","type":"uint256"}],"name":"calcPoolInGivenSingleOut","outputs":[{"name":"poolAmountIn","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"tokenBalanceIn","type":"uint256"},{"name":"tokenWeightIn","type":"uint256"},{"name":"poolSupply","type":"uint256"},{"name":"totalWeight","type":"uint256"},{"name":"tokenAmountIn","type":"uint256"},{"name":"swapFee","type":"uint256"}],"name":"calcPoolOutGivenSingleIn","outputs":[{"name":"poolAmountOut","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"MIN_BALANCE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"tokenBalanceOut","type":"uint256"},{"name":"tokenWeightOut","type":"uint256"},{"name":"poolSupply","type":"uint256"},{"name":"totalWeight","type":"uint256"},{"name":"poolAmountIn","type":"uint256"},{"name":"swapFee","type":"uint256"}],"name":"calcSingleOutGivenPoolIn","outputs":[{"name":"tokenAmountOut","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"}],"name":"gulp","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isFinalized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"manager","type":"address"}],"name":"setController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getTotalDenormalizedWeight","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"INIT_POOL_SUPPLY","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"token","type":"address"}],"name":"getDenormalizedWeight","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_OUT_RATIO","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"tokenBalanceIn","type":"uint256"},{"name":"tokenWeightIn","type":"uint256"},{"name":"tokenBalanceOut","type":"uint256"},{"name":"tokenWeightOut","type":"uint256"},{"name":"swapFee","type":"uint256"}],"name":"calcSpotPrice","outputs":[{"name":"spotPrice","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"dst","type":"address"},{"name":"amt","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"poolAmountIn","type":"uint256"},{"name":"minAmountsOut","type":"uint256[]"}],"name":"exitPool","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"MAX_BOUND_TOKENS","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MIN_BOUND_TOKENS","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MIN_BPOW_BASE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"tokenBalanceIn","type":"uint256"},{"name":"tokenWeightIn","type":"uint256"},{"name":"tokenBalanceOut","type":"uint256"},{"name":"tokenWeightOut","type":"uint256"},{"name":"tokenAmountIn","type":"uint256"},{"name":"swapFee","type":"uint256"}],"name":"calcOutGivenIn","outputs":[{"name":"tokenAmountOut","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"MAX_FEE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_BPOW_BASE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getFinalTokens","outputs":[{"name":"tokens","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BONE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"EXIT_FEE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getCurrentTokens","outputs":[{"name":"tokens","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getNumTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"}],"name":"unbind","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"dataTokenAaddress","type":"address"},{"name":"dataTokenAmount","type":"uint256"},{"name":"dataTokenWeight","type":"uint256"},{"name":"baseTokenAddress","type":"address"},{"name":"baseTokenAmount","type":"uint256"},{"name":"baseTokenWeight","type":"uint256"},{"name":"swapFee","type":"uint256"}],"name":"setup","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getSwapFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"dst","type":"address"},{"name":"amt","type":"uint256"}],"name":"increaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"src","type":"address"},{"name":"dst","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_WEIGHT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"balance","type":"uint256"},{"name":"denorm","type":"uint256"}],"name":"bind","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"MAX_IN_RATIO","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"token","type":"address"}],"name":"getNormalizedWeight","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"token","type":"address"}],"name":"getBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"tokenBalanceIn","type":"uint256"},{"name":"tokenWeightIn","type":"uint256"},{"name":"tokenBalanceOut","type":"uint256"},{"name":"tokenWeightOut","type":"uint256"},{"name":"tokenAmountOut","type":"uint256"},{"name":"swapFee","type":"uint256"}],"name":"calcInGivenOut","outputs":[{"name":"tokenAmountIn","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"isPublicSwap","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"caller","type":"address"},{"indexed":true,"name":"tokenIn","type":"address"},{"indexed":true,"name":"tokenOut","type":"address"},{"indexed":false,"name":"tokenAmountIn","type":"uint256"},{"indexed":false,"name":"tokenAmountOut","type":"uint256"}],"name":"LOG_SWAP","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"caller","type":"address"},{"indexed":true,"name":"tokenIn","type":"address"},{"indexed":false,"name":"tokenAmountIn","type":"uint256"}],"name":"LOG_JOIN","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"caller","type":"address"},{"indexed":true,"name":"tokenOut","type":"address"},{"indexed":false,"name":"tokenAmountOut","type":"uint256"}],"name":"LOG_EXIT","type":"event"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"caller","type":"address"},{"indexed":false,"name":"data","type":"bytes"}],"name":"LOG_CALL","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}]
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.