IAsset
Last updated
Was this helpful?
Last updated
Was this helpful?
Interface for the Asset contract, defining the essential functions and events.
See https://eips.ethereum.org/EIPS/eip-7752
Returns the name of the asset.
Returns
<none>
string
The name of the asset.
Returns the prefix of the asset.
Returns
<none>
string
The prefix of the asset.
Sets the name of the asset.
Parameters
_name
string
The name of the asset.
Sets the prefix of the asset.
Parameters
_prefix
string
The prefix of the asset.
Creates a brand-new lot (e.g., an initial issuance) for a user.
Parameters
owner
address
The owner of the lot.
quantity
uint96
The total quantity for this lot.
paymentCurrency
address
The payment currency for this lot.
costBasis
uint96
The cost basis per unit.
acquisitionDate
uint64
The original acquisition date.
uri
string
The URI of the lot.
data
bytes
Additional data associated with the lot.
Returns
lotId
bytes32
The unique ID of the new lot.
Transfers a lot or partial lot from 'from' to 'to', physically/fully (raw).
Parameters
lotId
bytes32
The ID of the lot to transfer from.
to
address
The new owner.
quantity
uint96
The quantity to transfer.
uri
string
The URI of the lot.
data
bytes
Additional data associated with the transfer.
Transfers a lot or partial lot from 'from' to 'to', physically/fully (raw).
Parameters
lotId
bytes32
The ID of the lot to transfer from.
from
address
The current owner of the lot.
to
address
The new owner.
quantity
uint96
The quantity to transfer.
uri
string
The URI of the lot.
data
bytes
Additional data associated with the transfer.
Creates a new lot as a child of an old lot, typically used for spin-offs, cost basis corrections, partial reclassifications, etc.
Parameters
oldLotId
bytes32
The old lot to be adjusted.
newQuantity
uint96
The quantity for the new lot.
newCostBasis
uint96
The cost basis for the new lot.
newUri
string
The URI for the new lot.
newData
bytes
Additional data associated with the new lot.
reason
string
A short string explaining the adjustment type.
Returns
newLotId
bytes32
The ID of the newly created lot.
Returns the stored data for a specific lot.
Parameters
lotId
bytes32
The lot ID to query.
Returns
parentLotId
bytes32
Hash of the parent lot, or 0x0 if none.
isValid
bool
Whether the lot is active.
quantity
uint96
The quantity.
paymentCurrency
address
The payment currency for this lot.
costBasis
uint96
The cost basis.
acquisitionDate
uint64
The original acquisition timestamp (unmodified).
lastUpdate
uint64
The last time this lot was updated.
uri
string
The URI of the lot.
data
bytes
Additional data associated with the lot.
Emitted when a new lot is created (initial issuance or partial sale).
Parameters
owner
address
The user who owns this lot.
lotId
bytes32
The unique hash-based identifier of the lot.
parentLotId
bytes32
The lotId from which this lot originated (0x0 if none).
quantity
uint96
The quantity in this new lot.
paymentCurrency
address
The payment currency used for this lot.
costBasis
uint96
The cost basis per unit.
acquisitionDate
uint64
The original acquisition date of the lot.
lastUpdate
uint64
The timestamp when this lot was created/updated.
uri
string
The URI of the lot.
data
bytes
Additional data associated with the lot.
Emitted when a lot is transferred from one owner to another.
Parameters
lotId
bytes32
The ID of the lot being transferred.
from
address
The address transferring the lot.
to
address
The address receiving the lot.
quantity
uint96
The quantity being transferred.
uri
string
The URI of the lot.
data
bytes
Additional data associated with the transfer.
Emitted when a lot is adjusted, creating a new lot from an old one.
Parameters
oldLotId
bytes32
The ID of the original lot.
newLotId
bytes32
The ID of the new adjusted lot.
operator
address
The address performing the adjustment.
newQuantity
uint96
The new quantity of the adjusted lot.
newCostBasis
uint96
The new cost basis of the adjusted lot.
newUri
string
The URI of the new lot.
newData
bytes
Additional data associated with the new lot.
reason
string
The reason for the adjustment.
Emitted when a lot is invalidated.
Parameters
lotId
bytes32
The ID of the lot being invalidated.
Emitted when an operator is approved for all owned lots.
Parameters
owner
address
The owner of the lot.
operator
address
The operator being approved.
approved
bool
Whether the operator is approved.
Emitted when a lot is approved for a specific operation.
Parameters
lotId
bytes32
The ID of the lot being approved.
owner
address
The owner of the lot.
spender
address
The spender being approved.
amount
uint96
The amount being approved.