Algorand: What is store integer count 7 exceeds schema integer count 6?

223 views Asked by At

I couldn't understand what is the following error in Algorand. I couldn't find a document for this either.

AlgodHTTPError: TransactionPool.Remember: transaction AFARFFGAZE7IXA2ZVPGCNTJVTUHX2IZKVSKY7US24JANRK7LZRXA: logic eval error: store integer count 7 exceeds schema integer count 6. Details: pc=542, opcodes=global CurrentApplicationAddress
callsub label13
app_global_put

Thats the call that I am trying to invoke:

   on_init = Seq(
        Assert(
            And(
                Txn.sender() == Global.creator_address(),
            )
        ), 
        App.globalPut(GlobalState.Variables.asset_id, create_asset(Global.current_application_address())),
        Approve(),
    )
1

There are 1 answers

2
Marckaraujo On BEST ANSWER

Doing some tests I just discovered that Global Variables only had 6 integer positions.

You can modify this by increasing the number of variables:

global_schema = transaction.StateSchema(num_uints=7, num_byte_slices=7)
local_schema = transaction.StateSchema(num_uints=1, num_byte_slices=0)

When creating a smart contract, there is a limit of 64 key-value pairs that can be used by the contract for global storage and 16 key-value pairs that can be used for local storage.