You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in EVM chains like LUKSO, an address can point to either a smart contract or an Externally Owned Account.
In a LSP2 schema, the address type is used in instances for metadata keys such as:
LSP5ReceivedAssets
LSP12IssuedAssets
However, in some cases of certain metadata, it might be important to notify strictly that the address MUST BE a smart contract.
Example where contract as value type make sense.
However, an encoding library could ensure that the addresses are actually smart contracts. In the two examples above, this is relevant as a digital has to be a smart contract (for instance, LSP7 or LSP8). In this case, the schema of LSP5 would change as follow.
In other cases, when the specifications want to be loose to allow both either EOAs or Contracts, the address value type can be used. This is the case for instance in LSP6 for AddressPermissions[] can store a list of controllers, where these controllers can be either EOAs or smart contracts.
Additional infos
Libraries like erc725.js could check when encoding at runtime that the address being encoded is actually a smart contract, and for instance fail if it is not.
Such thing could be bypassed, by setting data keys / value pairs manually without such library, but still the library could discard entries that are not a contract from large arrays being read from the ERC725Y storage.
The text was updated successfully, but these errors were encountered:
Proposal
Currently in EVM chains like LUKSO, an
address
can point to either a smart contract or an Externally Owned Account.In a LSP2 schema, the
address
type is used in instances for metadata keys such as:LSP5ReceivedAssets
LSP12IssuedAssets
However, in some cases of certain metadata, it might be important to notify strictly that the address MUST BE a smart contract.
Example where
contract
as value type make sense.However, an encoding library could ensure that the addresses are actually smart contracts. In the two examples above, this is relevant as a digital has to be a smart contract (for instance, LSP7 or LSP8). In this case, the schema of LSP5 would change as follow.
Before
After
Other cases where
address
make senseIn other cases, when the specifications want to be loose to allow both either EOAs or Contracts, the
address
value type can be used. This is the case for instance in LSP6 forAddressPermissions[]
can store a list of controllers, where these controllers can be either EOAs or smart contracts.Additional infos
Libraries like erc725.js could check when encoding at runtime that the address being encoded is actually a smart contract, and for instance fail if it is not.
Such thing could be bypassed, by setting data keys / value pairs manually without such library, but still the library could discard entries that are not a
contract
from large arrays being read from the ERC725Y storage.The text was updated successfully, but these errors were encountered: