I have a structure that looks like this:
struc = sp.TRecord( addr = sp.TAddress, value = sp.TNat ) struct2 = sp.big_map( tkey=sp.TAddress, tvalue=sp.TMap( sp.TNat, sp.TMap( sp.TNat, struct) ) )
How can I add a new struct to my struct2? When I write
def addStruct(self, addr, id1, id2, ele): sp.set_type(ele, struct) self.data.userStakeLockPack[addr][id1][id2] = ele
I cannot originate my contract because of illtype. Why? Thanks.