Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Cancel Multiple ... | 14835342 | 1037 days ago | IN | 0 ETH | 0.00023973 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
StrategyStandardSaleForFixedPrice
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 888888 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {OrderTypes} from "../libraries/OrderTypes.sol"; import {IExecutionStrategy} from "../interfaces/IExecutionStrategy.sol"; /** * @title StrategyStandardSaleForFixedPrice * @notice Strategy that executes an order at a fixed price that * can be taken either by a bid or an ask. */ contract StrategyStandardSaleForFixedPrice is IExecutionStrategy { uint256 public immutable PROTOCOL_FEE; /** * @notice Constructor * @param _protocolFee protocol fee (200 --> 2%, 400 --> 4%) */ constructor(uint256 _protocolFee) { PROTOCOL_FEE = _protocolFee; } /** * @notice Check whether a taker ask order can be executed against a maker bid * @param takerAsk taker ask order * @param makerBid maker bid order * @return (whether strategy can be executed, tokenId to execute, amount of tokens to execute) */ function canExecuteTakerAsk(OrderTypes.TakerOrder calldata takerAsk, OrderTypes.MakerOrder calldata makerBid) external view override returns ( bool, uint256, uint256 ) { return ( ((makerBid.price == takerAsk.price) && (makerBid.tokenId == takerAsk.tokenId) && (makerBid.startTime <= block.timestamp) && (makerBid.endTime >= block.timestamp)), makerBid.tokenId, makerBid.amount ); } /** * @notice Check whether a taker bid order can be executed against a maker ask * @param takerBid taker bid order * @param makerAsk maker ask order * @return (whether strategy can be executed, tokenId to execute, amount of tokens to execute) */ function canExecuteTakerBid(OrderTypes.TakerOrder calldata takerBid, OrderTypes.MakerOrder calldata makerAsk) external view override returns ( bool, uint256, uint256 ) { return ( ((makerAsk.price == takerBid.price) && (makerAsk.tokenId == takerBid.tokenId) && (makerAsk.startTime <= block.timestamp) && (makerAsk.endTime >= block.timestamp)), makerAsk.tokenId, makerAsk.amount ); } /** * @notice Return protocol fee for this strategy * @return protocol fee */ function viewProtocolFee() external view override returns (uint256) { return PROTOCOL_FEE; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title OrderTypes * @notice This library contains order types for the LooksRare exchange. */ library OrderTypes { // keccak256("MakerOrder(bool isOrderAsk,address signer,address collection,uint256 price,uint256 tokenId,uint256 amount,address strategy,address currency,uint256 nonce,uint256 startTime,uint256 endTime,uint256 minPercentageToAsk,bytes params)") bytes32 internal constant MAKER_ORDER_HASH = 0x40261ade532fa1d2c7293df30aaadb9b3c616fae525a0b56d3d411c841a85028; struct MakerOrder { bool isOrderAsk; // true --> ask / false --> bid address signer; // signer of the maker order address collection; // collection address uint256 price; // price (used as ) uint256 tokenId; // id of the token uint256 amount; // amount of tokens to sell/purchase (must be 1 for ERC721, 1+ for ERC1155) address strategy; // strategy for trade execution (e.g., DutchAuction, StandardSaleForFixedPrice) address currency; // currency (e.g., WETH) uint256 nonce; // order nonce (must be unique unless new maker order is meant to override existing one e.g., lower ask price) uint256 startTime; // startTime in timestamp uint256 endTime; // endTime in timestamp uint256 minPercentageToAsk; // slippage protection (9000 --> 90% of the final price must return to ask) bytes params; // additional parameters uint8 v; // v: parameter (27 or 28) bytes32 r; // r: parameter bytes32 s; // s: parameter } struct TakerOrder { bool isOrderAsk; // true --> ask / false --> bid address taker; // msg.sender uint256 price; // final price for the purchase uint256 tokenId; uint256 minPercentageToAsk; // // slippage protection (9000 --> 90% of the final price must return to ask) bytes params; // other params (e.g., tokenId) } function hash(MakerOrder memory makerOrder) internal pure returns (bytes32) { return keccak256( abi.encode( MAKER_ORDER_HASH, makerOrder.isOrderAsk, makerOrder.signer, makerOrder.collection, makerOrder.price, makerOrder.tokenId, makerOrder.amount, makerOrder.strategy, makerOrder.currency, makerOrder.nonce, makerOrder.startTime, makerOrder.endTime, makerOrder.minPercentageToAsk, keccak256(makerOrder.params) ) ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {OrderTypes} from "../libraries/OrderTypes.sol"; interface IExecutionStrategy { function canExecuteTakerAsk(OrderTypes.TakerOrder calldata takerAsk, OrderTypes.MakerOrder calldata makerBid) external view returns ( bool, uint256, uint256 ); function canExecuteTakerBid(OrderTypes.TakerOrder calldata takerBid, OrderTypes.MakerOrder calldata makerAsk) external view returns ( bool, uint256, uint256 ); function viewProtocolFee() external view returns (uint256); }
{ "optimizer": { "enabled": true, "runs": 888888 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"uint256","name":"_protocolFee","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"PROTOCOL_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"isOrderAsk","type":"bool"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"minPercentageToAsk","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"}],"internalType":"struct OrderTypes.TakerOrder","name":"takerAsk","type":"tuple"},{"components":[{"internalType":"bool","name":"isOrderAsk","type":"bool"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"strategy","type":"address"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"minPercentageToAsk","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct OrderTypes.MakerOrder","name":"makerBid","type":"tuple"}],"name":"canExecuteTakerAsk","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"isOrderAsk","type":"bool"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"minPercentageToAsk","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"}],"internalType":"struct OrderTypes.TakerOrder","name":"takerBid","type":"tuple"},{"components":[{"internalType":"bool","name":"isOrderAsk","type":"bool"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"strategy","type":"address"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"minPercentageToAsk","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct OrderTypes.MakerOrder","name":"makerAsk","type":"tuple"}],"name":"canExecuteTakerBid","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"viewProtocolFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b5060405161025538038061025583398101604081905261002f91610037565b608052610050565b60006020828403121561004957600080fd5b5051919050565b6080516101e5610070600039600081816056015260bd01526101e56000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630b4501fd14610051578063865781ca1461008b5780639dd1cda6146100bb578063ad2390ac1461008b575b600080fd5b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b61009e61009936600461013b565b6100e1565b604080519315158452602084019290925290820152606001610082565b7f0000000000000000000000000000000000000000000000000000000000000000610078565b600080600084604001358460600135148015610104575084606001358460800135145b801561011557504284610120013511155b801561012657504284610140013510155b92505050608082013560a08301359250925092565b6000806040838503121561014e57600080fd5b823567ffffffffffffffff8082111561016657600080fd5b9084019060c0828703121561017a57600080fd5b9092506020840135908082111561019057600080fd5b50830161020081860312156101a457600080fd5b80915050925092905056fea26469706673582212204e807150059941d53b38385b909a3037a30d8a80437acdea19fadef5d8b5753764736f6c6343000807003300000000000000000000000000000000000000000000000000000000000000c8
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80630b4501fd14610051578063865781ca1461008b5780639dd1cda6146100bb578063ad2390ac1461008b575b600080fd5b6100787f00000000000000000000000000000000000000000000000000000000000000c881565b6040519081526020015b60405180910390f35b61009e61009936600461013b565b6100e1565b604080519315158452602084019290925290820152606001610082565b7f00000000000000000000000000000000000000000000000000000000000000c8610078565b600080600084604001358460600135148015610104575084606001358460800135145b801561011557504284610120013511155b801561012657504284610140013510155b92505050608082013560a08301359250925092565b6000806040838503121561014e57600080fd5b823567ffffffffffffffff8082111561016657600080fd5b9084019060c0828703121561017a57600080fd5b9092506020840135908082111561019057600080fd5b50830161020081860312156101a457600080fd5b80915050925092905056fea26469706673582212204e807150059941d53b38385b909a3037a30d8a80437acdea19fadef5d8b5753764736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000c8
-----Decoded View---------------
Arg [0] : _protocolFee (uint256): 200
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c8
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
BASE | 100.00% | $2,028.28 | 0.000127 | $0.257592 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.