cic-contracts/doc/texinfo/seal.sol.texi

32 lines
1.1 KiB
Plaintext
Raw Normal View History

2023-03-26 13:04:31 +02:00
@subsection Seal
Some smart contract parameters may need to be mutable over part of a smart contract's lifetime.
This interface provides a method to explicitly signal when certain parameters have been rendered immutable.
The value of @code{sealState()} @emph{must not} decrease, and must not exceed @code{maxSealState}.
@code{maxSealState} is used to define that @emph{all mutable parameters} have been rendered immutable. The practical implications of this will vary between contracts.
The implementer is encouraged to use simple, descriptive names in the source code to describe the applicable seal states.
Use cases of sealing include:
@itemize
@item
Whether more tokens can be minted
@item
Allow ownership of a contract to be transferred
@item
The expiry time of a token (see @code{Expire})
@end itemize
@table @dfn
@item ERC165 Interface identifier
@include ../../build/Seal.interface
@item Solidity interface definition
@include ../../build/contract_Seal.texi
@item Example implementation
@uref{https://git.grassecon.net/cicnet/erc20-demurrage-token.git}
@end table