Skip to main content
Zondax Github LinkZondax Github Link
Theme SwitchTheme Switch

How to deploy smart contracts?

Tools

Remix 🔗

The Remix Project is a rich toolset which can be used for the entire journey of contract development by users of any knowledge level, and as a learning lab for teaching and experimenting with Ethereum (or EVM compatible chains).

Metamask 🔗

MetaMask is a software cryptocurrency wallet used to interact with the Ethereum blockchain. It allows users to access their Ethereum wallet through a browser extension or mobile app, which can then be used to interact with decentralized applications

Setting up your wallet

Setup

Install metamask extension on your browser. Metamask is available for Chrome and Firefox. You will need to follow a series of steps in order to create your store, set a password, and so on. Once you are ready, you will see the following screen.

image

Adding new network

In order to interact with the hyperspace network, you will need to add it to the list of them. Please, click on the dropdown box where "Ethereum Mainnet" is displayed, and hit "Add network".

image

Adding network manually

After a few seconds, you will end up on the following page. Please, click on "Add a network manually"

image

Setting up the parameters

Now it is time to fill each text box with the corresponding value. Once you finish typing in the values, hit "Save".

image

Choosing Hyperspace network

Click again on the network selector, and choose the new "Filecoin Hyperspace" network.

image

Your address

Now that you have chosen the hyperspace network, your address is ready to use. But you need some tokens in order to spend gas on smart contracts. Copy the address, as you will need it in the next step.

image

Time to get some tokens

Go to the faucet website 🔗, paste the address you copied on the previous step, complete the captcha challenge, and ask for the tokens. Some minutes will pass until the transactions is finished.

image

Ready to go!

Some minutes after requesting tokens on the faucet, you will be your new balance reflected on your wallet. Congratulations! You are ready to deploy your smart contracts using Remix and Metamask.

image

Deploying your smart contract

The remix IDE is a powerful editor you can use to write your smart contracts. You will be able to write, compile and deploy them directly from it. In order to deploy them on the hyperspace network, we will use MetaMask as the current environment.

From the main menu, go to "Deploy & Run Transactions". It is the latest icon on the left-side menu.

image

Now you need to choose "Injected provider - MetaMask" as the environment you want to use.

image

If this is the first time you do it, a popup will appear in the screen. It will request you to accept the new connection from Remix with MetaMask. Just follow the flow, and you will be ready to go.

image image