EYBlockchain / starlight

:zap: solidity --> zApp transpiler :zap:
Other
188 stars 38 forks source link

Error in SimpleStruct6 #315

Closed lydiagarms closed 3 months ago

lydiagarms commented 3 months ago

We get the following error in SimpleStruct6 (add.mjs line 181):

error: Cannot convert 0x000000000000000000000000000000000000000000000000000000000000000a,0x000000000000000000000000000000000000000000000000000000000000000b to a BigInt SyntaxError: Cannot convert 0x000000000000000000000000000000000000000000000000000000000000000a,0x000000000000000000000000000000000000000000000000000000000000000b to a BigInt

SimpleStruct6:

// SPDX-License-Identifier: CC0

pragma solidity ^0.8.0;

contract Assign {

struct myStruct { uint256 prop1; uint256 prop2; }

secret myStruct public w; secret uint256 public a;

uint256 public index;

function add(secret uint256 value) public { unknown a += index; index++; unknown w.prop1 += value; unknown w.prop2 += index + value; index++; unknown a += value; }

function remove(secret uint256 value) public { index++; unknown w.prop1 -= value; unknown w.prop2 -= value; unknown a -= index; index++; unknown w.prop2 -= index; unknown a -= value; }

}