Interact with your first public contract

So now, your first public smart contract is deployed and it is ready to go. You will see the following screen with the address of the deployed smart contract. The address is “0x93cf3019f7c736fbc04f0e27068349e4981eba98”.

Ensure that your account is kept unlocked as described in the previous page.

  • You can expand the view on the remix window and check the available options to execute.

The available options are

a. addInvoice for “Write Transactions” with orange colour

b. getInvoiceID for “Read Transactions” with blue colour

c. isHasExists for “Read Transactions” with blue colour

  • Try adding a new invoice to the smart contract ‘Invoice’ Invoice ID - ‘4001’ Invoice Hash - ‘0xf43afedc588047be360eb

The green icon means that the transaction went through fine and now, one invoice is being added to our Invoice smart contract.

  • Now, you can simply verify whether any invoice existed with the hash ‘0xf43afedc588047be360eb’. It returns true.

Now, next is to enquire the invoice ID to the blockchain with the given hash ‘0xf43afedc588047be360eb’

This screenshot shows that the invoice ‘4001’ is corresponding to the given hash exists in the smart contract.