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
If it is helpful, I just took your file and cleaned it up a bit. Added some events in but not sure they're on the right track.
Wasn't certain if it needed to be done, but noticed a bunch of the other submissions followed this similar look + feel.
If it's helpful, lmk. If not, no dramas!
Methods
NOTES:
No address can be associated with more than one identity (though addresses may have more than token). Issuance in this circumstance will fail.
One person or business = one entity.
One entity may have many tokens across many addresses; they can mint and burn tokens tied to their verification status at will.
Two token types: control & non-control. Both carry compliance proof.
control tokens let their holders mint and burn (within the same entity).
non-control tokens are solely for compliance queries.
A lock on the entity is used instead of token revocation to remove the cash burden assumed by a customer to redistribute a fleet of coins.
All country codes should be via ISO-3166-1
Any (non-view) methods not explicitly marked idempotent are not idempotent.
isYes
Query api: returns true if the specified address has the given country/yes attestation. this
is the primary method partners will use to query the active qualifications of any particular address.
If it is helpful, I just took your file and cleaned it up a bit. Added some events in but not sure they're on the right track.
Wasn't certain if it needed to be done, but noticed a bunch of the other submissions followed this similar look + feel.
If it's helpful, lmk. If not, no dramas!
Methods
NOTES:
Any (non-view) methods not explicitly marked idempotent are not idempotent.
isYes
Query api: returns true if the specified address has the given country/yes attestation. this
is the primary method partners will use to query the active qualifications of any particular address.
requireYes
Same as
isYes
except as an imperative.getYes
Retrieve all YES marks for an address in a particular country.
_validatorEntityId
the validator ID to consider. Or, use 0 for any of them._address
- The validator ID to consider, or 0 for any of them._countryCode
- The ISO-3166-1 country codeExcluding this?
// function getCountries(uint256 _validatorEntityId, address _address) external view returns(uint16[] /* memory */);
mint
Create new tokens. Fail if
_to
already belongs to a different entity and caller is not validator._control
- True if the new token is a control token (can mint, burn). aka NOT limited._entityId
- The entity to mint for, supply 0 to use the entity tied to the callermint (Shortcut)
Shortcut to mint() + setYes() in one call, for a single country.
burn
Destroys a specific token.
burnEntity
Destroys the entire entity and all tokens.
setYes
Adds a specific attestations (yes) to an entity. Idempotent: will return normally even if the mark was already set by this validator
clearYes (Validator-Entity)
Removes a attestation(s) from a specific validator for an entity. Idempotent.
clearYes (Country-Entity)
Removes all attestations in a given country for a particular entity.
clearYes (Entire Entity)
Removes all attestations for a particular entity. Idempotent.
setLocked
Assigns a lock to an entity, rendering all isYes queries false. idempotent */
isLocked
Checks whether or not a particular entity is locked.
isFinalized
Returns true if the specified token has been finalized (cannot be moved) */
finalize
Finalizes a token by ID preventing it from getting moved. idempotent */
getEntityId
The entity ID associated with an address (or fail if there is not one) */
Events
Mint
MUST trigger when tokens are minted, including zero value transfers.
A contract which creates new tokens SHOULD trigger a Transfer event with the
_from
address set to0x0
when tokens are created.Burn
MUST trigger when entity or tokens are burned.
An entity which burns tokens SHOULD trigger a Burn event with the
_from
address set to0x0
when anything is burned.Locked
MUST trigger when entity is locked.
Finalize
MUST trigger when a Token is finalized.
Tokens SHOULD trigger a Finalize event with the
_tokenId
being set to0x0
when tokens are created.Solidity Interface
Implementation
A draft implementation covering the entirety of this spec is located here.
The text was updated successfully, but these errors were encountered: