Sign a transaction with Metamask
You should see a panel slide in from the right with an error message. The message (in a blue box) basically says you can't perform any actions unless you enable Metamask.
You should see that the final line inside the blue box reads: Please unlock and enable Metamask. Click on enable and open up Metamask again.
You should see a connection request from Aragon. Click on the Connect button to accept it.
Now go back to the Counter app.
In our example, the message says we need to connect MetaMask to the private network.
Remember, Metamask defaults to selecting the main Ethereum network when you make a transaction. But our DAO is actually running on a private local network, not the mainnet.
Remember that using the mainnet requires purchasing ETH with real money. And that using the mainnet or testnets requires us to download the entire past transaction history of the blockchain: this takes a considerable amount of time, and requires a lot of local disk space. In contrast, a private network requires almost no local disk space and can be operated without having to purchase ETH with real money. So it's perfect for rapid experimentation and testing.
Remember, we can connect to a local (private) network by opening up Metamask and selecting Localhost 8545. So let's go ahead and do that.
Close the panel and open MetaMask again. Now, click on the selected network - Main Ethereum Network - and select Localhost 8545 from the dropdown menu that appears.
You should now see that your account has some ETH. Quite a lot in fact. Unfortunately, this is not real ETH, but it will allow you to perform transactions within your local private network (in other words, increment and decrement the counter).
Now, go back to the Counter app, and click on the Increment button again.
This time, instead of an error message, you should see an explanation of the action you are about to perform.
Double check that the action that's about to be triggered is the one you wish to perform. Then click on Create transaction.
The app will now signal to you that it's waiting for your signature.
Open MetaMask again to sign your transaction. You'll be asked to confirm a transaction from Account 1 (your account) to the address of your newly created DAO. The total amount you're sending is about 0.001 ETH: basically just the Gas fee.
In case you're unfamiliar with the concept of Gas, the Gas fee is what's used to incentivize miners to add your transaction to the blockchain. You can think of it as a small tip. Remember that this transaction is taking place on a local (private) network, so this isn't real money. If you're happy with the details of the transaction, click on Confirm.
Now, if you go back to you're first DAO you should see that the counter has finally incremented!
Do you have a question? Leave your comments here at our Discourse forum 👇