4. Registration
Learn about registering your protected smart contracts
Last updated
Learn about registering your protected smart contracts
Last updated
Since the CUBE3 RASP product blocks transactions on both off-chain and on-chain, your protected contracts must be registered on both:
CUBE3 backend (with an HTTP request) for validation and cube3SecurePayload
generation
CUBE3 protocol (with a transaction to the CUBE3 Router) for decoding cube3SecurePayload
and reverting transactions if they are malicious on-chain
See an example of how to register below:
To register your deployed contract (for more information about deployment, read here) head over to https://panorama.cube3.ai/rasp-pro where you will see the following:
Press Register your contract
and you will be prompted with the following:
Input:
A name for your contract
Address of your deployed contract (for upgradeable contracts, input proxy address)
Chain
Press Add contract
.
Initially, your contractIntegration Status
will be Pending
until we detect your contract on-chain, eventually it will process and say Not Registered
. Click on your contract to expand it:
Click Reveal Registration Token
and save it somewhere, we will use it in the next step.
To register your contract with CUBE3 Protocol on-chain, you will need to call registerIntegrationWithCube3
function on the CUBE3 router contract. You can find CUBE3 Router addresses for all supported chains here.
For simplicity, to interact with the CUBE3 router contract - we suggest you to use etherscan since all CUBE3 contracts are verified. For example, for sepolia - head over to https://sepolia.etherscan.io/address/0xB7a8c55aFe1B210ef37349574484CEdA2122D698#writeProxyContractand select registerIntegrationWithCube3
. You will need to provide:
Your deployed contract address
Registration token (the one you saved on previous registration step)
Function selectors that you wish to protect (you will be able to disable protection later).
To generate function selectors simply run in your console:
Add necessary information and press Write
. Make sure you do the transaction as the admin of the contract:
Registration on both CUBE3 backend and CUBE3 Protocol is now done.
Go back to your RASP dashboard and you will see Integration Status
of your contract to Registered
and function protection On
. If you expand your contract you will be able to see function selectors that have protected.
At this point, you are finished and ready to do your first CUBE3 Protected transaction (read more here).