2 txs
607 calls
constructor
constructor(address owner_)
functions
credContract
viewfunction credContract() view returns (address)
getBuyPrice
purefunction getBuyPrice(uint256 supply_, uint256 amount_) pure returns (uint256)
getBuyPriceAfterFee
viewfunction getBuyPriceAfterFee(uint256 credId_, uint256 supply_, uint256 amount_) view returns (uint256)
getCredContract
viewfunction getCredContract() view returns (address)
getPrice
purefunction getPrice(uint256 supply_, uint256 amount_) pure returns (uint256)
getPriceData
viewfunction getPriceData(uint256 credId_, uint256 supply_, uint256 amount_, bool isSign_) view returns (uint256 price, uint256 protocolFee, uint256 creatorFee)
getSellPrice
purefunction getSellPrice(uint256 supply_, uint256 amount_) pure returns (uint256)
getSellPriceAfterFee
viewfunction getSellPriceAfterFee(uint256 credId_, uint256 supply_, uint256 amount_) view returns (uint256)
owner
viewfunction owner() view returns (address)
pendingOwner
viewfunction pendingOwner() view returns (address)
acceptOwnership
nonpayablefunction acceptOwnership()
renounceOwnership
nonpayablefunction renounceOwnership()
setCredContract
nonpayablefunction setCredContract(address credContract_)
transferOwnership
nonpayablefunction transferOwnership(address newOwner)
events
CredContractSet
event CredContractSet(address credContract)
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
OwnershipTransferStarted
event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner)
errors
InvalidAddressZero
error InvalidAddressZero()
OwnableInvalidOwner
error OwnableInvalidOwner(address owner)
OwnableUnauthorizedAccount
error OwnableUnauthorizedAccount(address account)
creation bytecode
0x608060405234801561001057600080fd5b50604051610b98380380610b9883398101604081905261002f916100da565b806001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161006e565b505061010a565b600180546001600160a01b03191690556100878161008a565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100ec57600080fd5b81516001600160a01b038116811461010357600080fd5b9392505050565b610a7f806101196000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063c157253d11610066578063c157253d146101d7578063c55b5fb6146101ea578063e30c3978146101fd578063f2fde38b1461020e57600080fd5b80638da5cb5b146101a05780639477d85d146101b1578063bae67447146101c457600080fd5b80635926dd94116100c85780635926dd94146101685780635cf4ee911461017b578063715018a61461018e57806379ba50971461019857600080fd5b806327fef863146100ef5780633d81e856146101155780635826e4dd1461013a575b600080fd5b6101026100fd3660046108b0565b610221565b6040519081526020015b60405180910390f35b6002546001600160a01b03165b6040516001600160a01b03909116815260200161010c565b61014d6101483660046108ea565b61026e565b6040805193845260208401929092529082015260600161010c565b6101026101763660046108b0565b61036a565b61010261018936600461092b565b6103ac565b6101966103fa565b005b61019661040e565b6000546001600160a01b0316610122565b6101026101bf36600461092b565b610457565b6101966101d236600461094d565b61046c565b6101026101e536600461092b565b610515565b600254610122906001600160a01b031681565b6001546001600160a01b0316610122565b61019661021c36600461094d565b610521565b60008061022e8484610457565b9050600061023b8261059f565b9050600061024c878785600061062f565b9050806102598385610993565b6102639190610993565b979650505050505050565b600254604051631ca5a23b60e21b81526004810186905260009182918291829182916001600160a01b03169063729688ec906024016040805180830381865afa1580156102bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e391906109bd565b9150915085610304576102ff6102f9888a610993565b886103ac565b61030e565b61030e88886103ac565b94506103198561059f565b93508760000361032e57600092505050610360565b60008661033b578161033d565b825b905061271061035061ffff8316886109f0565b61035a9190610a07565b93505050505b9450945094915050565b6000806103778484610515565b905060006103848261059f565b90506000610395878785600161062f565b9050806103a28385610a29565b6102639190610a29565b60006103c86103c384670de0b6b3a76400006109f0565b610781565b6103e76103d58486610a29565b6103c390670de0b6b3a76400006109f0565b6103f19190610993565b90505b92915050565b610402610805565b61040c6000610832565b565b60015433906001600160a01b0316811461044b5760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b61045481610832565b50565b60006103f16104668385610993565b836103ac565b610474610805565b6001600160a01b0381166104b4576040517f10c748a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f19f3f176f6929b088bcf7ee82b5b65988539d9f777e94dadacce1341ce782b6a9060200160405180910390a150565b60006103f183836103ac565b610529610805565b600180546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff1990911681179091556105676000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000612710600260009054906101000a90046001600160a01b03166001600160a01b031663d6e6eb9f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061b9190610a3c565b61062590846109f0565b6103f49190610a07565b6002546040517fca8f8ff3000000000000000000000000000000000000000000000000000000008152600481018690526000916001600160a01b03169063ca8f8ff390602401602060405180830381865afa158015610692573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b69190610a55565b6106c257506000610779565b836000036106d257506000610779565b600254604051631ca5a23b60e21b81526004810187905260009182916001600160a01b039091169063729688ec906024016040805180830381865afa15801561071f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074391906109bd565b915091506000846107545781610756565b825b905061271061076961ffff8316886109f0565b6107739190610a07565b93505050505b949350505050565b60006103e86107918360076109f0565b61079b9190610a07565b6107ae6002670de0b6b3a76400006109f0565b6107c184680d8d726b7177a80000610993565b6107d56002680d8d726b7177a800006109f0565b6107e790670de0b6b3a76400006109f0565b6107f19190610a07565b6107fb9190610993565b6103f49190610993565b6000546001600160a01b0316331461040c5760405163118cdaa760e01b8152336004820152602401610442565b6001805473ffffffffffffffffffffffffffffffffffffffff1916905561045481600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000606084860312156108c557600080fd5b505081359360208301359350604090920135919050565b801515811461045457600080fd5b6000806000806080858703121561090057600080fd5b8435935060208501359250604085013591506060850135610920816108dc565b939692955090935050565b6000806040838503121561093e57600080fd5b50508035926020909101359150565b60006020828403121561095f57600080fd5b81356001600160a01b038116811461097657600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156103f4576103f461097d565b805161ffff811681146109b857600080fd5b919050565b600080604083850312156109d057600080fd5b6109d9836109a6565b91506109e7602084016109a6565b90509250929050565b80820281158282048414176103f4576103f461097d565b600082610a2457634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156103f4576103f461097d565b600060208284031215610a4e57600080fd5b5051919050565b600060208284031215610a6757600080fd5b8151610976816108dc56fea164736f6c6343000819000a0000000000000000000000005cd18da4c84758319c8e1c228b48725f5e4a3506