EeseeOffchain

EeseeOffchain

Contract for offchain eesee lots logic.

SignatureData

struct SignatureData {
  uint256 nonce;
  uint256 deadline;
  bytes signature;
}

nonceUsed

mapping(uint256 => bool) nonceUsed

Is nonce used.

lotClosed

mapping(bytes32 => bool) lotClosed

Is lot closed. Tickets are unable to get bought in closed lots.

CreateLot

event CreateLot(bytes32 ID, struct Asset asset, address sender, bytes data, uint256 nonce)

BuyTickets

event BuyTickets(bytes32 ID, struct Asset asset, address sender, address recipient, bool closeLot, uint256 nonce)

ClaimAsset

event ClaimAsset(bytes32 ID, struct Asset asset, address sender, address recipient, uint256 nonce)

RevokeSignature

event RevokeSignature(uint256 nonce)

LotClosed

error LotClosed()

InvalidRecipient

error InvalidRecipient()

ExpiredDeadline

error ExpiredDeadline()

NonceUsed

error NonceUsed()

InvalidAmount

error InvalidAmount()

InvalidSignature

error InvalidSignature()

InvalidValue

error InvalidValue()

TransferNotSuccessful

error TransferNotSuccessful()

InvalidAssetType

error InvalidAssetType()

initialize

function initialize() external

createLot

function createLot(struct Asset asset, bytes data, struct EeseeOffchain.SignatureData signatureData) external payable returns (bytes32 ID)

Creates lot with offchain logic. Emits {CreateLot} event.

Parameters

NameTypeDescription

asset

struct Asset

- Assets to list. Note: The sender must have them approved for this contract.

data

bytes

- Lot data for offchain logic.

signatureData

struct EeseeOffchain.SignatureData

- Signature for asset and data signed by SIGNER_ROLE.

Return Values

NameTypeDescription

ID

bytes32

- ID of created lot.

buyTickets

function buyTickets(bytes32 ID, struct Asset asset, address recipient, bool closeLot, struct EeseeOffchain.SignatureData signatureData) external payable

Buys tickets to participate in a lot. Emits {BuyTickets} event.

Parameters

NameTypeDescription

ID

bytes32

- ID of lot to buy tickets in.

asset

struct Asset

- Asset to buy tickets with.

recipient

address

- Recipient of tickets.

closeLot

bool

- Prevent buying new tickets.

signatureData

struct EeseeOffchain.SignatureData

- Signature for ID, asset and recipient signed by SIGNER_ROLE.

claimAsset

function claimAsset(bytes32 ID, struct Asset asset, address recipient, bytes _call, struct EeseeOffchain.SignatureData signatureData) external payable returns (bytes returnData)

Claims asset from a lot. Emits {ClaimAsset} event.

Parameters

NameTypeDescription

ID

bytes32

- ID of lot to claim asset in.

asset

struct Asset

- Asset to claim and send to recipient.

recipient

address

- Recipient of asset.

_call

bytes

- Additional external call to make.

signatureData

struct EeseeOffchain.SignatureData

- Signature for ID, asset, msgSender, recipient and _call signed by SIGNER_ROLE.

Return Values

NameTypeDescription

returnData

bytes

- Data returned from external call.

revokeSignatures

function revokeSignatures(uint256[] nonces) external

Callable by SIGNER_ROLE to revoke signatures. Emits {RevokeSignature} for each signature revoked.

Parameters

NameTypeDescription

nonces

uint256[]

- Signature nonces to revoke.

getLotId

function getLotId(uint256 nonce) public pure returns (bytes32)

Inherited from EeseeRoleHandler

Inherited from EIP712Upgradeable

eip712Domain

function eip712Domain() public view virtual returns (bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions)

_See {EIP-5267}.

Available since v4.9._

Inherited from IERC5267Upgradeable

EIP712DomainChanged

event EIP712DomainChanged()

MAY be emitted to signal that the domain could have changed.

Inherited from ERC1155HolderUpgradeable

onERC1155Received

function onERC1155Received(address, address, uint256, uint256, bytes) public virtual returns (bytes4)

onERC1155BatchReceived

function onERC1155BatchReceived(address, address, uint256[], uint256[], bytes) public virtual returns (bytes4)

Inherited from ERC1155ReceiverUpgradeable

supportsInterface

function supportsInterface(bytes4 interfaceId) public view virtual returns (bool)

See {IERC165-supportsInterface}.

Inherited from ERC165Upgradeable

Inherited from ERC721HolderUpgradeable

onERC721Received

function onERC721Received(address, address, uint256, bytes) public virtual returns (bytes4)

_See {IERC721Receiver-onERC721Received}.

Always returns IERC721Receiver.onERC721Received.selector._

Inherited from ERC2771ContextUpgradeable

isTrustedForwarder

function isTrustedForwarder(address forwarder) public view virtual returns (bool)

Inherited from ContextUpgradeable

Inherited from Initializable

Initialized

event Initialized(uint8 version)

Triggered when the contract has been initialized or reinitialized.

Inherited from UUPSUpgradeable

proxiableUUID

function proxiableUUID() external view virtual returns (bytes32)

_Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade.

IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the notDelegated modifier._

upgradeTo

function upgradeTo(address newImplementation) public virtual

_Upgrade the implementation of the proxy to newImplementation.

Calls {_authorizeUpgrade}.

Emits an {Upgraded} event._

upgradeToAndCall

function upgradeToAndCall(address newImplementation, bytes data) public payable virtual

_Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data.

Calls {_authorizeUpgrade}.

Emits an {Upgraded} event._

Inherited from ERC1967Upgrade

Inherited from IERC1967

Upgraded

event Upgraded(address implementation)

Emitted when the implementation is upgraded.

AdminChanged

event AdminChanged(address previousAdmin, address newAdmin)

Emitted when the admin account has changed.

BeaconUpgraded

event BeaconUpgraded(address beacon)

Emitted when the beacon is changed.

Last updated