ERC777
If you haven't already, you could start with with ERC777
I did a simple ERC777 token example
ERC1400/ERC140
I am completely new to security tokens, including ERC1400/ERC1410
Regards the contract you provided, I assume you have flattened the ConsenSys implementation.
Tests are normally a good place to look for potential values to use.
https://github.com/ConsenSys/ERC1400/blob/master/test/ERC1400.test.js
this.token = await ERC1400.new('ERC1410Token', 'DAU', localGranularity, [controller], CERTIFICATE_SIGNER, partitions);
Based on the documentation, I assume the following for the constructor:
name
: Name of the token. (see IERC777.name())symbol
: Symbol of the token, usually a shorter version of the name (see IERC777.symbol())granularity
: Granularity of the token. The smallest part of the token that is not divisible. This means all token operations (creation, movement and destruction) must have amounts that are a multiple of this number.
For most token contracts, this value will equal 1. (see IERC777.granularity())
(the tests for the ConsenSys implementation use 10: https://github.com/ConsenSys/ERC1400/blob/master/test/ERC1400.test.js)controllers
: Array of initial controllers.
https://github.com/ethereum/EIPs/issues/1411
ERC-1644: Controller Token Operation Standard
Since security tokens are subject to regulatory and legal oversight (the details of which will vary depending on jurisdiction, regulatory framework and underlying asset) in many instances the issuer (or a party delegated to by the issuer acting as a controller, e.g. a regulator or transfer agent) will need to retain the ability to force transfer tokens between addresses.
These controller transfers should be transparent (emit events that flag this as a forced transfer) and the token contract itself should be explicit as to whether or not this is possible.
certificateSigner
Address of the off-chain service which signs the conditional ownership certificates required for token transfers, issuance, redemption (Cf. CertificateController.sol).
The ConsenSys implementation in the repository doesn't include an implementation of the CertificateController, only a mock.
https://github.com/ConsenSys/ERC1400
PS: Since the ERC1400 standard is agnostic about the way to control certificate, we didn't include our certificate controller in this repository (a mock is used instead). In order to perform real advanced conditional ownership, a certificate controller called 'CertificateController.sol' shall be placed in folder '/contracts/CertificateController' instead of the mock placed there.
-
tokenDefaultPartitions
https://github.com/ethereum/EIPs/issues/1410
... support an owners tokens being grouped into partitions, with each partition being represented by an identifying key and a balance.
Tokens are operated upon at a partition granularity, but data about the overall supply of tokens and overall balances of owners is also tracked.https://github.com/open-esq/Digital-Organization-Designs/blob/master/ERC1400.sol
/**
* [NOT MANDATORY FOR ERC1400 STANDARD]
* @dev Get token default partitions to send from.
* Function used for ERC777 and ERC20 backwards compatibility.
* For example, a security token may return the bytes32("unrestricted").
* @return Default partitions.
*/
function getTokenDefaultPartitions() external view returns (bytes32[]) {
return _tokenDefaultPartitions;
}
I assume that for an initial value you could set a single global default partition to: bytes32("unrestricted")
The Dauriel network demo video had partitions of Reserved, Locked and Issued. (As does the tests for the ConsenSys implementation: https://github.com/ConsenSys/ERC1400/blob/master/test/ERC1400.test.js)
Hope this helps.