# EVM Contract Deployment

### Deploying a Standard ERC20 Contract <a href="#deploying-a-standard-erc20-contract" id="deploying-a-standard-erc20-contract"></a>

This document outlines the steps to deploy a standard ERC20 contract using your preferred tooling.

#### **Step 1: Choose a Standard ERC20 Contract** <a href="#step-1-choose-a-standard-erc20-contract" id="step-1-choose-a-standard-erc20-contract"></a>

Several readily available standard ERC20 contracts exist online. Choose one based on your specific needs and security considerations.

#### **Step 2: Compile the Contract** <a href="#step-2-compile-the-contract" id="step-2-compile-the-contract"></a>

Once you have chosen a contract, compile it using the relevant compiler and settings. This may involve using tools like Solidity compiler or Remix.

#### **Step 3: Deploy the Contract** <a href="#step-3-deploy-the-contract" id="step-3-deploy-the-contract"></a>

1. Select the "Deploy & Run Transaction" button. This button is typically located at the bottom of the left toolbar in your development environment.
2. Choose "WalletConnect" as the connection method.
3. Connect your Metamask wallet to WalletConnect or Injected Provider .
4. Metamask is connected to the magnet network. If you need to deploy a contract on the tanssi network, you only need to change the URL to the corresponding port in metamask or other wallets.
5. This will allow you to sign the transaction and pay the gas fees.
6. Review the transaction details and confirm the deployment.

#### **Step 4: Add Contract Address to Metamask** <a href="#step-4-add-contract-address-to-metamask" id="step-4-add-contract-address-to-metamask"></a>

1. Copy the deployed contract address.
2. Open Metamask and click the "Add Token" button.
3. Select "Custom Token" and paste the contract address.
4. Metamask will automatically fetch the token details and display them.
5. Click "Next" and then "Add Tokens" to confirm.

#### **Step 5: Verify Token Existence** <a href="#step-5-verify-token-existence" id="step-5-verify-token-existence"></a>

Once you have added the contract address to Metamask, your ERC20 tokens will be visible in your wallet. You can verify their existence by exploring your token balance and interacting with the contract through its functions.

**Additional Notes:**

* This is a general guide, and the specific steps may vary depending on your chosen tools and contract implementation.
* Before deploying the contract, ensure you have sufficient DOT in your Metamask wallet to cover the gas fees.
* Remember to securely store your private key and handle your tokens responsibly.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.magport.io/product-guides/deploy-contracts-on-magnet-network/evm-contract-deployment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
