Skip to content

Instantly share code, notes, and snippets.

@thegostep
Last active November 5, 2018 19:58
Show Gist options
  • Save thegostep/46bd9e7aca5d0fe5799584c061669df6 to your computer and use it in GitHub Desktop.
Save thegostep/46bd9e7aca5d0fe5799584c061669df6 to your computer and use it in GitHub Desktop.

ERC-1400 Base

This base transfer check provides a method for checking static restrictions as well as transfer restrictions. This is in line with ERC-902 proposal.

function canSend(address tokenHolder, uint256 amount) external view returns (byte ESC, bytes32 reason);
function canSend(address from, address to, uint256 amount, bytes data) external view returns (byte ESC, bytes32 reason);

ERC-1400 Extension for differentiated ownership

This extension to ERC-1400 allows for more advanced modelling of the static and transfer restrictions through differentiated ownership.

function canSend(address tokenHolder, bytes32 tranche, uint256 amount) external view returns (byte ESC, bytes32 reason);
function canSend(address from, address to, bytes32 fromTranche, uint256 amount, bytes data) external view returns (byte ESC, bytes32 reason, bytes32 toTranche);
@pakaplace
Copy link

I'm assuming tokenHolderin the first and fourth canSend is the to address? Changing that input name to to or from might reduce ambiguity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment