> For the complete documentation index, see [llms.txt](https://dxchain.gitbook.io/dxchain-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dxchain.gitbook.io/dxchain-wiki/stake-and-trade/develop-on-dxchain/smart-contract.md).

# Smart Contract

## Remix

{% embed url="<https://remix.ethereum.org>" %}
Online Solidity Editor
{% endembed %}

Setup DxChain 3.0 in [Metamask](/dxchain-wiki/stake-and-trade/stake-on-dxchain/wallet.md), select `injected web3`for the environment in Remix, keep the same with the network in Metamask.

![](/files/Y9N2LNrMZ3uA8zXnFJNG)

Create`sol` file, write smart contracts

```solidity
// SPDX-License-Identifier: GPL-3.0

pragma solidity >=0.7.0 <0.9.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract TestToken is ERC20("TestToken", "TT") {}

```

![](/files/yC5pzOP6VqvYHFqCQvaD)

Select the appropriate version of the `solidity` compiler, set automatic compilation and optimization, then perform contract compilation.

![](/files/I7r9hMJDaOnE9CqIT8T5)

Select the `injected web3` network to deploy the smart contract.

![](/files/UEYlm8hkYcTi9SdWNFQz)

The contract deployment is completed after the transaction is sent.

![](/files/oYQ4XlV5hGPBbqeiUPwy)

## Other

* hardhat
* truffle
* ......
