Gas fee sponsorship may fail in Conflux Studio v0.5.0

There’s an error when I set sponsor for collateral. It said that the smart contract execution error or insufficient gas fee. Is this due to gaslimit?

We tested and located the issue, and confirmed that the reason is that the function name of SponsorWhitelistControl in Conflux v1.0 or higher changed from “snake case” into “camel case”, while in the latest Conflux Studio (v0.5.0), the default SponsorWhitelistControl function name is still “snake case”.

We will fix this issue in the next version. Before that, we set a temporary solution for sponsorship:

[
  {
    "constant": false,
    "inputs": [
      {
        "internalType": "address[]",
        "name": "",
        "type": "address[]"
      }
    ],
    "name": "addPrivilege",
    "outputs": [],
    "payable": false,
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "constant": false,
    "inputs": [
      {
        "internalType": "address[]",
        "name": "",
        "type": "address[]"
      }
    ],
    "name": "removePrivilege",
    "outputs": [],
    "payable": false,
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "constant": false,
    "inputs": [
      {
        "internalType": "address",
        "name": "contract_addr",
        "type": "address"
      }
    ],
    "name": "setSponsorForCollateral",
    "outputs": [],
    "payable": true,
    "stateMutability": "payable",
    "type": "function"
  },
  {
    "constant": false,
    "inputs": [
      {
        "internalType": "address",
        "name": "contract_addr",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "upper_bound",
        "type": "uint256"
      }
    ],
    "name": "setSponsorForGas",
    "outputs": [],
    "payable": true,
    "stateMutability": "payable",
    "type": "function"
  }
]

Meanwhile, you need to know that you should enter a value in “CFX to Transfer”. If you leave it blank, it will fail.

error