Compliance

Description of the Compliance Smart Contract

Functions

canTransfer

Checks that the transfer is compliant.
default compliance always returns true
READ ONLY FUNCTION, this function cannot be used to increment counters, emit events, ...
parameter 1 : _from The address of the sender
parameter 2 : _to The address of the receiver
parameter 3 : _amount The amount of tokens involved in the transfer

function canTransfer(
address _from, 
address _to, 
uint256 _amount
) external view returns (bool);

transferred

Function called whenever tokens are transferred from one wallet to another
this function can update state variables in the compliance contract
these state variables being used by canTransfer to decide if a transfer is compliant or not depending on the values stored in these state variables and on the parameters of the compliance smart contract
parameter 1 : _from The address of the sender
parameter 2 : _to The address of the receiver
parameter 3 : _amount The amount of tokens involved in the transfer

function transferred(
address _from, 
address _to, 
uint256 _amount
) external;

created

Function called whenever tokens are created on a wallet
this function can update state variables in the compliance contract
these state variables being used by canTransfer to decide if a transfer is compliant or not depending on the values stored in these state variables and on the parameters of the compliance smart contract
parameter 1 : _to The address of the receiver
parameter 2 : _amount The amount of tokens involved in the transfer

function created(
address _to, 
uint256 _amount
) external;

destroyed

Function called whenever tokens are destroyed
This function can update state variables in the compliance contract
these state variables being used by canTransfer to decide if a transfer is compliant or not depending on the values stored in these state variables and on the parameters of the compliance smart contract
parameter 1 : _from The address of the receiver
parameter 2 : _amount The amount of tokens involved in the transfer

function destroyed(
address _from, 
uint256 _amount
) external;

transferOwnershipOnComplianceContract

Function used to transfer the ownership of the compliance contract to a new owner, giving him access to the OnlyOwner functions implemented on the contract
parameter 1 : newOwner The address of the new owner of the compliance contract
This function can only be called by the owner of the compliance contract
emits an OwnershipTransferred event

function transferOwnershipOnComplianceContract(
address newOwner
) external;