Sponsor Guidelines

Introduction

Any registered user of Nodereal can become a gas sponsor on the MegaFuel. It empowers users to create and manage their own gas sponsorship, known as sponsor policies. This guide outlines the sponsor registration process and provides instructions for effective utilization of MegaFuel.

Note: At present, during the beta phase, policies can only be created by the system after a sponsor initiates an application.

Registration Process

Become a MegaNode User

  1. Go to https://nodereal.io/meganode
  2. Navigate to the login page and select the "Login with GitHub" option.
  1. Choose to create an API key, input a key name and notes, then click "save".
  1. Now you have your first API key, which will be used later to manage policy.
  1. Click the API Key row to access the key details.

Never share the API key to others and keep it secret. If the API key is leaked, others might be able to manage the paymaster policies.

Applying to Become a Sponsor

  1. Visit the google form
  2. Complete the application form, ensuring you enter the email address associated with your Meganode account.

At present, all transaction fees associated with sponsored transactions are covered by BNB Chain funding. Therefore direct policy creation by sponsors is not available. Policies are created and primarily managed by system after being approved.

Review Process

  1. The team will review application within 2-3 business days.
  2. Upon approval, the sponsor policy will be created and you'll receive a confirmation email with further instructions.

Usage Guide

Once the sponsor policy is created, sponsor will received a sponsor policy UUID. Sponsor can manage the policy through API according to the UUID.

Add account to the policy whitelists

See API Reference pm_addToWhitelist

Here are some example:

  • Add "From addresses" into whitelist, only transactions originating from addresses included in this predefined whitelist will be eligible for gas fee sponsorship.
curl --location 'https://open-platform.nodereal.io/{$apikey}/megafuel' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "pm_addToWhitelist",
    "params": [
        {
            "policyUuid": "a2bb7201-a665-4d85-9d6b-860ca5e40e5b",
            "whitelistType": "FromAccountWhitelist",
            "values": ["0xBbE8831B3355cDca061B9491f48D39481449991d", "0xeD24FC36d5Ee211Ea25A80239Fb8C4Cfd80f12Ee"]
        }
    ]
}'
curl --location 'https://open-platform.nodereal.io/{$apikey}/megafuel' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "pm_addToWhitelist",
    "params": [
        {
            "policyUuid": "a2bb7201-a665-4d85-9d6b-860ca5e40e5b",
            "whitelistType": "FromAccountWhitelist",
            "values": ["0xBbE8831B3355cDca061B9491f48D39481449991d", "0xeD24FC36d5Ee211Ea25A80239Fb8C4Cfd80f12Ee"]
        }
    ]
}'
  • Add "To addresses" into whitelist, this whitelist restricts the smart contract addresses that sponsored transactions can interact with.
curl --location 'https://open-platform.nodereal.io/{$apikey}/megafuel' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "pm_addToWhitelist",
    "params": [
        {
            "policyUuid": "a2bb7201-a665-4d85-9d6b-860ca5e40e5b",
            "whitelistType": "ToAccountWhitelist",
            "values": ["0xBbE8831B3355cDca061B9491f48D39481449991d", "0xeD24FC36d5Ee211Ea25A80239Fb8C4Cfd80f12Ee"]
        }
    ]
}'
  • Add "ContractMethodSig" into whitelist, this whitelist restricts the contract methods that sponsored transactions can call.
curl --location 'https://open-platform.nodereal.io/{$apikey}/megafuel' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "pm_addToWhitelist",
    "params": [
        {
            "policyUuid": "a2bb7201-a665-4d85-9d6b-860ca5e40e5b",
            "whitelistType": "ContractMethodSigWhitelist",
            "values": ["0xa9059cbb"]     // method signatures, e.g. 0xa9059cbb means "transfer"
        }
    ]
}'
  • Add "BEP20Receivers" into whitelist, this whitelist restricts the token receiver addresses for sponsored transactions when the contract is ERC20 transfer.
curl --location 'https://open-platform.nodereal.io/{$apikey}/megafuel' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "pm_addToWhitelist",
    "params": [
        {
            "policyUuid": "a2bb7201-a665-4d85-9d6b-860ca5e40e5b",
            "whitelistType": "BEP20ReceiverWhiteList",
            "values": ["0xBbE8831B3355cDca061B9491f48D39481449991d", "0xeD24FC36d5Ee211Ea25A80239Fb8C4Cfd80f12Ee"]
        }
    ]
}'

Remove items from policy whitelists

See API Reference pm_rmFromWhitelist

Empty the policy whitelists

See API Reference pm_emptyWhitelist

List policy whitelists

See API Reference pm_getWhitelist

Upcoming Features...

  • Accessing the Console
  • Viewing Existing Policies
  • Modifying Policy Rules
  • Monitoring Sponsorship Activity