ERC721's transfer function to revert. This allows for the user to hold a token indefinitely, but it also binds the asset to the user's private key. If a user or institution loses access to their wallet, that asset is permanently unrecoverable. However, with an ABT, the token can be revoked and reassigned (granted they prove their identity/ownership first).
ERC721Metadatawhich wallets will already be familiar with.
checkUserIsWhiteListed(address user)function that returns a boolean and checks to see that the user has staked greater than the
minStakeAmountin order to return true.
supportsInterface()with takes in a
bytes4 interfaceIdas the parameter. The interfaceId is the 8bit hex string for the calldata of the function. The purpose of this method is for a contract to "ask" a second contract if it supports a specific method. This prevents sending tokens to a contract that cannot read them. For example, sending an
ERC1155token to an
ERC20contract would leave them stuck.
keccak256("tokenByIndex(uint256)") == '0xasdfasdf"
Licensehas two main events;
emergencyWithdraw()function that first checks for stuck tokens by subtracting the
dimoTotalAmountStakedvalue from the total number of DIMO held on the contract. The returning value is only ever positive when the user accidentally sends tokens directly rather than interacting with the
EmergencyWithdrawal(user,amount)event is emitted.