Ricardian Contract Interoperability | by Sean Lawless | Mar, 2022

The transactional flow through the smart contracts to configure the KYC/AML service for company XYZ that has joined Immutable.
Client ABC having their signed KYC information tokenized by company XYZ.
      // Check that Ricardian client matches the offer's parent
if (theOffer.ricardianParent > 0)
{
require(ricardianClients[i] > 0, "Client required");
uint parentDepth =
creatorTokenInterface.creatorParentOf(
ricardianClients[i],
theOffer.ricardianParent);
require(parentDepth > 0, "Parent not found");
}
else
require(ricardianClients[i] == 0, "Client not allowed");
Financial company A offer their product Asset1 with required KYC.
function _beforeTokenTransfer(address from, address to,
uint256 tokenId)
internal override(ERC721, ERC721Enumerable)
{
// Skip this check when first minting
if (from != address(0))
{
// On exchange (not direct transfer)
// check any required Ricardian contracts
if ((msg.sender != ownerOf(tokenId)) &&
(TokenIdToRicardianParent[tokenId] > 0) &&
(address(creatorInterface) != address(0)))
{
uint hasChild = creatorInterface.creatorHasChildOf(
to, TokenIdToRicardianParent[tokenId]);

require(hasChild > 0,
"Ricardian child agreement not found.");
}
}
}
Exchange an asset with recipient providing KYC upon transfer.

Leave a Comment