cryptonerdcn

cryptonerdcn

Web3Rover_Homework:1 Reference Answer

Contract address for this test:

https://rinkeby.etherscan.io/address/0x376f029b4ed9096c845453306731d14e9886d79a

Points covered in this practical class:

  1. How to mint NFT and trade copies of the contract without the contract being open source.
  2. How to bypass the quantity limit of minting.
  3. How to interact on-chain directly through HEX Data.

Q1. Identify the missing component that prevents direct interaction with the contract on ethscan:#

A: ABI

Q2: Write the HEX DATA (hexadecimal data) you used for interaction, in the order of the parameters, one parameter per line.#

A:

mint:

0x1b2ef1ca (Method ID)
0000000000000000000000000000000000000000000000000000000000000000 (uint256 id)
0000000000000000000000000000000000000000000000000000000000000001 (uint256 amount)

Prototype: mint(uint256 id, uint256 amount)

The function hash value can be obtained by using keccak256("mint(uint256,uint256)") (1b2ef1ca104ec753c817f038e7e2a0c7cb28cc3c0877c7c2b78e5a14a407a623), and taking the first four bytes gives the function ID 0x1b2ef1ca.

safeTransferFrom:

0xf242432a (Method ID)
address from
address to
0000000000000000000000000000000000000000000000000000000000000000 (uint256 id)
0000000000000000000000000000000000000000000000000000000000000001 (uint256 amount)
`000000000000000000000000000000000000000000000000000000000000

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.