@@ -115,6 +115,7 @@ const (
115
115
SOL = Asset ("SOL" ) // Solana
116
116
ZEC = Asset ("ZEC" ) // Zcash
117
117
118
+ DAI = Asset ("DAI" ) // Dai
118
119
REN = Asset ("REN" ) // Ren
119
120
USDC = Asset ("USDC" ) // Circle USD
120
121
@@ -138,13 +139,14 @@ const (
138
139
type AssetType string
139
140
140
141
const (
141
- // AssetTypeNative is an identifier for all the native assets of account based
142
- // chains namely. For instance, ETH for Ethereum, BNB for BinanceSmartChain.
142
+ // AssetTypeNative is an identifier for all the native assets of account
143
+ // based chains namely. For instance, ETH for Ethereum, BNB for
144
+ // BinanceSmartChain.
143
145
AssetTypeNative = AssetType ("NativeAsset" )
144
146
145
147
// AssetTypeToken is an identifier for all tokens (ERC20, BEP20) deployed on
146
- // programmable account-based chains. For instance, REN is an ERC-20 token on
147
- // Ethereum, USDC is an ERC-20 token on Ethereum.
148
+ // programmable account-based chains. For instance, REN and USDC are ERC-20
149
+ // tokens on Ethereum.
148
150
AssetTypeToken = AssetType ("TokenAsset" )
149
151
)
150
152
@@ -180,6 +182,8 @@ func (asset Asset) OriginChain() Chain {
180
182
return BinanceSmartChain
181
183
case BTC :
182
184
return Bitcoin
185
+ case DAI :
186
+ return Ethereum
183
187
case DGB :
184
188
return DigiByte
185
189
case DOGE :
@@ -230,7 +234,7 @@ func (asset Asset) ChainType() ChainType {
230
234
switch asset {
231
235
case BCH , BTC , DGB , DOGE , ZEC :
232
236
return ChainTypeUTXOBased
233
- case ArbETH , AVAX , BNB , ETH , FIL , FTM , GLMR , LUNA , MATIC , REN , SOL , USDC :
237
+ case ArbETH , AVAX , BNB , ETH , DAI , FIL , FTM , GLMR , LUNA , MATIC , REN , SOL , USDC :
234
238
return ChainTypeAccountBased
235
239
236
240
case KETH , GETH :
@@ -254,7 +258,7 @@ func (asset Asset) Type() AssetType {
254
258
switch asset {
255
259
case ArbETH , AVAX , BNB , ETH , FTM , GLMR , MATIC , SOL :
256
260
return AssetTypeNative
257
- case REN , USDC :
261
+ case DAI , REN , USDC :
258
262
return AssetTypeToken
259
263
260
264
case KETH , GETH :
0 commit comments