Call Functions With Parameters

Published by Marianne Poser on

Last Updated on 22. May 2023 by Marianne Poser

1st Step: For checking the mint operations in the constructor, the balanceOf function can be used. Here, an address must be specified as a parameter – in this case, the address of the creator of the contract, which can be copied from the “Account” field.

2nd Step: By expanding the parameters, the address can now be entered, and the parameter id can also be specified. The button “call” triggers the function, and the answer appears again below the line.

3rd Step: As already explained in the theory section, the ERC1155 has batch functions, and these will also be tested here. For the query of the balance of the TokenID 0 and 3 the address (in each case in double quotes, separated by comma!) must be entered twice into the array “accounts” and [0,3] as array into the field ids. As answer you get an array with the number of tokens with ID 0 and the number of tokens with ID 3.

Categories:

https://blockchain-academy.hs-mittweida.de/wp-content/uploads/2021/04/logo_bcam_rgb_gross.png

Welcome

Blockchain Academy

Continue with credential

No account yet?

Powered by Hidy

Register with Hidy


Register
Sign in

We need the following credential to register:

please select:

To create a new account, we need the following data from you:

We would appreciate the following additional information from you for the creation of your account:

Welcome

Blockchain Academy

Continue with credential

Already have an account?

Powered by Hidy

Sign in with Hidy


Register
Sign in

We need the following credential to log in:

please select: