Skip to content

Commit

Permalink
List Animecoin (ANI)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kariyama Saiko authored and ripcurlx committed Oct 18, 2019
1 parent c98396a commit fe332bf
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
36 changes: 36 additions & 0 deletions assets/src/main/java/bisq/asset/coins/Animecoin.java
@@ -0,0 +1,36 @@
/*
* 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.Base58BitcoinAddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;

public class Animecoin extends Coin {
public Animecoin() {
super("Animecoin", "ANI", new Base58BitcoinAddressValidator(new AnimecoinMainNetParams()));
}

public static class AnimecoinMainNetParams extends NetworkParametersAdapter {
public AnimecoinMainNetParams() {
this.addressHeader = 23;
this.p2shHeader = 9;
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader};
}
}
}
Expand Up @@ -6,6 +6,7 @@ bisq.asset.coins.Actinium
bisq.asset.coins.Adeptio
bisq.asset.coins.Aeon
bisq.asset.coins.Amitycoin
bisq.asset.coins.Animecoin
bisq.asset.coins.Arqma
bisq.asset.coins.Askcoin
bisq.asset.coins.Australiacash
Expand Down
44 changes: 44 additions & 0 deletions assets/src/test/java/bisq/asset/coins/AnimecoinTest.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 <http://www.gnu.org/licenses/>.
*/

package bisq.asset.coins;

import bisq.asset.AbstractAssetTest;

import org.junit.Test;

public class AnimecoinTest extends AbstractAssetTest {

public AnimecoinTest() {
super(new Animecoin());
}

@Test
public void testValidAddresses() {
assertValidAddress("Aa6TDuudiNh7DRzs11wEzZWiw9QBZY3Qw1");
assertValidAddress("AdsdUhnPsJwg5NvAuyxs4EsaE2GoSHohoq");
assertValidAddress("4s2peLxJJ2atz1tnAKpFshnVPKTmR312fr");

}

@Test
public void testInvalidAddresses() {
assertInvalidAddress("aa6TDuudiNh7DRzs11wEzZWiw9QBZY3Qw1");
assertInvalidAddress("3s2peLxJJ2atz1tnAKpFshnVPKTmR312fr");
assertInvalidAddress("ANNPzjj2ZYEhpyJ6p6sWeH1JXbkCSmNSd#");
}
}

0 comments on commit fe332bf

Please sign in to comment.