I found some differences between the testnet and the devnet on how the extend_from_slice
on VecMapper works. It works ok on the devnet, but the same endpoint/function in the same SC breaks on the testnet. I wonder why.
Here is the function which fails: https://github.com/juliancwirko/elven-nft-minter-sc/blob/main/src/lib.rs#L273
What is strange, on the testnet, it breaks only for the passed value bigger than 64.
Here are the results of the same Smart Contract, the same code, the same endpoint, and sent data :
- testnet (works ok for passed 64 or less as argument): https://testnet-explorer.elrond.com/transactions/afdb120f1b807a084a56b6ecc126ff859a2f4f54dd14a11479f1a7e92929a878
- testnet (fails for passed 65 or more as argument): https://testnet-explorer.elrond.com/transactions/868b74ce8ecb8d25221949fdee1594bb5633694ec7c47e5a41dc362f9b2965ae
- devnet (works ok for passed 5000 as argument): https://devnet-explorer.elrond.com/transactions/dce0b5dcde35dfa159a55524949321bbd0521c62d38fdf6353d883e6c230e006
What works for both environments is not using the extend_from_slice
but instead pushing directly to the VecMapper, which consumes a lot of gas, over two times more.
The error data:
- identifier: signalError
- in topics: execution failed