Getting Started
The Getting Started section provides instructions for developers to start using the Molecule Protocol. It includes installation and setup instructions for the Molecule Protocol and a quick start guide
Installation and setup instructions
General AML Molecule contract
Molecule Protocol provides two options for installation and setup.
The first option is to use the already deployed General AML (Anti-Money Laundering) Molecule Controller smart contract, which is regularly updated by the Molecule oracle. This smart contract has a check()
function that takes an Ethereum address and a region ID array (country code as per M49 code UN statistics) as input parameters. It returns true if the account/address is not sanctioned under any of these input IDs, and false if the account is sanctioned under any of the IDs.It also has a check() that takes the Ethereum address as input and will check the address sanction status against a preset list of country codes, users can use either of these two to check the status of an address.
The second option is to use the Molecule Smart Contract template and deploy your own Controller (i.e. Molecule Controller Smart Contract) and integrate several Logic contracts, such as MoleculeLogicList
or MoleculeLogicNFT
, to that controller.
This allows for more customised rule engines for your specific use case. The IMoleculeController
interface can be imported into your smart contract, and an instance of the MoleculeController
smart contract can be created to call the check function inside a require statement to allow access to functions inside the smart contract.
Deploying a Custom Controller Smart Contract:
Create your own Controller smart contract using the
MoleculeController
template.Deploy the
Controller
smart contract to the EVM network.Deploy the
Logic*
Contracts to the EVM network.Integrate the
Logic*
contracts for the specific use case, such asMoleculeLogicList
orMoleculeLogicNFT
ontoMolecule Controller
smart contract.Import the interface for your custom controller smart contract into your DApp or smart contract code.
Create an instance of your custom controller smart contract.
Call the
check
function with appropriate input parameters to perform the desired compliance checks.
Quick start guide
Using the General Sanction List:
To use the General Sanction List provided by Molecule, import the IMoleculeController.sol
interface into your smart contract.
Create an instance of the General sanctions MoleculeController smart contract using the below smart contracts
General Sanctions Molecule Controller
Goerli
General Sanctions Molecule Controller
Sepolia
Call the check()
function on the MoleculeController smart contract with the regional ID array uint as the first parameter and ethereum address you want to check as the second parameter. Or you can use the preset list by passing the ethereum address only
Steps
Import the
IMoleculeController
interface into your smart contract.Create an instance of the
MoleculeController
smart contract.Call the
check
function inside arequire
statement to ensure the address is not sanctioned.Allow access to your functions inside the smart contract.
Last updated