mirror of
https://github.com/bisq-network/bisq.git
synced 2025-03-04 11:07:59 +01:00
List Faircoin (FAIR)
This commit is contained in:
parent
7bed73e687
commit
406c0989a1
3 changed files with 81 additions and 0 deletions
39
assets/src/main/java/bisq/asset/coins/Faircoin.java
Normal file
39
assets/src/main/java/bisq/asset/coins/Faircoin.java
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
* 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 Faircoin extends Coin {
|
||||||
|
|
||||||
|
public Faircoin() {
|
||||||
|
super("Faircoin", "FAIR", new Base58BitcoinAddressValidator(new Faircoin.FaircoinParams()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class FaircoinParams extends NetworkParametersAdapter {
|
||||||
|
|
||||||
|
public FaircoinParams() {
|
||||||
|
addressHeader = 95;
|
||||||
|
p2shHeader = 36;
|
||||||
|
acceptableAddressCodes = new int[]{addressHeader, p2shHeader};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -43,6 +43,7 @@ bisq.asset.coins.Emercoin
|
||||||
bisq.asset.coins.Ergo
|
bisq.asset.coins.Ergo
|
||||||
bisq.asset.coins.Ether
|
bisq.asset.coins.Ether
|
||||||
bisq.asset.coins.EtherClassic
|
bisq.asset.coins.EtherClassic
|
||||||
|
bisq.asset.coins.Faircoin
|
||||||
bisq.asset.coins.FourtyTwo
|
bisq.asset.coins.FourtyTwo
|
||||||
bisq.asset.coins.Fujicoin
|
bisq.asset.coins.Fujicoin
|
||||||
bisq.asset.coins.Galilel
|
bisq.asset.coins.Galilel
|
||||||
|
|
41
assets/src/test/java/bisq/asset/coins/FaircoinTest.java
Normal file
41
assets/src/test/java/bisq/asset/coins/FaircoinTest.java
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
/*
|
||||||
|
* 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;
|
||||||
|
|
||||||
|
public class FaircoinTest extends AbstractAssetTest {
|
||||||
|
|
||||||
|
public FaircoinTest() {
|
||||||
|
super(new Faircoin());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void testValidAddresses() {
|
||||||
|
assertValidAddress("fLsJC1Njap5NxSArYr5wCJbKBbTQfWikY6");
|
||||||
|
assertValidAddress("FZHzHraqjty2Co7TinwcsBtPKoz5ANvgRd");
|
||||||
|
assertValidAddress("fHbXBBBjU1xxEVmWEtAEwXnoBDxxsxfvxg");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void testInvalidAddresses() {
|
||||||
|
assertInvalidAddress("FLsJC1Njap5NxSArYr5wCJbKBbTQfWikY6");
|
||||||
|
assertInvalidAddress("fZHzHraqjty2Co7TinwcsBtPKoz5ANvgRd");
|
||||||
|
assertInvalidAddress("1HbXBBBjU1xxEVmWEtAEwXnoBDxxsxfvxg");
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue