CUBE3 Documentation
  • CUBE3 Documentation
  • Detect Products
    • Inspector
    • Monitor
    • Sonar
      • Sonar Feeds
  • Protect Products
    • RASP
      • Quick Start
        • ERC-20 Non-Upgradeable (Foundry)
        • ERC-20 Non-Upgradeable (Hardhat)
        • ERC-20 Upgradeable (Foundry)
        • ERC-20 Upgradeable (Hardhat)
      • RASP Integration
        • 1. Installation
        • 2. Integration
        • 3. Deployment
        • 4. Registration
        • 5. Interaction
        • 6. Inspection
      • CUBE3 Protocol
      • CUBE3 SDK
  • Manage Products
    • Transactions
    • Alerts
      • Email Integration
      • Slack Integration
      • Telegram Integration
      • Discord Integration
      • Webhook Integration
    • Rules
  • API Documentation
    • Inspector API
    • Validation API
      • Troubleshooting
    • Management API
      • Monitor API
      • Alert API
      • Control lists API
    • Authentication
    • API Rate Limits
  • Risk Engine
    • Risk Scoring Introduction
    • Risk Scoring Detailed Overview
  • Settings
    • Billing
    • Organization
    • API Keys
  • Supported Blockchain Networks
    • CUBE3 Detect Products
    • CUBE3 Protect Products
  • Testing Guide
Powered by GitBook
On this page
  • Contents
  • Intro
  • Register with CUBE3 backend
  • Registering with CUBE3 Router
  1. Protect Products
  2. RASP
  3. RASP Integration

4. Registration

Learn about registering your protected smart contracts

Previous3. DeploymentNext5. Interaction

Last updated 9 months ago

Contents

Intro

Since the CUBE3 RASP product blocks transactions on both off-chain and on-chain, your protected contracts must be registered on both:

  1. CUBE3 backend (with an HTTP request) for validation and cube3SecurePayload generation

  2. 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:

Register with CUBE3 backend

To register your deployed contract (for more information about deployment, read ) head over to where you will see the following:

Press Register your contract and you will be prompted with the following:

Input:

  1. A name for your contract

  2. Address of your deployed contract (for upgradeable contracts, input proxy address)

  3. 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.

Registering with CUBE3 Router

  • 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:

cast sig "mintCube3Protected(address,uint256,bytes)"     //0xdfda26cd
cast sig "transferCube3Protected(address,uint256,bytes)" //0x11fb5122

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.

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 .

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 and select registerIntegrationWithCube3. You will need to provide:

At this point, you are finished and ready to do your first CUBE3 Protected transaction (read more ).

here
https://sepolia.etherscan.io/address/0xB7a8c55aFe1B210ef37349574484CEdA2122D698#writeProxyContract
here
here
https://panorama.cube3.ai/rasp-pro
Intro
Registering with CUBE3 backend
Registering with CUBE3 Router