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
Copy file name to clipboardExpand all lines: usecases/xerc20/setup-guide.md
+30-6Lines changed: 30 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Hello! 👋 This document will guide you through the process of setting up your
4
4
5
5
## Prerequisites
6
6
7
-
Let's begin by getting a comprehensive understanding of the steps to follow based on your token's current situation.
7
+
Let's begin by getting a comprehensive understanding of the required steps based on your token's current situation.
8
8
9
9
#### 1. Categorize your token
10
10
@@ -14,6 +14,12 @@ Determine which of the following categories best describes your token's current
14
14
***Category B**: The token already exists on one chain.
15
15
***Category C**: The token already exists on multiple chains.
16
16
17
+
{% hint style="info" %}
18
+
If you want to spin up an `xERC20` on testnet, the category may be different from your mainnet token. We recommend emulating your mainnet token setup if your goal is to testrun the process on testnet.\
19
+
\
20
+
For example: on mainnet, your token `TKN`is deployed to Ethereum already (**Category B**). Then on testnet, you should deploy a `TKN` to Goerli and follow the steps for a **Category B** token.
21
+
{% endhint %}
22
+
17
23
#### 2. Define your token's "home" chain
18
24
19
25
Based on your token's category:
@@ -59,15 +65,33 @@ Bridging from Arbitrum to Ethereum:
59
65
60
66
## Deploying Contracts
61
67
62
-
{% hint style="info" %}
63
-
The [ERC-7281](https://github.com/ethereum/EIPs/pull/7281) specification requires compliant tokens to implement the ERC-20 interface along with some additional rate limit interfaces.
64
-
{% endhint %}
65
-
66
68
Now that you have an idea of how your tokens should be set up, let's move on to the actual deployment procedures. 
67
69
68
70
#### xERC20s and Lockboxes
69
71
70
-
Connext provides an [xERC20 Github repository](https://github.com/connext/xERC20) that contains implementations of `xERC20`, `Lockbox`, and scripts to deploy them. We suggest you deploy from a fork of this repo. See the `README` for instructions. You will configure the scripts based on which chains you need to have Lockbox setups.
72
+
Connext provides an [xERC20 Github repository](https://github.com/connext/xERC20) that contains fully compliant implementations of `xERC20`, `Lockbox`, and scripts to deploy them. We suggest you deploy from a fork of this repo. See the `README` for instructions. You will configure the scripts based on which chains you need to have Lockbox setups.
73
+
74
+
{% hint style="info" %}
75
+
The [ERC-7281](https://github.com/ethereum/EIPs/pull/7281) specification requires compliant tokens to implement ERC-20 along with mint/burn and some additional rate limit interfaces. The absolute _minimal_ interface needed is the ERC-20 interface plus mint/burn:
76
+
77
+
```solidity
78
+
/**
79
+
* @notice Mints tokens for a user
80
+
* @dev Can only be called by a bridge
81
+
* @param _user The address of the user who needs tokens minted
82
+
* @param _amount The amount of tokens being minted
83
+
*/
84
+
function mint(address _user, uint256 _amount) external;
85
+
86
+
/**
87
+
* @notice Burns tokens for a user
88
+
* @dev Can only be called by a bridge
89
+
* @param _user The address of the user who needs tokens burned
90
+
* @param _amount The amount of tokens being burned
91
+
*/
92
+
function burn(address _user, uint256 _amount) external;
0 commit comments