0 txs
0 calls
constructor
No constructor.
functions
ADMIN_ROLE
viewfunction ADMIN_ROLE() view returns (bytes32)
balances
viewfunction balances(address) view returns (uint256)
BOT_ROLE
viewfunction BOT_ROLE() view returns (bytes32)
DEFAULT_ADMIN_ROLE
viewfunction DEFAULT_ADMIN_ROLE() view returns (bytes32)
getRoleAdmin
viewfunction getRoleAdmin(bytes32 role) view returns (bytes32)
hasAddDefaultAdmin
viewfunction hasAddDefaultAdmin() view returns (bool)
hasRole
viewfunction hasRole(bytes32 role, address account) view returns (bool)
hasSignedIn
viewfunction hasSignedIn(address) view returns (uint256)
orderInfo
viewfunction orderInfo(bytes32) view returns (address owner, bool isSettlement, bool isExistence, uint256 amount)
slot0
viewfunction slot0() view returns (address assetId, address marketMakerVault, address platformFeeAccount, address profitSharingAccount)
supportsInterface
viewfunction supportsInterface(bytes4 interfaceId) view returns (bool)
addDefaultAdmin
nonpayablefunction addDefaultAdmin(address owner)
batchSettleOrders
nonpayablefunction batchSettleOrders(tuple[] orders)
createOrder
nonpayablefunction createOrder(tuple params)
dailySignIn
nonpayablefunction dailySignIn()
depositFund
nonpayablefunction depositFund(uint256 amount)
grantRole
nonpayablefunction grantRole(bytes32 role, address account)
initialize
nonpayablefunction initialize(address assetId, address owner, address marketMakerVault, address platformFeeAccount, address profitSharingAccount, address[] bots)
renounceRole
nonpayablefunction renounceRole(bytes32 role, address callerConfirmation)
revokeRole
nonpayablefunction revokeRole(bytes32 role, address account)
settleOrder
nonpayablefunction settleOrder(bytes32 orderId, uint256 revenue, uint256 fee)
updateSlot0
nonpayablefunction updateSlot0(address platformFeeAccount, address profitSharingAccount)
withdrawFund
nonpayablefunction withdrawFund(uint256 amount)
events
BuyTicket
event BuyTicket(address indexed account, uint256 amount)
CancelTicket
event CancelTicket(address indexed account, uint256 amount)
CreateOrder
event CreateOrder(address indexed account, bytes32 indexed orderId, (address account, bytes32 orderId, uint256 amount, uint256 fee, bytes32 quote_currency, uint256 delivery_type, uint256 position_type, uint256 quantity, uint256 delivery, uint256 strike_price, uint256 sheet, uint256 created_at) params)
DailySignIn
event DailySignIn(address indexed user, uint256 timestamp)
DepositFund
event DepositFund(address indexed account, uint256 amount)
Initialized
event Initialized(uint64 version)
PlatformCollectFee
event PlatformCollectFee(address indexed platformFeeAccount, uint256 indexed amount)
ProfitSharingCollectFee
event ProfitSharingCollectFee(address indexed profitSharingAccount, uint256 indexed amount)
RoleAdminChanged
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)
RoleGranted
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)
RoleRevoked
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)
SettleOrder
event SettleOrder(address indexed account, bytes32 indexed orderId, uint256 revenue)
UpdateSlot0
event UpdateSlot0(address indexed platformFeeAccount, address indexed profitSharingAccount)
WithdrawFund
event WithdrawFund(address indexed account, uint256 amount)
errors
AccessControlBadConfirmation
error AccessControlBadConfirmation()
AccessControlUnauthorizedAccount
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole)
InvalidInitialization
error InvalidInitialization()
NotInitializing
error NotInitializing()
ReentrancyGuardReentrantCall
error ReentrancyGuardReentrantCall()
SafeERC20FailedOperation
error SafeERC20FailedOperation(address token)
VanillaMoneyVault__AlreadyExistOrder
error VanillaMoneyVault__AlreadyExistOrder(bytes32 orderId)
VanillaMoneyVault__AlreadySettleOrder
error VanillaMoneyVault__AlreadySettleOrder(bytes32 orderId)
VanillaMoneyVault__PledgeFundInsufficient
error VanillaMoneyVault__PledgeFundInsufficient()
creation bytecode
0x6080604052348015600f57600080fd5b506016601a565b60ca565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560695760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c75780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b61181f806100d96000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c806352306ce1116100c3578063b15037741161007c578063b150377414610365578063b5df06b41461037a578063cc15ca991461038d578063d547741f146103a0578063da0d15a0146103b3578063e899c483146103c657600080fd5b806352306ce114610307578063585e5d201461031a57806361d4faf61461032d57806375b238fc1461033557806391d148541461034a578063a217fddf1461035d57600080fd5b806327e235e31161011557806327e235e3146102355780632f2ff15d1461025557806336568abe146102685780633850c7bd1461027b57806339529c46146102d45780634f1c44ca146102f457600080fd5b806301ffc9a7146101525780630cee17251461017a578063202ddd091461018f578063238e203f1461019c578063248a9ca314610214575b600080fd5b6101656101603660046113bd565b6103d9565b60405190151581526020015b60405180910390f35b61018d6101883660046113ee565b610410565b005b6006546101659060ff1681565b6101e46101aa3660046113ee565b600560205260009081526040902080546001909101546001600160a01b0382169160ff600160a01b8204811692600160a81b909204169084565b604080516001600160a01b0390951685529215156020850152901515918301919091526060820152608001610171565b6102276102223660046113ee565b6104e5565b604051908152602001610171565b61022761024336600461142c565b60046020526000908152604090205481565b61018d610263366004611449565b610507565b61018d610276366004611449565b610529565b6000546001546002546003546102a1936001600160a01b03908116938116928116911684565b604080516001600160a01b0395861681529385166020850152918416918301919091529091166060820152608001610171565b6102276102e236600461142c565b60076020526000908152604090205481565b61018d610302366004611479565b610561565b61018d610315366004611495565b610813565b61018d6103283660046113ee565b61088a565b61018d610900565b61022760008051602061178a83398151915281565b610165610358366004611449565b610937565b610227600081565b6102276000805160206117ca83398151915281565b61018d6103883660046114c3565b61096f565b61018d61039b366004611599565b610a8c565b61018d6103ae366004611449565b610c72565b61018d6103c136600461142c565b610c8e565b61018d6103d43660046115c5565b610d05565b60006001600160e01b03198216637965db0b60e01b148061040a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b610418610d74565b33600090815260046020526040902054811115610448576040516334368d4560e11b815260040160405180910390fd5b3360009081526004602052604081208054839290610467908490611652565b9091555050600054610483906001600160a01b03163383610dbe565b60405181815233907f09ad672d4e7c4892da934d1051932ebe9ec4b6ec8c3f40d569176db3e93e5abe906020015b60405180910390a26104e260017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50565b60009081526000805160206117aa833981519152602052604090206001015490565b610510826104e5565b61051981610e43565b6105238383610e4d565b50505050565b6001600160a01b03811633146105525760405163334bd91960e11b815260040160405180910390fd5b61055c8282610ef2565b505050565b6000805160206117ca83398151915261057981610e43565b60408201356004600061058f602086018661142c565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156105cf576040516334368d4560e11b815260040160405180910390fd5b602082810135600090815260059091526040902054600160a81b900460ff16156106175760405163239d205160e01b8152602083013560048201526024015b60405180910390fd5b604080516080810190915280610630602085018561142c565b6001600160a01b0390811682526000602080840182905260016040808601829052888101356060968701819052898401803586526005855282862089518154968b0151948b01511515600160a81b0260ff60a81b19951515600160a01b026001600160a81b031990981691909916179590951792909216959095178355959094015193019290925591600491906106c7908661142c565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546106f69190611652565b90915550506002546001600160a01b0316156107be576060820135156107be5760608201356004600061072c602086018661142c565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461075b9190611652565b9091555050600254600054610781916001600160a01b0391821691166060850135610dbe565b6002546040516060840135916001600160a01b0316907f9e3d192da31f92b48116f7cd3d0058749734c06d8d7f04b31cc9b7b03c92aaa490600090a35b602082018035906107cf908461142c565b6001600160a01b03167f2721661349795a24200d39006fdeee430e5623a63b1f6bceac34bd6bd6365188846040516108079190611665565b60405180910390a35050565b60008051602061178a83398151915261082b81610e43565b600280546001600160a01b03199081166001600160a01b03868116918217909355600380549092169285169283179091556040517fab4e31f23ed727056aea422be20af41ee70ca5dba765f49a8eef927553c44ef890600090a3505050565b610892610d74565b6108aa336000546001600160a01b0316903084610f6e565b33600090815260046020526040812080548392906108c99084906116fd565b909155505060405181815233907fb8d3ea5067a46fad0ae8f744c59ab75a9c4a69f05e81c6652d666e4501085681906020016104b1565b60405142815233907f9d06a54df55b643433faf5fdab2f4bed484c9298837561e7b9624fad584e700a9060200160405180910390a2565b60009182526000805160206117aa833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156109b55750825b905060008267ffffffffffffffff1660011480156109d25750303b155b9050811580156109e0575080155b156109fe5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610a2857845460ff60401b1916600160401b1785555b610a378c8c8c8c8c8c8c610fa7565b8315610a7e57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2906020015b60405180910390a15b505050505050505050505050565b6000805160206117ca833981519152610aa481610e43565b600084815260056020526040902054600160a01b900460ff1615610ade5760405163543e2eab60e11b81526004810185905260240161060e565b60008481526005602052604081208054600160a01b60ff60a01b1982161782556001805492015492546001600160a01b0391821693610b24939183169290911690610dbe565b6001546001600160a01b0316638a27a80d82610b4086886116fd565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015610b8657600080fd5b505af1158015610b9a573d6000803e3d6000fd5b505050506001600160a01b03811660009081526004602052604081208054869290610bc69084906116fd565b90915550508215610c2757600354600054610bee916001600160a01b03918216911685610dbe565b60035460405184916001600160a01b0316907f8884ca838fdfaafff8e7fb37b470051194b68222d248f987639f1f26b227829290600090a35b84816001600160a01b03167fe96119c39650fc22a050ea845f76da57c1706ab531a2ba3cd7ad5a7cb1b4e48886604051610c6391815260200190565b60405180910390a35050505050565b610c7b826104e5565b610c8481610e43565b6105238383610ef2565b60008051602061178a833981519152610ca681610e43565b60065460ff16610ccd57610cbb600083610e4d565b506006805460ff191660011790555050565b60405162461bcd60e51b81526020600482015260096024820152686f6e6c79206f6e636560b81b604482015260640161060e565b5050565b60005b8181101561055c57610d6c838383818110610d2557610d25611710565b90506060020160000135848484818110610d4157610d41611710565b90506060020160200135858585818110610d5d57610d5d611710565b90506060020160400135610a8c565b600101610d08565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610db857604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b6040516001600160a01b0383811660248301526044820183905261055c91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611245565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b6104e281336112b6565b60006000805160206117aa833981519152610e688484610937565b610ee8576000848152602082815260408083206001600160a01b03871684529091529020805460ff19166001179055610e9e3390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4600191505061040a565b600091505061040a565b60006000805160206117aa833981519152610f0d8484610937565b15610ee8576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4600191505061040a565b6040516001600160a01b0384811660248301528381166044830152606482018390526105239186918216906323b872dd90608401610deb565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff16600081158015610fed5750825b905060008267ffffffffffffffff16600114801561100a5750303b155b905081158015611018575080155b156110365760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561106057845460ff60401b1916600160401b1785555b6110686112ef565b6110706112f9565b61108860008051602061178a8339815191528c610e4d565b61109157600080fd5b6110b76000805160206117ca83398151915260008051602061178a833981519152611309565b604080516080810182526001600160a01b03808f168083528d8216602084018190528d8316948401859052918c166060909301839052600080546001600160a01b03199081169092178155600180548316909317909255600280548216909417909355600380549093169091179091555b868110156111775761116e6000805160206117ca83398151915289898481811061115457611154611710565b9050602002016020810190611169919061142c565b610e4d565b50600101611128565b5060008a6001600160a01b0316631f457cb56040518163ffffffff1660e01b8152600401608060405180830381865afa1580156111b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111dc9190611726565b5050915050806001600160a01b03168d6001600160a01b03161461120257611202611773565b508315610a7e57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602001610a75565b600080602060008451602086016000885af180611268576040513d6000823e3d81fd5b50506000513d9150811561128057806001141561128d565b6001600160a01b0384163b155b1561052357604051635274afe760e01b81526001600160a01b038516600482015260240161060e565b6112c08282610937565b610d015760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161060e565b6112f761136c565b565b61130161136c565b6112f76113b5565b6000805160206117aa8339815191526000611323846104e5565b600085815260208490526040808220600101869055519192508491839187917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a450505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166112f757604051631afcd79f60e31b815260040160405180910390fd5b610e1d61136c565b6000602082840312156113cf57600080fd5b81356001600160e01b0319811681146113e757600080fd5b9392505050565b60006020828403121561140057600080fd5b5035919050565b6001600160a01b03811681146104e257600080fd5b803561142781611407565b919050565b60006020828403121561143e57600080fd5b81356113e781611407565b6000806040838503121561145c57600080fd5b82359150602083013561146e81611407565b809150509250929050565b600061018082840312801561148d57600080fd5b509092915050565b600080604083850312156114a857600080fd5b82356114b381611407565b9150602083013561146e81611407565b600080600080600080600060c0888a0312156114de57600080fd5b87356114e981611407565b965060208801356114f981611407565b9550604088013561150981611407565b9450606088013561151981611407565b9350608088013561152981611407565b925060a088013567ffffffffffffffff81111561154557600080fd5b8801601f81018a1361155657600080fd5b803567ffffffffffffffff81111561156d57600080fd5b8a60208260051b840101111561158257600080fd5b602082019350809250505092959891949750929550565b6000806000606084860312156115ae57600080fd5b505081359360208301359350604090920135919050565b600080602083850312156115d857600080fd5b823567ffffffffffffffff8111156115ef57600080fd5b8301601f8101851361160057600080fd5b803567ffffffffffffffff81111561161757600080fd5b85602060608302840101111561162c57600080fd5b6020919091019590945092505050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561040a5761040a61163c565b6101808101611684826116778561141c565b6001600160a01b03169052565b6020838101359083015260408084013590830152606080840135908301526080808401359083015260a0808401359083015260c0808401359083015260e0808401359083015261010080840135908301526101208084013590830152610140808401359083015261016092830135929091019190915290565b8082018082111561040a5761040a61163c565b634e487b7160e01b600052603260045260246000fd5b6000806000806080858703121561173c57600080fd5b8451801515811461174c57600080fd5b602086015190945061175d81611407565b6040860151606090960151949790965092505050565b634e487b7160e01b600052600160045260246000fdfe1f59f3defb14ce4bd3a85f87cd7df2eee9517014cbf204fd61c41c26c604325c02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268003022a6d875d287caa4a72d8920b102ef06c1f1f90575317dc6e2fbf2ad8bac1da264697066735822122001ecc3012dea8ad9a16f409614c542964508ff989b8e206d3ec18ba2f684e28364736f6c634300081c0033