App_global_get error - Algorand

App_global_get error

post by erdifree on Mar 7, 2024

Hello. I find myself in a very strange situation. At the moment of deploying the smart contract, passing 2 appargs, I am able to deploy successfully and read the two values in the global state. One is a unit64 and the other is an address. When I call the method that returns these values, the first unit64 is returned successfully, but the address gives me a problem like this: ABIEncodingError("input string was not fully consumed: b'ZGIMBLRFF4QM7CMBUBUSK67LZ4TLO7LTULVX2OHVH2FQ77TE7KM5MKJQFU\\x00\\x00\\x00\\x00\\x00\\x00\\x06\\x0e'"). I will now post the two methods in question:

deploy:

deply:
    byte "royalty_basis"
    txna ApplicationArgs 0
    btoi
    app_global_put

byte "royalty_receiver"
    txna ApplicationArgs 1
    app_global_put
    int 1
    return

// get_royalty_receiver

getroyaltyreceiver_16:
    byte "royalty_receiver"
    app_global_get
    int 1
    return

144 views

Reply