I am trying to call "balance_of" entrypoint of fxhash contract (in ghostnet).
Deployed contract: https://better-call.dev/ghostnet/KT1FqmrtKA4Pz4cNDsikt8qrwEg8pdSCpYug/interact/check
I used "tz1QeSqtvZkW8drygD3h6oaEqPKq6Lhu4UKF" & "1031" because these parameters were used in previous successful balance_of call.
here is code:
@sp.entry_point
def ballance(self, params):
sp.for x in params:
self.data.exist = x.balance
@sp.entry_point
def check(self):
c = sp.contract(
sp.TRecord(
requests=
sp.TList(
sp.TRecord(
owner=sp.TAddress,
token_id=sp.TNat,
)
),
callback = sp.TContract(
sp.TList(
sp.TRecord(
request = sp.TRecord(
owner=sp.TAddress,
token_id=sp.TNat,
),
balance=sp.TNat
)
)
)
)
,
sp.address("KT1NkZho1yRkDdQnN4Mz93sDYyY2pPrEHTNs"),
entry_point = "balance_of").open_some()
requests = sp.list([sp.record(owner = sp.address("tz1QeSqtvZkW8drygD3h6oaEqPKq6Lhu4UKF"),token_id = 1031)])
params = sp.record(callback = sp.self_entry_point(entry_point ="ballance"), requests = requests)
sp.transfer(params, sp.mutez(0), c)
"ballance" entrypoint working fine when I make a direct call to it manually.
when I make call to "check" entrypoint fails,
in simulation,
A FAILWITH instruction was reached with 19
with temple wallet call,
[ { "kind": "temporary", "id": "proto.013-PtJakart.michelson_v1.runtime_error", "contract_handle": "KT1FqmrtKA4Pz4cNDsikt8qrwEg8pdSCpYug" }, { "kind": "temporary", "id": "proto.013-PtJakart.michelson_v1.script_rejected", "location": 53, "with": { "int": "19" } } ]