Merge pull request #2443 from mbroemme/master

List Galilel (GALI)
This commit is contained in:
Christoph Atteneder 2019-03-04 14:17:42 +01:00 committed by GitHub
commit b84b73712d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 80 additions and 0 deletions

View 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};
}
}
}

View File

@ -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

View 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#");
}
}