Skip to content

Commit 37505a8

Browse files
authored
Merge pull request #145 from renproject/feat/cat-support
CAT support
2 parents e1e7035 + b49c7d9 commit 37505a8

4 files changed

Lines changed: 17 additions & 12 deletions

File tree

chain/zcash/zcash.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ var (
4848
{419200, []byte{0xBB, 0x09, 0xB8, 0x76}},
4949
{653600, []byte{0x60, 0x0E, 0xB4, 0x2B}},
5050
{903000, []byte{0x0B, 0x23, 0xB9, 0xF5}},
51-
{1046400, []byte{0xA6, 0x75, 0xff, 0xe9}},
51+
{1046400, []byte{0xA6, 0x75, 0xFF, 0xE9}},
5252
},
5353
}
5454

@@ -64,8 +64,8 @@ var (
6464
{280000, []byte{0xBB, 0x09, 0xB8, 0x76}},
6565
{584000, []byte{0x60, 0x0E, 0xB4, 0x2B}},
6666
{903800, []byte{0x0B, 0x23, 0xB9, 0xF5}},
67-
{1028500, []byte{0xA6, 0x75, 0xff, 0xe9}},
68-
{1590000, []byte{0x21, 0x96, 0x51, 0x37}},
67+
{1028500, []byte{0xA6, 0x75, 0xFF, 0xE9}},
68+
{1842420, []byte{0xB4, 0xD0, 0xD6, 0xC2}},
6969
},
7070
}
7171

@@ -81,8 +81,8 @@ var (
8181
{20, []byte{0xBB, 0x09, 0xB8, 0x76}},
8282
{30, []byte{0x60, 0x0E, 0xB4, 0x2B}},
8383
{40, []byte{0x0B, 0x23, 0xB9, 0xF5}},
84-
{50, []byte{0xA6, 0x75, 0xff, 0xe9}},
85-
{60, []byte{0x21, 0x96, 0x51, 0x37}},
84+
{50, []byte{0xA6, 0x75, 0xFF, 0xE9}},
85+
{60, []byte{0xB4, 0xD0, 0xD6, 0xC2}},
8686
},
8787
}
8888
)

infra/zcash/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM debian:buster
44
RUN apt-get update && \
55
apt-get install -y --no-install-recommends apt-transport-https gnupg2 ca-certificates wget && \
66
wget -qO - https://apt.z.cash/zcash.asc | apt-key add - && \
7-
echo "deb [arch=amd64] https://apt.z.cash/ buster main" | tee /etc/apt/sources.list.d/zcash.list && \
7+
echo "deb [arch=amd64] https://apt.z.cash/ buster main" | tee /etc/apt/sources.list.d/zcash.list && \
88
apt-get update && apt-get install -y --no-install-recommends zcash && \
99
mkdir -p /root/.zcash-params && zcash-fetch-params
1010

infra/zcash/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ zcashd \
99
-nuparams=2bb40e60:30 \
1010
-nuparams=f5b9230b:40 \
1111
-nuparams=e9ff75a6:50 \
12-
-nuparams=37519621:60
12+
-nuparams=c2d6d0b4:60
1313
sleep 20
1414

1515
echo "ZCASH_ADDRESS=$ADDRESS"

multichain.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ const (
104104
BCH = Asset("BCH") // Bitcoin Cash
105105
BNB = Asset("BNB") // Binance Coin
106106
BTC = Asset("BTC") // Bitcoin
107+
CAT = Asset("CAT") // Catalog
107108
DGB = Asset("DGB") // DigiByte
108109
DOGE = Asset("DOGE") // Dogecoin
109110
ETH = Asset("ETH") // Ether
@@ -196,6 +197,8 @@ func (asset Asset) OriginChain() Chain {
196197
return BinanceSmartChain
197198
case BTC:
198199
return Bitcoin
200+
case CAT:
201+
return Catalog
199202
case DGB:
200203
return DigiByte
201204
case DOGE:
@@ -248,7 +251,7 @@ func (asset Asset) ChainType() ChainType {
248251
switch asset {
249252
case BCH, BTC, DGB, DOGE, ZEC:
250253
return ChainTypeUTXOBased
251-
case ArbETH, AVAX, BNB, ETH, FIL, FTM, GLMR, KAVA, LUNA, MATIC, SOL:
254+
case ArbETH, AVAX, BNB, CAT, ETH, FIL, FTM, GLMR, KAVA, LUNA, MATIC, SOL:
252255
return ChainTypeAccountBased
253256

254257
case BADGER, BUSD, CRV, DAI, EURT, FTT, ibBTC, KNC, LINK, MIM, REN, ROOK,
@@ -274,7 +277,7 @@ func (asset Asset) ChainType() ChainType {
274277
// Type returns the asset-type (Native or Token) for the given asset.
275278
func (asset Asset) Type() AssetType {
276279
switch asset {
277-
case ArbETH, AVAX, BNB, ETH, FTM, GLMR, KAVA, MATIC, SOL:
280+
case ArbETH, AVAX, BNB, CAT, ETH, FTM, GLMR, KAVA, MATIC, SOL:
278281
return AssetTypeNative
279282

280283
case BADGER, BUSD, CRV, DAI, EURT, FTT, ibBTC, KNC, LINK, MIM, REN, ROOK,
@@ -325,6 +328,7 @@ const (
325328
BinanceSmartChain = Chain("BinanceSmartChain")
326329
Bitcoin = Chain("Bitcoin")
327330
BitcoinCash = Chain("BitcoinCash")
331+
Catalog = Chain("Catalog")
328332
DigiByte = Chain("DigiByte")
329333
Dogecoin = Chain("Dogecoin")
330334
Ethereum = Chain("Ethereum")
@@ -333,7 +337,6 @@ const (
333337
Kava = Chain("Kava")
334338
Moonbeam = Chain("Moonbeam")
335339
Polygon = Chain("Polygon")
336-
Ren = Chain("Ren")
337340
Solana = Chain("Solana")
338341
Terra = Chain("Terra")
339342
Zcash = Chain("Zcash")
@@ -373,8 +376,8 @@ func (chain Chain) ChainType() ChainType {
373376
switch chain {
374377
case Bitcoin, BitcoinCash, DigiByte, Dogecoin, Zcash:
375378
return ChainTypeUTXOBased
376-
case Avalanche, BinanceSmartChain, Ethereum, Arbitrum, Fantom, Filecoin,
377-
Kava, Moonbeam, Polygon, Ren, Solana, Terra:
379+
case Avalanche, BinanceSmartChain, Catalog, Ethereum, Arbitrum, Fantom,
380+
Filecoin, Kava, Moonbeam, Polygon, Solana, Terra:
378381
return ChainTypeAccountBased
379382

380383
case Kovan, Goerli:
@@ -417,6 +420,8 @@ func (chain Chain) NativeAsset() Asset {
417420
return BCH
418421
case Bitcoin:
419422
return BTC
423+
case Catalog:
424+
return CAT
420425
case DigiByte:
421426
return DGB
422427
case Dogecoin:

0 commit comments

Comments
 (0)