ILicense
Functions
signLicense
Allows a user to sign the current license.
function signLicense(bytes calldata signature) external;contentURIHash
Returns the hash of the current license URI.
function contentURIHash() external view returns (bytes32);licenseURI
Returns the URI of the current license.
function licenseURI() external view returns (string memory);licenseURIOf
Returns the URI of a specific license version.
function licenseURIOf(uint256 version) external view returns (string memory);licenseVersion
Returns the current license version.
function licenseVersion() external view returns (uint256);hasSignedCurrentLicense
Returns true if the account has signed the current license version.
function hasSignedCurrentLicense(address account) external view returns (bool);Events
LicenseSigned
Emitted when an account signs a license version.
event LicenseSigned(address indexed account, uint256 indexed version);LicenseURIUpdated
Emitted when a new license URI is set.
event LicenseURIUpdated(uint256 indexed version, string indexed uri, bytes32 indexed contentHash);LicenseSignatureRevoked
Emitted when a license signature is revoked.
event LicenseSignatureRevoked(address indexed account, uint256 indexed version);Errors
License__AlreadySigned
error License__AlreadySigned();License__InvalidURI
error License__InvalidURI();License__NotSigned
error License__NotSigned();License__NoLicenseToSign
error License__NoLicenseToSign();License__SignatureNotFound
error License__SignatureNotFound();License__InvalidSignature
error License__InvalidSignature();