From dcc6d0ebb27fe1de01a0b9776dc20db5d817a84d Mon Sep 17 00:00:00 2001 From: Christoph Atteneder Date: Fri, 8 Feb 2019 17:37:18 +0100 Subject: [PATCH 1/3] List Dai Stablecoin (DAI) --- .../java/bisq/asset/tokens/DaiStablecoin.java | 27 ++++++++++++ .../META-INF/services/bisq.asset.Asset | 1 + .../bisq/asset/tokens/DaiStablecoinTest.java | 42 +++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 assets/src/main/java/bisq/asset/tokens/DaiStablecoin.java create mode 100644 assets/src/test/java/bisq/asset/tokens/DaiStablecoinTest.java diff --git a/assets/src/main/java/bisq/asset/tokens/DaiStablecoin.java b/assets/src/main/java/bisq/asset/tokens/DaiStablecoin.java new file mode 100644 index 00000000000..f0f673c527d --- /dev/null +++ b/assets/src/main/java/bisq/asset/tokens/DaiStablecoin.java @@ -0,0 +1,27 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.asset.tokens; + +import bisq.asset.Erc20Token; + +public class DaiStablecoin extends Erc20Token { + + public DaiStablecoin() { + super("Dai Stablecoin", "DAI"); + } +} diff --git a/assets/src/main/resources/META-INF/services/bisq.asset.Asset b/assets/src/main/resources/META-INF/services/bisq.asset.Asset index 3b40a032f71..0727777ea68 100644 --- a/assets/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/assets/src/main/resources/META-INF/services/bisq.asset.Asset @@ -80,5 +80,6 @@ bisq.asset.coins.ZelCash bisq.asset.coins.Zero bisq.asset.coins.ZeroOneCoin bisq.asset.tokens.AugmintEuro +bisq.asset.tokens.DaiStablecoin bisq.asset.tokens.EtherStone bisq.asset.tokens.VectorspaceAI diff --git a/assets/src/test/java/bisq/asset/tokens/DaiStablecoinTest.java b/assets/src/test/java/bisq/asset/tokens/DaiStablecoinTest.java new file mode 100644 index 00000000000..d567cce57da --- /dev/null +++ b/assets/src/test/java/bisq/asset/tokens/DaiStablecoinTest.java @@ -0,0 +1,42 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.asset.tokens; + +import bisq.asset.AbstractAssetTest; + +import org.junit.Test; + +public class DaiStablecoinTest extends AbstractAssetTest { + + public DaiStablecoinTest() { + super(new DaiStablecoin()); + } + + @Test + public void testValidAddresses() { + assertValidAddress("0x2a65Aca4D5fC5B5C859090a6c34d164135398226"); + assertValidAddress("2a65Aca4D5fC5B5C859090a6c34d164135398226"); + } + + @Test + public void testInvalidAddresses() { + assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); + assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g"); + assertInvalidAddress("2a65Aca4D5fC5B5C859090a6c34d16413539822g"); + } +} From 99398a6b8ed4bbac48e9aef5694aba54fc5c1426 Mon Sep 17 00:00:00 2001 From: Christoph Atteneder Date: Fri, 8 Feb 2019 17:40:26 +0100 Subject: [PATCH 2/3] List TrueUSD (TUSD) --- .../main/java/bisq/asset/tokens/TrueUSD.java | 27 ++++++++++++ .../META-INF/services/bisq.asset.Asset | 1 + .../java/bisq/asset/tokens/TrueUSDTest.java | 42 +++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 assets/src/main/java/bisq/asset/tokens/TrueUSD.java create mode 100644 assets/src/test/java/bisq/asset/tokens/TrueUSDTest.java diff --git a/assets/src/main/java/bisq/asset/tokens/TrueUSD.java b/assets/src/main/java/bisq/asset/tokens/TrueUSD.java new file mode 100644 index 00000000000..0ca465fe8a2 --- /dev/null +++ b/assets/src/main/java/bisq/asset/tokens/TrueUSD.java @@ -0,0 +1,27 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.asset.tokens; + +import bisq.asset.Erc20Token; + +public class TrueUSD extends Erc20Token { + + public TrueUSD() { + super("TrueUSD", "TUSD"); + } +} diff --git a/assets/src/main/resources/META-INF/services/bisq.asset.Asset b/assets/src/main/resources/META-INF/services/bisq.asset.Asset index 0727777ea68..6867ee9a533 100644 --- a/assets/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/assets/src/main/resources/META-INF/services/bisq.asset.Asset @@ -82,4 +82,5 @@ bisq.asset.coins.ZeroOneCoin bisq.asset.tokens.AugmintEuro bisq.asset.tokens.DaiStablecoin bisq.asset.tokens.EtherStone +bisq.asset.tokens.TrueUSD bisq.asset.tokens.VectorspaceAI diff --git a/assets/src/test/java/bisq/asset/tokens/TrueUSDTest.java b/assets/src/test/java/bisq/asset/tokens/TrueUSDTest.java new file mode 100644 index 00000000000..e86612cdda8 --- /dev/null +++ b/assets/src/test/java/bisq/asset/tokens/TrueUSDTest.java @@ -0,0 +1,42 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.asset.tokens; + +import bisq.asset.AbstractAssetTest; + +import org.junit.Test; + +public class TrueUSDTest extends AbstractAssetTest { + + public TrueUSDTest() { + super(new TrueUSD()); + } + + @Test + public void testValidAddresses() { + assertValidAddress("0xa23579c2f7b462e5fb2e92f8cf02971fe4de4f82"); + assertValidAddress("0xdb59b63738e27e6d689c9d72c92c7a12f22161bb"); + } + + @Test + public void testInvalidAddresses() { + assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); + assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g"); + assertInvalidAddress("2a65Aca4D5fC5B5C859090a6c34d16413539822g"); + } +} From 3a39e22917a4feb8eed7e93995ba675e844be43e Mon Sep 17 00:00:00 2001 From: Christoph Atteneder Date: Fri, 8 Feb 2019 17:41:18 +0100 Subject: [PATCH 3/3] List USD Coin (USDC) --- .../main/java/bisq/asset/tokens/USDCoin.java | 27 ++++++++++++ .../META-INF/services/bisq.asset.Asset | 1 + .../java/bisq/asset/tokens/USDCoinTest.java | 42 +++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 assets/src/main/java/bisq/asset/tokens/USDCoin.java create mode 100644 assets/src/test/java/bisq/asset/tokens/USDCoinTest.java diff --git a/assets/src/main/java/bisq/asset/tokens/USDCoin.java b/assets/src/main/java/bisq/asset/tokens/USDCoin.java new file mode 100644 index 00000000000..91d5a926e31 --- /dev/null +++ b/assets/src/main/java/bisq/asset/tokens/USDCoin.java @@ -0,0 +1,27 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.asset.tokens; + +import bisq.asset.Erc20Token; + +public class USDCoin extends Erc20Token { + + public USDCoin() { + super("USD Coin", "USDC"); + } +} diff --git a/assets/src/main/resources/META-INF/services/bisq.asset.Asset b/assets/src/main/resources/META-INF/services/bisq.asset.Asset index 6867ee9a533..b2e508dd352 100644 --- a/assets/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/assets/src/main/resources/META-INF/services/bisq.asset.Asset @@ -83,4 +83,5 @@ bisq.asset.tokens.AugmintEuro bisq.asset.tokens.DaiStablecoin bisq.asset.tokens.EtherStone bisq.asset.tokens.TrueUSD +bisq.asset.tokens.USDCoin bisq.asset.tokens.VectorspaceAI diff --git a/assets/src/test/java/bisq/asset/tokens/USDCoinTest.java b/assets/src/test/java/bisq/asset/tokens/USDCoinTest.java new file mode 100644 index 00000000000..dd76c40e908 --- /dev/null +++ b/assets/src/test/java/bisq/asset/tokens/USDCoinTest.java @@ -0,0 +1,42 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.asset.tokens; + +import bisq.asset.AbstractAssetTest; + +import org.junit.Test; + +public class USDCoinTest extends AbstractAssetTest { + + public USDCoinTest() { + super(new USDCoin()); + } + + @Test + public void testValidAddresses() { + assertValidAddress("0xb86bb5fc804768db34f1a37da8b719e19af9dffd"); + assertValidAddress("0xea82afd93ebfc4f6564f3e5bd823cdef710f75dd"); + } + + @Test + public void testInvalidAddresses() { + assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266"); + assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g"); + assertInvalidAddress("2a65Aca4D5fC5B5C859090a6c34d16413539822g"); + } +}