Source Code
Overview
DEV Balance
0 DEV
More Info
ContractCreator:
Multichain Info
N/A
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 1928421 | 728 days ago | IN | Create: RiverboatSwapParams | 0 DEV | 0.01256964 |
Latest 25 internal transactions (View All)
Parent Txn Hash | Block | From | To | Value | ||
---|---|---|---|---|---|---|
3849784 | 393 days ago | 0 DEV | ||||
3849784 | 393 days ago | 0 DEV | ||||
3849784 | 393 days ago | 0 DEV | ||||
3849784 | 393 days ago | 0 DEV | ||||
3842656 | 394 days ago | 0 DEV | ||||
3842656 | 394 days ago | 0 DEV | ||||
3842656 | 394 days ago | 0 DEV | ||||
3842656 | 394 days ago | 0 DEV | ||||
3842656 | 394 days ago | 0 DEV | ||||
3842656 | 394 days ago | 0 DEV | ||||
3842656 | 394 days ago | 0 DEV | ||||
3842656 | 394 days ago | 0 DEV | ||||
3837974 | 395 days ago | 0 DEV | ||||
3837974 | 395 days ago | 0 DEV | ||||
3837974 | 395 days ago | 0 DEV | ||||
3837974 | 395 days ago | 0 DEV | ||||
3837901 | 395 days ago | 0 DEV | ||||
3837901 | 395 days ago | 0 DEV | ||||
3837901 | 395 days ago | 0 DEV | ||||
3837901 | 395 days ago | 0 DEV | ||||
2166630 | 681 days ago | 0 DEV | ||||
2166630 | 681 days ago | 0 DEV | ||||
2166630 | 681 days ago | 0 DEV | ||||
2166630 | 681 days ago | 0 DEV | ||||
2164027 | 681 days ago | 0 DEV |
Loading...
Loading
Contract Name:
RiverboatSwapParams
Compiler Version
v0.6.7+commit.b8d736ae
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity 0.6.7; pragma experimental ABIEncoderV2; import "./../SwapSigner.sol"; /// @title RiverboatSwapParams is nft params encoder/decoder, signature verifyer /// @author Nejc Schneider contract RiverboatSwapParams { SwapSigner private swapSigner; constructor(address _signerAddress) public { swapSigner = SwapSigner(_signerAddress); } // takes in _encodedData and converts to seascape function paramsAreValid (uint256 _offerId, bytes memory _encodedData, uint8 v, bytes32 r, bytes32 s) public view returns (bool){ (uint256 nftId, uint8 category) = decodeParams(_encodedData); bytes32 hash = this.encodeParams(_offerId, nftId, category); address recover = ecrecover(hash, v, r, s); require(recover == swapSigner.getSigner(), "Verification failed"); return true; } function encodeParams( uint256 _offerId, uint256 _nftId, uint8 _category ) public view returns (bytes32 message) { bytes memory prefix = "\x19Ethereum Signed Message:\n32"; bytes32 messageNoPrefix = keccak256(abi .encode(_offerId, _nftId, _category)); bytes32 hash = keccak256(abi.encodePacked(prefix, messageNoPrefix)); return hash; } function decodeParams (bytes memory _encodedData) public view returns ( uint256 nftId, uint8 category ) { (uint256 nftId, uint8 category) = abi .decode(_encodedData, (uint256, uint8)); return (nftId, category); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "../GSN/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
pragma solidity 0.6.7; import "./../openzeppelin/contracts/access/Ownable.sol"; contract SwapSigner is Ownable { address public signer; // @dev verify v, r, s signature constructor() public { signer = msg.sender; } /// @notice change address to verify signature against /// @param _signer new signer address function setSigner(address _signer) external onlyOwner { require(_signer != address(0), "invalid signer address"); signer = _signer; } /// @notice returns verifier of signatures /// @return signer address function getSigner() external view returns(address) { return signer; } }
{ "remappings": [], "optimizer": { "enabled": false, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
[{"inputs":[{"internalType":"address","name":"_signerAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes","name":"_encodedData","type":"bytes"}],"name":"decodeParams","outputs":[{"internalType":"uint256","name":"nftId","type":"uint256"},{"internalType":"uint8","name":"category","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_offerId","type":"uint256"},{"internalType":"uint256","name":"_nftId","type":"uint256"},{"internalType":"uint8","name":"_category","type":"uint8"}],"name":"encodeParams","outputs":[{"internalType":"bytes32","name":"message","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_offerId","type":"uint256"},{"internalType":"bytes","name":"_encodedData","type":"bytes"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"paramsAreValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50604051610b00380380610b008339818101604052810190610032919061008d565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100ff565b600081519050610087816100e8565b92915050565b60006020828403121561009f57600080fd5b60006100ad84828501610078565b91505092915050565b60006100c1826100c8565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6100f1816100b6565b81146100fc57600080fd5b50565b6109f28061010e6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063640e13081461004657806365cb98b814610076578063acd082de146100a6575b600080fd5b610060600480360381019061005b9190610534565b6100d7565b60405161006d919061073a565b60405180910390f35b610090600480360381019061008b91906105c3565b6102ea565b60405161009d9190610755565b60405180910390f35b6100c060048036038101906100bb91906104f3565b61038f565b6040516100ce92919061080c565b60405180910390f35b60008060006100e58761038f565b9150915060003073ffffffffffffffffffffffffffffffffffffffff166365cb98b88a85856040518463ffffffff1660e01b8152600401610128939291906107d5565b60206040518083038186803b15801561014057600080fd5b505afa158015610154573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061017891906104ca565b905060006001828989896040516000815260200160405260405161019f9493929190610770565b6020604051602081039080840390855afa1580156101c1573d6000803e3d6000fd5b5050506020604051035190506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637ac3c02f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561023457600080fd5b505afa158015610248573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026c91906104a1565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146102d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102d0906107b5565b60405180910390fd5b600194505050505095945050505050565b600060606040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152509050600085858560405160200161033d939291906107d5565b6040516020818303038152906040528051906020012090506000828260405160200161036a929190610712565b6040516020818303038152906040528051906020012090508093505050509392505050565b600080600080848060200190518101906103a99190610612565b915091508181935093505050915091565b6000815190506103c981610960565b92915050565b6000813590506103de81610977565b92915050565b6000815190506103f381610977565b92915050565b600082601f83011261040a57600080fd5b813561041d61041882610862565b610835565b9150808252602083016020830185838301111561043957600080fd5b610444838284610914565b50505092915050565b60008135905061045c8161098e565b92915050565b6000815190506104718161098e565b92915050565b600081359050610486816109a5565b92915050565b60008151905061049b816109a5565b92915050565b6000602082840312156104b357600080fd5b60006104c1848285016103ba565b91505092915050565b6000602082840312156104dc57600080fd5b60006104ea848285016103e4565b91505092915050565b60006020828403121561050557600080fd5b600082013567ffffffffffffffff81111561051f57600080fd5b61052b848285016103f9565b91505092915050565b600080600080600060a0868803121561054c57600080fd5b600061055a8882890161044d565b955050602086013567ffffffffffffffff81111561057757600080fd5b610583888289016103f9565b945050604061059488828901610477565b93505060606105a5888289016103cf565b92505060806105b6888289016103cf565b9150509295509295909350565b6000806000606084860312156105d857600080fd5b60006105e68682870161044d565b93505060206105f78682870161044d565b925050604061060886828701610477565b9150509250925092565b6000806040838503121561062557600080fd5b600061063385828601610462565b92505060206106448582860161048c565b9150509250929050565b610657816108c7565b82525050565b610666816108d3565b82525050565b61067d610678826108d3565b610956565b82525050565b600061068e8261088e565b6106988185610899565b93506106a8818560208601610923565b80840191505092915050565b60006106c16013836108a4565b91507f566572696669636174696f6e206661696c6564000000000000000000000000006000830152602082019050919050565b6106fd816108fd565b82525050565b61070c81610907565b82525050565b600061071e8285610683565b915061072a828461066c565b6020820191508190509392505050565b600060208201905061074f600083018461064e565b92915050565b600060208201905061076a600083018461065d565b92915050565b6000608082019050610785600083018761065d565b6107926020830186610703565b61079f604083018561065d565b6107ac606083018461065d565b95945050505050565b600060208201905081810360008301526107ce816106b4565b9050919050565b60006060820190506107ea60008301866106f4565b6107f760208301856106f4565b6108046040830184610703565b949350505050565b600060408201905061082160008301856106f4565b61082e6020830184610703565b9392505050565b6000604051905081810181811067ffffffffffffffff8211171561085857600080fd5b8060405250919050565b600067ffffffffffffffff82111561087957600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b60006108c0826108dd565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b83811015610941578082015181840152602081019050610926565b83811115610950576000848401525b50505050565b6000819050919050565b610969816108b5565b811461097457600080fd5b50565b610980816108d3565b811461098b57600080fd5b50565b610997816108fd565b81146109a257600080fd5b50565b6109ae81610907565b81146109b957600080fd5b5056fea26469706673582212203c03432b53bfdda88b2734a828503f1aecab06d2d59e09298a6fbbe4f564e3ba64736f6c6343000607003300000000000000000000000061983368f5b3d639e3e90bebf708e2a524572f32
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063640e13081461004657806365cb98b814610076578063acd082de146100a6575b600080fd5b610060600480360381019061005b9190610534565b6100d7565b60405161006d919061073a565b60405180910390f35b610090600480360381019061008b91906105c3565b6102ea565b60405161009d9190610755565b60405180910390f35b6100c060048036038101906100bb91906104f3565b61038f565b6040516100ce92919061080c565b60405180910390f35b60008060006100e58761038f565b9150915060003073ffffffffffffffffffffffffffffffffffffffff166365cb98b88a85856040518463ffffffff1660e01b8152600401610128939291906107d5565b60206040518083038186803b15801561014057600080fd5b505afa158015610154573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061017891906104ca565b905060006001828989896040516000815260200160405260405161019f9493929190610770565b6020604051602081039080840390855afa1580156101c1573d6000803e3d6000fd5b5050506020604051035190506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637ac3c02f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561023457600080fd5b505afa158015610248573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026c91906104a1565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146102d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102d0906107b5565b60405180910390fd5b600194505050505095945050505050565b600060606040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152509050600085858560405160200161033d939291906107d5565b6040516020818303038152906040528051906020012090506000828260405160200161036a929190610712565b6040516020818303038152906040528051906020012090508093505050509392505050565b600080600080848060200190518101906103a99190610612565b915091508181935093505050915091565b6000815190506103c981610960565b92915050565b6000813590506103de81610977565b92915050565b6000815190506103f381610977565b92915050565b600082601f83011261040a57600080fd5b813561041d61041882610862565b610835565b9150808252602083016020830185838301111561043957600080fd5b610444838284610914565b50505092915050565b60008135905061045c8161098e565b92915050565b6000815190506104718161098e565b92915050565b600081359050610486816109a5565b92915050565b60008151905061049b816109a5565b92915050565b6000602082840312156104b357600080fd5b60006104c1848285016103ba565b91505092915050565b6000602082840312156104dc57600080fd5b60006104ea848285016103e4565b91505092915050565b60006020828403121561050557600080fd5b600082013567ffffffffffffffff81111561051f57600080fd5b61052b848285016103f9565b91505092915050565b600080600080600060a0868803121561054c57600080fd5b600061055a8882890161044d565b955050602086013567ffffffffffffffff81111561057757600080fd5b610583888289016103f9565b945050604061059488828901610477565b93505060606105a5888289016103cf565b92505060806105b6888289016103cf565b9150509295509295909350565b6000806000606084860312156105d857600080fd5b60006105e68682870161044d565b93505060206105f78682870161044d565b925050604061060886828701610477565b9150509250925092565b6000806040838503121561062557600080fd5b600061063385828601610462565b92505060206106448582860161048c565b9150509250929050565b610657816108c7565b82525050565b610666816108d3565b82525050565b61067d610678826108d3565b610956565b82525050565b600061068e8261088e565b6106988185610899565b93506106a8818560208601610923565b80840191505092915050565b60006106c16013836108a4565b91507f566572696669636174696f6e206661696c6564000000000000000000000000006000830152602082019050919050565b6106fd816108fd565b82525050565b61070c81610907565b82525050565b600061071e8285610683565b915061072a828461066c565b6020820191508190509392505050565b600060208201905061074f600083018461064e565b92915050565b600060208201905061076a600083018461065d565b92915050565b6000608082019050610785600083018761065d565b6107926020830186610703565b61079f604083018561065d565b6107ac606083018461065d565b95945050505050565b600060208201905081810360008301526107ce816106b4565b9050919050565b60006060820190506107ea60008301866106f4565b6107f760208301856106f4565b6108046040830184610703565b949350505050565b600060408201905061082160008301856106f4565b61082e6020830184610703565b9392505050565b6000604051905081810181811067ffffffffffffffff8211171561085857600080fd5b8060405250919050565b600067ffffffffffffffff82111561087957600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b60006108c0826108dd565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b83811015610941578082015181840152602081019050610926565b83811115610950576000848401525b50505050565b6000819050919050565b610969816108b5565b811461097457600080fd5b50565b610980816108d3565b811461098b57600080fd5b50565b610997816108fd565b81146109a257600080fd5b50565b6109ae81610907565b81146109b957600080fd5b5056fea26469706673582212203c03432b53bfdda88b2734a828503f1aecab06d2d59e09298a6fbbe4f564e3ba64736f6c63430006070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000061983368f5b3d639e3e90bebf708e2a524572f32
-----Decoded View---------------
Arg [0] : _signerAddress (address): 0x61983368F5b3d639E3e90BEbf708e2a524572F32
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000061983368f5b3d639e3e90bebf708e2a524572f32
Loading...
Loading
[ Download: CSV Export ]
[ 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.