mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
commit
b84b73712d
36
assets/src/main/java/bisq/asset/coins/Galilel.java
Normal file
36
assets/src/main/java/bisq/asset/coins/Galilel.java
Normal file
@ -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 Galilel extends Coin {
|
||||
public Galilel() {
|
||||
super("Galilel", "GALI", new Base58BitcoinAddressValidator(new GalilelMainNetParams()));
|
||||
}
|
||||
|
||||
public static class GalilelMainNetParams extends NetworkParametersAdapter {
|
||||
public GalilelMainNetParams() {
|
||||
this.addressHeader = 68;
|
||||
this.p2shHeader = 16;
|
||||
this.acceptableAddressCodes = new int[]{this.addressHeader, this.p2shHeader};
|
||||
}
|
||||
}
|
||||
}
|
@ -39,6 +39,7 @@ bisq.asset.coins.Ether
|
||||
bisq.asset.coins.EtherClassic
|
||||
bisq.asset.coins.FourtyTwo
|
||||
bisq.asset.coins.Fujicoin
|
||||
bisq.asset.coins.Galilel
|
||||
bisq.asset.coins.GambleCoin
|
||||
bisq.asset.coins.Grin
|
||||
bisq.asset.coins.Hatch
|
||||
|
43
assets/src/test/java/bisq/asset/coins/GalilelTest.java
Normal file
43
assets/src/test/java/bisq/asset/coins/GalilelTest.java
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* 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 GalilelTest extends AbstractAssetTest {
|
||||
|
||||
public GalilelTest() {
|
||||
super(new Galilel());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("UVwXGh5B1NZbYdgWThqf2cLdkEupVXEVNi");
|
||||
assertValidAddress("UbNJbC1hZgBH5tQ4HyrrQMEPswKxwwfziw");
|
||||
assertValidAddress("UgqDDV8aekEXFP7BWLmTNpSQfk7uVk1jCF");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("1UgqDDV8aekEXFP7BWLmTNpSQfk7uVk1jCF");
|
||||
assertInvalidAddress("UgqDDV8aekEXFP7BWLmTNpSQfk7uVk1jCFd");
|
||||
assertInvalidAddress("UgqDDV8aekEXFP7BWLmTNpSQfk7uVk1jCF#");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user