Create A Contract

Published by Marianne Poser on

Last Updated on 22. May 2023 by Marianne Poser

1st Step: Open the Remix page in your browser (https://remix.ethereum.org ) and create a new Solidity file. In our example, we name the file “TreasureBox.sol”.

2nd Step: In the newly created file, we now create the contract at first without content. The contract name is assigned, which corresponds to the file name. Additionally, the version pragma for the compiler must be defined.

3rd Step: Our new contract becomes an ERC1155 contract by first importing the ERC1155 contract from OpenZeppelin and defining the contract as ERC1155. In addition, the associated (imported) constructor is called in the contract. Within the constructor, the URI of your project is already passed. (The given URI is only for test purposes and is not a real project! – Choose your own!) Behind this address, information about the tokens can be stored, e.g., image data of NFTs.

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: