Replies: 2 comments 2 replies
-
When a contract creates a box, it needs to pay for the space. The contract will check to see if its minimum balance will cover the cost. (For example, you may free box A and then allocate box B, so you don't actually need to increase your MBR.) My guess is that this remote call is creating a box and you need to include a payment to increase it. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Got it. I'll give it a try. Thanks!
2023年4月20日(木) 10:49 Jay McCarthy ***@***.***>:
… It would be a pay and you need to compute the correct amount. The mbr
value returned by this function is the amount:
https://github.com/reach-sh/reach-lang/blob/master/js/stdlib/ts/ALGO.ts#L1532
—
Reply to this email directly, view it on GitHub
<#1581 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFQ4AW7AEF6SQ2YZEF2W3D3XCFSJJANCNFSM6AAAAAAXEEB4HE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm making a remote API call, that accesses boxes in its consensus block. There is an
Logic eval error: - would result negative
error when trying to access boxes with a map defined asconst aM = new Map(Tuple(Address, Address), UInt)
using the ALGO connector.The line in the test script is here
https://github.com/nash-protocol/starter-kit/blob/main/index.mjs#L199
In the remote contract we have
In the contract that is calling the remote app we have
The error occurs when trying to make a remote call to can app using a map keyed with by an address tuple of size 2.
Does anyone know what might be missing to avoid this type of error?
Beta Was this translation helpful? Give feedback.
All reactions