Skip to content

Commit 48a0016

Browse files
authored
Merge pull request #88346 from PatAltimore/patricka-blockchain-remix
Update remix UI for blockchain quickstart
2 parents ec0838b + 7824f3c commit 48a0016

File tree

8 files changed

+12
-15
lines changed

8 files changed

+12
-15
lines changed

articles/blockchain/service/connect-metamask.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: azure-blockchain
55
keywords:
66
author: PatAltimore
77
ms.author: patricka
8-
ms.date: 05/02/2019
8+
ms.date: 09/12/2019
99
ms.topic: quickstart
1010
ms.service: azure-blockchain
1111
ms.reviewer: jackyhsu
@@ -58,20 +58,13 @@ You need the Azure Blockchain Service endpoint address to connect to the blockch
5858
Remix is a browser-based Solidity development environment. Using MetaMask and Remix together, you can deploy and take actions on smart contracts.
5959

6060
1. In your browser, navigate to `https://remix.ethereum.org`.
61-
1. Select **Run**.
62-
63-
MetaMask sets your **Environment** to **Injected Web3** and **Account** to your network.
64-
65-
![Run tab](./media/connect-metamask/injected-web3.png)
66-
67-
1. Select **Create new file**.
61+
1. Select **New file** in the **Home** tab under **File**.
6862

6963
Name the new file `simple.sol`.
7064

7165
![Create file](./media/connect-metamask/create-file.png)
7266

7367
Select **OK**.
74-
7568
1. In the Remix editor, paste in the following **simple smart contract** code.
7669

7770
```solidity
@@ -95,14 +88,18 @@ Remix is a browser-based Solidity development environment. Using MetaMask and Re
9588
```
9689
9790
The **simple contract** declares a state variable named **balance**. There are two functions defined. The **add** function adds a number to **balance**. The **get** function returns the value of **balance**.
98-
99-
1. To compile the contract, select the **Compile > Start to compile**. If successful, a green box with contract name is displayed.
91+
1. To compile the contract, first select the Solidity compiler pane then select the **Compile simple.sol**.
10092
10193
![Compile](./media/connect-metamask/compile.png)
10294
103-
1. To execute the contract, select the **Run** tab. Select the **simple** contract then **Deploy**.
95+
1. Select the **Deploy & Run** pane then set the **Environment** to **Injected Web3** to connect through MetaMask to your blockchain member.
96+
97+
![Run tab](./media/connect-metamask/injected-web3.png)
98+
99+
1. Select the **simple** contract then **Deploy**.
100+
101+
![Deploy](./media/connect-metamask/deploy.png)
104102
105-
![Custom RPC](./media/connect-metamask/deploy.png)
106103
107104
1. A MetaMask notification is displayed alerting you of insufficient funds to perform the transaction.
108105
@@ -121,13 +118,13 @@ Remix is a browser-based Solidity development environment. Using MetaMask and Re
121118
122119
There are two actions **add** and **get** that map to the functions defined in the contract.
123120
124-
1. To perform an **add** transaction on the blockchain, enter a number to add then select **add**.
121+
1. To perform an **add** transaction on the blockchain, enter a number to add then select **add**. You may get a gas estimation failure message from Remix. You are sending the transaction to a private blockchain that does not require gas. Select **Send Transaction** to force the transaction.
125122
1. Similar to when you deployed the contract, a MetaMask notification is displayed alerting you of insufficient funds to perform the transaction.
126123
127124
Since this is a private network in a consortium, we can set gas price to zero.
128125
129126
1. Select **Gas Fee > Edit > Advanced**, set the **Gas Price** to 0, and select **Save**.
130-
1. Select **Confirm** to perform the transaction on the blockchain.
127+
1. Select **Confirm** to send the transaction to the blockchain.
131128
1. Select **get** action. This is a call to query node data. A transaction isn't needed.
132129
1. In the debug pane of Remix, you can see details about the transactions on the blockchain.
133130
-28.3 KB
Loading
8.02 KB
Loading
-2.71 KB
Loading
-31.9 KB
Loading
16 KB
Loading
4.11 KB
Loading
9.7 KB
Loading

0 commit comments

Comments
 (0)