web3wagmi
← All standards

ERC-7390 Vanilla Options for ERC-20 Tokens

DraftERCcreated 2022-09-02requires ERC-20, ERC-1155

An interface for creating, managing, and executing simple time-limited call/put (vanilla) options.

Authors: Ewan Humbert (@Xeway), Lassi Maksimainen (@mlalma)

ERC-165 interface ids

Computed here as the XOR of the selectors each interface defines.

IERC73900xa5f91bd9

Functions this standard introduces (8)

0xd6febde8buy(uint256,uint256)
0x57d682c4cancel(uint256,address)
0x4b849905create((uint8,address,uint256,address,uint256,address,uint256,uint256,uint256,address[]))
0xa86265bbexercise(uint256,uint256)
0x248b761eissuance(uint256)view
0xbe74c737retrieveExpiredTokens(uint256,address)
0x86d1743fupdateAllowed(uint256,address[])
0xdb191d5dupdatePremium(uint256,uint256)

Events (7)

Topic0 is the keccak256 hash of the signature, which is what a log filter matches on.

0x06acbfb32bcf8383f3b0a768b70ac9ec234ea0f2d3b9c77fa6a2de69b919aad1Created(uint256)
0xa2a8034590a15fe810e9813d736096c0a03b3236cecb34b5b9f687ed67a6a624Bought(uint256,uint256,address)
0x0328c770810250ca303b85a612c9103929d1701abdf1dd1114607d139edfbed6Exercised(uint256,uint256)
0xf80dbaea4785589e52984ca36a31de106adc77759539a5c7d92883bf49692fe9Expired(uint256)
0x829a8683c544ad289ce92d3ce06e9ebad69b18a6916e60ec766c2c217461d8e9Canceled(uint256)
0x09cd73f1e5a72a9aa3f9a3be157754c12c33bb354df859c62eb815166deb01cePremiumUpdated(uint256,uint256)
0xbb59c0a2dd285e2ba645e012aa60ff5229253735b31169929c7b6b19ed8f6368AllowedUpdated(uint256,address[])

Custom errors (5)

0xee90c468Forbidden()
0x90b8ec18TransferFailed()
0x195dffd1TimeForbidden()
0xa76218b7AmountForbidden()
0xf4d678b8InsufficientBalance()

Depends on (2)

Proposals this one names in its requires field.

What the specification covers

Compare with

Parsed from the canonical specification · discussion