You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Learn how to deploy smart contracts to the Polkadot Hub network and interact with them using the Remix IDE and wallet providers, covering deployment and state.
After compiling your smart contract in Remix IDE, the next step is to deploy it to the Polkadot Hub network. This guide will walk you through the deployment process using a wallet provider and show you how to interact with your deployed contracts directly from the Remix interface.
13
+
14
+
## Prerequisites
15
+
16
+
Before deploying your contract, ensure you have:
17
+
18
+
- Completed the [Remix IDE setup](/smart-contracts/dev-environments/remix/get-started/){target=\_blank} and have a compiled contract ready.
19
+
- A compatible wallet extension installed (e.g., [MetaMask](https://metamask.io/){target=\_blank} or [Talisman](https://www.talisman.xyz/){target=\_blank}).
20
+
- Your wallet connected to the Polkadot Hub network. Check the [Connect to Polkadot](/smart-contracts/connect/){target=\_blank} guide for more information.
21
+
- Test tokens in your wallet to cover deployment and transaction fees (available from the [Polkadot faucet](/smart-contracts/faucet/){target=\_blank}).
22
+
23
+
## Deploy Contracts
24
+
25
+
The steps to use Remix IDE to deploy a contract to Polkadot Hub are as follows:
26
+
27
+
1. Navigate to [Remix](https://remix.ethereum.org/){target=\_blank} in your web browser.
28
+
2. Locate the **Deploy & Run Transactions** tab.
29
+
3. Select the **Environment** dropdown.
30
+
4. Select **Browser Extension**.
31
+
5. Select the **Injected Provider - MetaMask** option.
32
+
6. Click the **Deploy** button and then click **Confirm** in the wallet popup.
33
+
34
+
Once your contract is deployed successfully, you will see the deployment confirmation in the Remix terminal.
Deployed contracts appear in the **Deployed/Unpinned Contracts** section. Follow these steps to interact with the deployed contract:
41
+
42
+
1. Expand the contract to view available methods.
43
+
44
+
!!! tip
45
+
Pin your frequently used contracts to the **Pinned Contracts** section for easy access.
46
+
47
+
2. Select any of the exposed methods to interact with the contract.
48
+
49
+
You can use these methods to interact with your deployed contract by reading or writing to its state. Remix IDE uses a color-coding scheme for method buttons to help differentiate between types of available methods as follows:
50
+
51
+
-**Blue buttons**: indicate `view` or `pure` functions which read state only. Interactions do not create a new transaction and do not incur gas fees.
52
+
-**Orange buttons**: label `non-payable` functions which change contract state but don't accept any value (ETH or other tokens) being sent with the transaction.
53
+
-**Red buttons**: designate `payable` functions which create a transaction and can accept a value (ETH or other tokens) to send with the transaction.
54
+
55
+
If you deployed the `Counter.sol` contract from [Remix IDE setup](/smart-contracts/dev-environments/remix/get-started/){target=\_blank}, you can try interacting with the exposed methods as follows:
56
+
57
+
1. Select the **GetCount** button to read the current count value.
58
+
59
+
2. Select the **Increment** button to increment the count value.
60
+
61
+
3. Submit the transaction and click the **Confirm** button in the wallet pop-up.
62
+
63
+
Once the transaction is confirmed, you will see the updated count value in the Remix terminal.
You've successfully deployed and interacted with your smart contract on Polkadot Hub using Remix IDE. Continue enhancing your development workflow with these resources:
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
12
-
<divclass="grid cards"markdown>
13
-
- :octicons-code-16:{ .lg .middle } __Deploy NFTs Using Remix IDE__
14
-
15
-
---
16
-
17
-
Mint your NFT on Polkadot's Asset Hub. Use PolkaVM and OpenZeppelin to bring your digital asset to life with Polkadot Remix IDE.
18
-
19
-
<br>
20
-
[:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/smart-contracts/deploy-nft/remix/){target=\_blank}
10
+
## Introduction
21
11
22
-
- :octicons-code-16:{ .lg .middle } __Deploy ERC20s Using Remix IDE__
23
-
24
-
---
25
-
26
-
Mint your custom ERC-20 token on Polkadot's Asset Hub. Leverage PolkaVM and Polkadot Remix IDE to bring your blockchain project to life.
27
-
28
-
<br>
29
-
[:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/smart-contracts/deploy-erc20/remix/){target=\_blank}
30
-
</div>
31
-
32
-
!!! warning
33
-
The Polkadot Remix IDE's contract compilation functionality is currently limited to Google Chrome. Alternative browsers are not recommended for this task.
34
-
35
-
## Overview
36
-
37
-
Remix IDE is a robust browser-based development environment for smart contracts. This guide will walk you through the essentials of the [Polkadot Remix IDE](https://remix.polkadot.io/){target=\_blank} to understand the processes of compiling, developing, and deploying smart contracts on Asset Hub.
12
+
Remix IDE is a robust browser-based development environment for smart contracts. This guide will walk you through the essentials of the [Remix IDE](https://remix.ethereum.org/){target=\_blank} to understand the processes of compiling, developing, and deploying smart contracts on Polkadot Hub.
38
13
39
14
## Prerequisites
40
15
41
16
Before getting started, ensure you have:
42
17
43
-
- A web browser with [Talisman](https://talisman.xyz/){target=\_blank} extension installed.
18
+
- A web browser with the [MetaMask](https://metamask.io/){target=\_blank} extension installed.
44
19
- Basic understanding of Solidity programming.
45
-
- Some WND test tokens to cover transaction fees (easily obtainable from the [Polkadot faucet](https://faucet.polkadot.io/westend?parachain=1000){target=\_blank}).
20
+
- Some test tokens to cover transaction fees (easily obtainable from the [Polkadot faucet](/smart-contracts/faucet/){target=\_blank}).
46
21
47
-
## Accessing Remix IDE
22
+
## Access Remix IDE
48
23
49
-
Navigate to [https://remix.polkadot.io/](https://remix.polkadot.io/){target=\_blank}. The interface will load with a default workspace containing sample contracts.
24
+
Navigate to [https://remix.ethereum.org/](https://remix.ethereum.org/){target=\_blank}. The interface will load with a default workspace containing sample contracts.
In this way, you can interact with your deployed contract by reading its state or writing to it. The button color indicates the type of interaction available:
The Polkadot Remix IDE offers an environment for developing, compiling, and deploying smart contracts on Asset Hub. Its intuitive interface allows developers to easily write Solidity code, compile contracts, and interact with them directly in the browser.
84
+
Remix offers an environment for developing, compiling, and deploying smart contracts on Polkadot Hub. Its intuitive interface allows developers to easily write Solidity code, compile contracts, and interact with them directly in the browser.
165
85
166
86
Explore more about smart contracts through these resources:
167
87
168
88
<divclass="grid cards"markdown>
169
89
170
-
- <spanclass="badge guide">Guide</span> __Smart Contracts on Polkadot__
90
+
- <spanclass="badge guide">Guide</span> __Deploy a Contract__
171
91
172
92
---
173
93
174
-
Dive into advanced smart contract concepts.
94
+
Learn how to deploy smart contracts using Remix IDE.
175
95
176
-
[:octicons-arrow-right-24: Get Started](/smart-contracts/)
96
+
[:octicons-arrow-right-24: Get Started](/smart-contracts/dev-environments/remix/deploy-a-contract/)
0 commit comments