0 txs
0 calls
constructor
constructor()
functions
batchCheckOrderValidAmount
viewfunction batchCheckOrderValidAmount(uint256[] ids) view returns (uint256[], uint256[])
checkOrder
viewfunction checkOrder(address taker, uint256 orderId, uint256 takeAmount) view returns (bool)
checkOrderValidAmount
viewfunction checkOrderValidAmount(uint256 orderId) view returns (uint256)
eUSDV1
viewfunction eUSDV1() view returns (address)
eUSDV2
viewfunction eUSDV2() view returns (address)
getOrders
viewfunction getOrders(uint256[] ids) view returns (tuple[])
orders
viewfunction orders(uint256) view returns (address maker, uint8 tokenType, bool buyOrSale, uint256 price, uint256 remainingAmount, bool isActive)
peUSD
viewfunction peUSD() view returns (address)
USDC
viewfunction USDC() view returns (address)
adjustOrder
nonpayablefunction adjustOrder(uint256 orderId, uint256 price, uint256 amount, bool isActive)
batchTake
nonpayablefunction batchTake(uint256[] ids, uint256[] amounts, tuple order)
makeOrder
nonpayablefunction makeOrder(uint8 tokenType, bool buyOrSale, uint256 price, uint256 totalAmount)
takeOrder
nonpayablefunction takeOrder(uint256 orderId, uint256 takeAmount)
events
AdjustOrder
event AdjustOrder(uint256 id, address indexed maker, uint256 price, uint256 amount, bool indexed isActive, uint256 time)
MakeOrder
event MakeOrder(address indexed user, uint256 id, uint8 indexed tokenType, bool indexed buyOrSale, uint256 price, uint256 remainingAmount, uint256 time)
TakeOrder
event TakeOrder(uint256 id, address indexed taker, uint8 indexed tokenType, bool indexed buyOrSale, uint256 price, uint256 amount, uint256 time)
errors
No errors.
creation bytecode
0x60806040525f80546001600160a01b03199081167397de57ec338ab5d51557da3434828c5dbfada3711790915560018054821673df3ac4f479375802a821f7b7b46cd7eb5e4262cc17905560028054821673d585aaafa2b58b1cd75092b51ade9fa4ce52f2471790556003805490911673a0b86991c6218b36c1d19d4a2e9eb0ce3606eb481790553480156091575f80fd5b50611f018061009f5f395ff3fe608060405234801561000f575f80fd5b50600436106100cb575f3560e01c806376f5528c116100885780638ddb1224116100635780638ddb1224146101c7578063a85c38ef146101e8578063c4e01a381461020d578063d562a21c14610220575f80fd5b806376f5528c146101815780637beef374146101a257806389a30271146101b4575f80fd5b806303652027146100cf57806307ebe5dd146100f85780632eab93cb1461011b57806339db709f146101305780634387699a1461015b578063589f58991461016e575b5f80fd5b6100e26100dd366004611a76565b610233565b6040516100ef9190611adc565b60405180910390f35b61010b610106366004611b84565b6103b0565b60405190151581526020016100ef565b61012e610129366004611bb4565b61095f565b005b600154610143906001600160a01b031681565b6040516001600160a01b0390911681526020016100ef565b61012e610169366004611bf2565b61096e565b61012e61017c366004611ccd565b610b9f565b61019461018f366004611d0e565b610bb2565b6040519081526020016100ef565b5f54610143906001600160a01b031681565b600354610143906001600160a01b031681565b6101da6101d5366004611a76565b610f2a565b6040516100ef929190611d5f565b6101fb6101f6366004611d0e565b611072565b6040516100ef96959493929190611d83565b61012e61021b366004611dc6565b6110ca565b600254610143906001600160a01b031681565b60605f825167ffffffffffffffff8111156102505761025061199e565b6040519080825280602002602001820160405280156102ae57816020015b6040805160c0810182525f8082526020808301829052928201819052606082018190526080820181905260a082015282525f1990920191018161026e5790505b5090505f5b83518110156103a95760048482815181106102d0576102d0611e04565b6020026020010151815481106102e8576102e8611e04565b5f9182526020918290206040805160c0810190915260049092020180546001600160a01b0381168352919290919083019060ff600160a01b90910416600281111561033557610335611aa8565b600281111561034657610346611aa8565b8152815460ff600160a81b90910481161515602083015260018301546040830152600283015460608301526003909201549091161515608090910152825183908390811061039657610396611e04565b60209081029190910101526001016102b3565b5092915050565b5f80600484815481106103c5576103c5611e04565b5f9182526020918290206040805160c0810190915260049092020180546001600160a01b0381168352919290919083019060ff600160a01b90910416600281111561041257610412611aa8565b600281111561042357610423611aa8565b8152815460ff600160a81b9091048116151560208301526001830154604083015260028301546060830152600390920154909116151560809091015260a081015190915015806104765750828160800151105b15610484575f915050610958565b5f808260200151600281111561049c5761049c611aa8565b146104e0576001826020015160028111156104b9576104b9611aa8565b146104cf576002546001600160a01b03166104ec565b6001546001600160a01b03166104ec565b5f546001600160a01b03165b905081604001511561072757604051636eb1769f60e11b81526001600160a01b03878116600483015230602483015285919083169063dd62ed3e90604401602060405180830381865afa158015610545573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105699190611e18565b10806105dd57506040516370a0823160e01b81526001600160a01b0387811660048301528591908316906370a0823190602401602060405180830381865afa1580156105b7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105db9190611e18565b105b8061067b5750670de0b6b3a76400008260600151856105fc9190611e43565b6106069190611e5a565b6003548351604051636eb1769f60e11b81526001600160a01b03918216600482015230602482015291169063dd62ed3e90604401602060405180830381865afa158015610655573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106799190611e18565b105b806107135750670de0b6b3a764000082606001518561069a9190611e43565b6106a49190611e5a565b60035483516040516370a0823160e01b81526001600160a01b0391821660048201529116906370a0823190602401602060405180830381865afa1580156106ed573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107119190611e18565b105b15610722575f92505050610958565b610951565b670de0b6b3a76400008260600151856107409190611e43565b61074a9190611e5a565b600354604051636eb1769f60e11b81526001600160a01b0389811660048301523060248301529091169063dd62ed3e90604401602060405180830381865afa158015610798573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107bc9190611e18565b10806108545750670de0b6b3a76400008260600151856107dc9190611e43565b6107e69190611e5a565b6003546040516370a0823160e01b81526001600160a01b038981166004830152909116906370a0823190602401602060405180830381865afa15801561082e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108529190611e18565b105b806108ce57508151604051636eb1769f60e11b81526001600160a01b039182166004820152306024820152859183169063dd62ed3e90604401602060405180830381865afa1580156108a8573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108cc9190611e18565b105b80610942575081516040516370a0823160e01b81526001600160a01b03918216600482015285918316906370a0823190602401602060405180830381865afa15801561091c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109409190611e18565b105b15610951575f92505050610958565b6001925050505b9392505050565b61096a3383836112ed565b5050565b5f5b8351811015610b7257600484828151811061098d5761098d611e04565b6020026020010151815481106109a5576109a5611e04565b5f918252602090912060049091020154600160a01b900460ff1660028111156109d0576109d0611aa8565b826020015160028111156109e6576109e6611aa8565b03610b6a5760048482815181106109ff576109ff611e04565b602002602001015181548110610a1757610a17611e04565b905f5260205f2090600402015f0160159054906101000a900460ff161515826040015115150315610b6a5781604001518015610a91575081606001516004858381518110610a6757610a67611e04565b602002602001015181548110610a7f57610a7f611e04565b905f5260205f20906004020160010154115b80610ae757508160400151158015610ae7575081606001516004858381518110610abd57610abd611e04565b602002602001015181548110610ad557610ad5611e04565b905f5260205f20906004020160010154105b610b6a57610b2833858381518110610b0157610b01611e04565b6020026020010151858481518110610b1b57610b1b611e04565b60200260200101516103b0565b15610b6a57610b6a33858381518110610b4357610b43611e04565b6020026020010151858481518110610b5d57610b5d611e04565b60200260200101516112ed565b600101610970565b50608081015115610b9a57610b9a3382602001518360400151846060015185608001516117b9565b505050565b610bac33858585856117b9565b50505050565b5f8060048381548110610bc757610bc7611e04565b5f9182526020918290206040805160c0810190915260049092020180546001600160a01b0381168352919290919083019060ff600160a01b909104166002811115610c1457610c14611aa8565b6002811115610c2557610c25611aa8565b8152815460ff600160a81b9091048116151560208301526001830154604083015260028301546060830152600390920154909116151560809091015260a0810151909150610c7557505f92915050565b806040015115610dc55760608101516003548251604051636eb1769f60e11b81526001600160a01b0391821660048201523060248201525f93610dad939092169063dd62ed3e90604401602060405180830381865afa158015610cda573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cfe9190611e18565b610d1090670de0b6b3a7640000611e43565b610d1a9190611e5a565b606084015160035485516040516370a0823160e01b81526001600160a01b0391821660048201529116906370a0823190602401602060405180830381865afa158015610d68573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d8c9190611e18565b610d9e90670de0b6b3a7640000611e43565b610da89190611e5a565b611985565b9050610dbd826080015182611985565b949350505050565b5f8082602001516002811115610ddd57610ddd611aa8565b14610e2157600182602001516002811115610dfa57610dfa611aa8565b14610e10576002546001600160a01b0316610e2d565b6001546001600160a01b0316610e2d565b5f546001600160a01b03165b8251604051636eb1769f60e11b81526001600160a01b0391821660048201523060248201529192505f91610f119184169063dd62ed3e90604401602060405180830381865afa158015610e82573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ea69190611e18565b84516040516370a0823160e01b81526001600160a01b039182166004820152908516906370a0823190602401602060405180830381865afa158015610eed573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610da89190611e18565b9050610f21836080015182611985565b95945050505050565b6060805f835167ffffffffffffffff811115610f4857610f4861199e565b604051908082528060200260200182016040528015610f71578160200160208202803683370190505b5090505f845167ffffffffffffffff811115610f8f57610f8f61199e565b604051908082528060200260200182016040528015610fb8578160200160208202803683370190505b5090505f5b855181101561106757610fe8868281518110610fdb57610fdb611e04565b6020026020010151610bb2565b838281518110610ffa57610ffa611e04565b602002602001018181525050600486828151811061101a5761101a611e04565b60200260200101518154811061103257611032611e04565b905f5260205f2090600402016001015482828151811061105457611054611e04565b6020908102919091010152600101610fbd565b509094909350915050565b60048181548110611081575f80fd5b5f91825260209091206004909102018054600182015460028301546003909301546001600160a01b038316945060ff600160a01b8404811694600160a81b909404811693911686565b5f600485815481106110de576110de611e04565b5f9182526020918290206040805160c0810190915260049092020180546001600160a01b0381168352919290919083019060ff600160a01b90910416600281111561112b5761112b611aa8565b600281111561113c5761113c611aa8565b8152815460ff600160a81b9091048116151560208301526001830154604083015260028301546060830152600390920154909116151560809091015280519091506001600160a01b031633146111be5760405162461bcd60e51b81526020600482015260026024820152614e4160f01b60448201526064015b60405180910390fd5b606081018490526080810183905281151560a082015260048054829190879081106111eb576111eb611e04565b5f918252602091829020835160049092020180546001600160a01b039092166001600160a01b0319831681178255928401519092909183916001600160a81b031990911617600160a01b83600281111561124757611247611aa8565b0217905550604082810151825460ff60a81b1916600160a81b911515919091021782556060808401516001840155608080850151600285015560a0909401516003909301805460ff19169315159390931790925580518881526020810188905290810186905242918101919091528315159133917f6bfb30252e66e837aeeb246382f8d11515425f19b39e34d9702f121f6762592e910160405180910390a35050505050565b5f6004838154811061130157611301611e04565b5f9182526020918290206040805160c0810190915260049092020180546001600160a01b0381168352919290919083019060ff600160a01b90910416600281111561134e5761134e611aa8565b600281111561135f5761135f611aa8565b8152815460ff600160a81b9091048116151560208301526001830154604083015260028301546060830152600390920154909116151560809091015260a081015190915080156113b3575081816080015110155b6113e45760405162461bcd60e51b81526020600482015260026024820152614e4160f01b60448201526064016111b5565b5f80826020015160028111156113fc576113fc611aa8565b146114405760018260200151600281111561141957611419611aa8565b1461142f576002546001600160a01b031661144c565b6001546001600160a01b031661144c565b5f546001600160a01b03165b90505f8083604001511561156f5783516040516323b872dd60e01b81526001600160a01b038516916323b872dd9161148a918b918a90600401611e79565b6020604051808303815f875af11580156114a6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114ca9190611e9d565b600354855160608701519294506001600160a01b03909116916323b872dd91908a90670de0b6b3a764000090611500908b611e43565b61150a9190611e5a565b6040518463ffffffff1660e01b815260040161152893929190611e79565b6020604051808303815f875af1158015611544573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115689190611e9d565b905061167f565b600354845160608601516001600160a01b03909216916323b872dd918a91670de0b6b3a7640000906115a1908b611e43565b6115ab9190611e5a565b6040518463ffffffff1660e01b81526004016115c993929190611e79565b6020604051808303815f875af11580156115e5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116099190611e9d565b84516040516323b872dd60e01b81529193506001600160a01b038516916323b872dd9161163c918b908a90600401611e79565b6020604051808303815f875af1158015611658573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061167c9190611e9d565b90505b8180156116895750805b6116ba5760405162461bcd60e51b81526020600482015260026024820152612a2360f11b60448201526064016111b5565b84600487815481106116ce576116ce611e04565b905f5260205f2090600402016002015f8282546116eb9190611eb8565b90915550506080840151859003611732575f6004878154811061171057611710611e04565b5f9182526020909120600490910201600301805460ff19169115159190911790555b836040015115158460200151600281111561174f5761174f611aa8565b886001600160a01b03167f21b201a72ae75574ff32c9d2f59a4f66fee316f9ab27dcde17ea67570982b3e18988606001518a426040516117a8949392919093845260208401929092526040830152606082015260800190565b60405180910390a450505050505050565b6207a12082101580156117cf5750621e84808211155b6118005760405162461bcd60e51b815260206004820152600260248201526127a960f11b60448201526064016111b5565b60046040518060c00160405280876001600160a01b0316815260200186600281111561182e5761182e611aa8565b8152851515602080830191909152604082018690526060820185905260016080909201829052835491820184555f93845292839020825160049092020180546001600160a01b031981166001600160a01b03909316928317825593830151929390929183916001600160a81b03191617600160a01b8360028111156118b5576118b5611aa8565b02179055506040820151815460ff60a81b1916600160a81b9115159190910217815560608201516001820155608082015160028083019190915560a0909201516003909101805460ff191691151591909117905583151590859081111561191e5761191e611aa8565b6004546001600160a01b038816907f1f09d64b9665385888a918b10c2a5a47ef1bb40b4697bfdb0f4d6ab60b0d09d59061195a90600190611eb8565b6040805191825260208201889052810186905242606082015260800160405180910390a45050505050565b5f8183106119935781611995565b825b90505b92915050565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff811182821017156119d5576119d561199e565b60405290565b5f82601f8301126119ea575f80fd5b8135602067ffffffffffffffff80831115611a0757611a0761199e565b8260051b604051601f19603f83011681018181108482111715611a2c57611a2c61199e565b6040529384526020818701810194908101925087851115611a4b575f80fd5b6020870191505b84821015611a6b57813583529183019190830190611a52565b979650505050505050565b5f60208284031215611a86575f80fd5b813567ffffffffffffffff811115611a9c575f80fd5b610dbd848285016119db565b634e487b7160e01b5f52602160045260245ffd5b60038110611ad857634e487b7160e01b5f52602160045260245ffd5b9052565b602080825282518282018190525f919060409081850190868401855b82811015611b5c57815180516001600160a01b0316855286810151611b1f88870182611abc565b5080860151151585870152606080820151908601526080808201519086015260a09081015115159085015260c09093019290850190600101611af8565b5091979650505050505050565b80356001600160a01b0381168114611b7f575f80fd5b919050565b5f805f60608486031215611b96575f80fd5b611b9f84611b69565b95602085013595506040909401359392505050565b5f8060408385031215611bc5575f80fd5b50508035926020909101359150565b803560038110611b7f575f80fd5b8015158114611bef575f80fd5b50565b5f805f838503610100811215611c06575f80fd5b843567ffffffffffffffff80821115611c1d575f80fd5b611c29888389016119db565b95506020870135915080821115611c3e575f80fd5b50611c4b878288016119db565b93505060c0603f1982011215611c5f575f80fd5b50611c686119b2565b611c7460408601611b69565b8152611c8260608601611bd4565b60208201526080850135611c9581611be2565b604082015260a0850135606082015260c0850135608082015260e0850135611cbc81611be2565b60a082015292959194509192509050565b5f805f8060808587031215611ce0575f80fd5b611ce985611bd4565b93506020850135611cf981611be2565b93969395505050506040820135916060013590565b5f60208284031215611d1e575f80fd5b5035919050565b5f815180845260208085019450602084015f5b83811015611d5457815187529582019590820190600101611d38565b509495945050505050565b604081525f611d716040830185611d25565b8281036020840152610f218185611d25565b6001600160a01b038716815260c08101611da06020830188611abc565b941515604082015260608101939093526080830191909152151560a09091015292915050565b5f805f8060808587031215611dd9575f80fd5b8435935060208501359250604085013591506060850135611df981611be2565b939692955090935050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215611e28575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761199857611998611e2f565b5f82611e7457634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f60208284031215611ead575f80fd5b815161095881611be2565b8181038181111561199857611998611e2f56fea2646970667358221220904e8aee9ff222ae012c11532c9720b3fd993245c34c4ed419ee709a3d7a612464736f6c63430008190033