diff --git a/src/main/java/bisq/asset/coins/ZCore.java b/src/main/java/bisq/asset/coins/ZCore.java new file mode 100644 index 0000000..cd3756c --- /dev/null +++ b/src/main/java/bisq/asset/coins/ZCore.java @@ -0,0 +1,28 @@ +/* + * 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.coins; + +import bisq.asset.Coin; +import bisq.asset.DefaultAddressValidator; + +public class ZCore extends Coin { + + public ZCore() { + super("ZCore", "ZCR", new DefaultAddressValidator()); + } +} diff --git a/src/main/resources/META-INF/services/bisq.asset.Asset b/src/main/resources/META-INF/services/bisq.asset.Asset index 6474d48..daf820e 100644 --- a/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/src/main/resources/META-INF/services/bisq.asset.Asset @@ -121,6 +121,7 @@ bisq.asset.coins.Xuez bisq.asset.coins.Yenten bisq.asset.coins.Zcash bisq.asset.coins.Zcoin +bisq.asset.coins.ZCore bisq.asset.coins.ZenCash bisq.asset.coins.ZeroOneCoin bisq.asset.tokens.BetterBetting diff --git a/src/test/java/bisq/asset/coins/ZCoreTest.java b/src/test/java/bisq/asset/coins/ZCoreTest.java new file mode 100644 index 0000000..5a370b8 --- /dev/null +++ b/src/test/java/bisq/asset/coins/ZCoreTest.java @@ -0,0 +1,44 @@ +/* + * 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.coins; + +import bisq.asset.AbstractAssetTest; + +import org.junit.Test; + +public class ZCoreTest extends AbstractAssetTest { + + public ZCoreTest() { + super(new ZCore()); + } + + @Test + public void testValidAddresses() { + assertValidAddress("ZGSJJRoBVyk9iQ1PK7cnBWnnppA4szgjqk"); + assertValidAddress("ZRvUcY8eFvxNtmHyJmgqgCSsqXzAfEywVo"); + assertValidAddress("ZP6o2EYFpntnjtCegguNSHwWSqjCAuTNvR"); + + } + + @Test + public void testInvalidAddresses() { + assertInvalidAddress("1XnaJzoAKTNa67Fpt1tLxD5bFMcyN4tCvTT"); + assertInvalidAddress("ZP6o2EYFpntnjtCegguNSHwWSqjCAuTNvRx"); + assertInvalidAddress("ZRvUcY8eFvxNtmHyJmgqgCSsqXzAfEywVo!"); + } +}