Skip to content

Commit

Permalink
Merge pull request #3190 from kryptonchain/list-krypton-zod
Browse files Browse the repository at this point in the history
List Krypton (ZOD)
  • Loading branch information
ripcurlx authored Oct 17, 2019
2 parents 2178dbd + 2450d9b commit 75f28eb
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
28 changes: 28 additions & 0 deletions assets/src/main/java/bisq/asset/coins/Krypton.java
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/

package bisq.asset.coins;

import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;

public class Krypton extends Coin {

public Krypton() {
super("Krypton", "ZOD", new RegexAddressValidator("^QQQ[1-9A-Za-z^OIl]{95}"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ bisq.asset.coins.Iridium
bisq.asset.coins.Kekcoin
bisq.asset.coins.KnowYourDeveloper
bisq.asset.coins.Kore
bisq.asset.coins.Krypton
bisq.asset.coins.Litecoin
bisq.asset.coins.LitecoinPlus
bisq.asset.coins.LitecoinZ
Expand Down
48 changes: 48 additions & 0 deletions assets/src/test/java/bisq/asset/coins/KryptonTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/

package bisq.asset.coins;

import bisq.asset.AbstractAssetTest;

import org.junit.Test;

public class KryptonTest extends AbstractAssetTest {

public KryptonTest() {
super(new Krypton());
}

@Test
public void testValidAddresses() {
assertValidAddress("QQQ1LgQ1m8vX5tGrBZ2miS7A54Fmj5Qbij4UXT8nD4aqF75b1cpAauxVkjYaefcztV62UrDT1K9WHDeQWu4vpVXU2wezpshvex");
assertValidAddress("QQQ1G56SKneSK1833tKjLH7E4ZgFwnqhqUb1HMHgYbnhaST56mukM1296jiYjTyTdMWnvH5FpWNAJWaQqwyPJHUR8qXRKBJy9o");
assertValidAddress("QQQ1Bg61uUZhsNaTmUSZNcFgX2bk9wnAoYg9DSYZidDMJt7wVyccvMy8J7zRBoV5iT1pbraFUDWPQWWdXGPPws2P2ZGe8UzsaJ");
}

@Test
public void testInvalidAddresses() {
assertInvalidAddress("QQQ1Bg61uUZhsNaTmUSZNcFgX2bk9wnAoYg9DSYZidDMJt7wVyccvMy8J7zRBoV5iT1pbraFUDWPQWWdXGPPws2P2ZGe8");
assertInvalidAddress("11QQQ1Bg61uUZhsNaTmUSZNcFgX2bk9wnAoYg9DSYZidDMJt7wVyccvMy8J7zRBoV5iT1pbraFUDWPQWWdXGPPws2P2ZGe8UzsaJ");
assertInvalidAddress("");
assertInvalidAddress("#RoUKWRwpsx1F");
assertInvalidAddress("YQQ1G56SKneSK1833tKjLH7E4ZgFwnqhqUb1HMHgYbnhaST56mukM1296jiYjTyTdMWnvH5FpWNAJWaQqwyPJHUR8qXRKBJy9o");
assertInvalidAddress("3jyRo3rcp9fjdfjdSGpx");
assertInvalidAddress("QQQ1G56SKneSK1833tKjLH7E4ZgFwnqhqUb1HMHgYbnhaST56mukM1296jiYjTyTdMWnvH5FpWNAJWaQqwyPJHUR8qXRKBJy9#");
assertInvalidAddress("ZOD1Bg61uUZhsNaTmUSZNcFgX2bk9wnAoYg9DSYZidDMJt7wVyccvMy8J7zRBoV5iT1pbraFUDWPQWWdXGPPws2P2ZGe8UzsaJ");
}
}

0 comments on commit 75f28eb

Please sign in to comment.