The Ethereum Box dApp 📦

We're interacting live with a contract on the Ethereum blockchain. ⚡🛡️🔗

The contract we're connected to has address on via on the network.

Make sure your MetaMask network is set to Kovan! You can get Eth to use at the Kovan faucet.

Reading values

In the Ethereum Box Box.sol smart contract, there are two uint256 state variables:

The value of publicValue is .

The value of restrictedValue is .

Writing values

Now, let's try set these values.

The storePublic(uint256 newValue) public function is public and has no access control, so can use any account to set this value.

Set value of publicValue:

The storeRestricted(uint256 newValue) public onlyOwner function is access-restricted, so you'll need to be the contract owner to set this value.

Set value of restrictedValue:

Once your transaction is confirmed (typically about 20-30 seconds), click Reload Values above to see the if you successfully changed the values.