mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 15:00:30 +01:00
commit
9d2740eb32
3 changed files with 80 additions and 0 deletions
37
assets/src/main/java/bisq/asset/coins/Myce.java
Normal file
37
assets/src/main/java/bisq/asset/coins/Myce.java
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
* 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 Myce extends Coin {
|
||||||
|
|
||||||
|
public Myce() {
|
||||||
|
super("Myce", "YCE", new Base58BitcoinAddressValidator(new MyceParams()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class MyceParams extends NetworkParametersAdapter {
|
||||||
|
public MyceParams() {
|
||||||
|
addressHeader = 50;
|
||||||
|
p2shHeader = 85;
|
||||||
|
acceptableAddressCodes = new int[]{addressHeader, p2shHeader};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -64,6 +64,7 @@ bisq.asset.coins.MobitGlobal
|
||||||
bisq.asset.coins.Monero
|
bisq.asset.coins.Monero
|
||||||
bisq.asset.coins.MonetaryUnit
|
bisq.asset.coins.MonetaryUnit
|
||||||
bisq.asset.coins.MoX
|
bisq.asset.coins.MoX
|
||||||
|
bisq.asset.coins.Myce
|
||||||
bisq.asset.coins.Namecoin
|
bisq.asset.coins.Namecoin
|
||||||
bisq.asset.coins.Navcoin
|
bisq.asset.coins.Navcoin
|
||||||
bisq.asset.coins.Neos
|
bisq.asset.coins.Neos
|
||||||
|
|
42
assets/src/test/java/bisq/asset/coins/MyceTest.java
Normal file
42
assets/src/test/java/bisq/asset/coins/MyceTest.java
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
/*
|
||||||
|
* 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 org.junit.Test;
|
||||||
|
import bisq.asset.AbstractAssetTest;
|
||||||
|
|
||||||
|
public class MyceTest extends AbstractAssetTest {
|
||||||
|
|
||||||
|
public MyceTest() {
|
||||||
|
super(new Myce());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testValidAddresses() {
|
||||||
|
assertValidAddress("MCgtattGUWUBAV8n2JAa4uDWCRvbZeVcaD");
|
||||||
|
assertValidAddress("MRV2dtuxwo8b1JSkwBXN3uGypJxp85Hbqn");
|
||||||
|
assertValidAddress("MEUvfCySnAqzuNvbRh2SZCbSro8e2dxLYK");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testInvalidAddresses() {
|
||||||
|
assertInvalidAddress("MCgtattGUWUBAV8n2JAa4uDWCRvbZeVcaDx");
|
||||||
|
assertInvalidAddress("AUV2dtuxwo8b1JSkwBXN3uGypJxp85Hbqn");
|
||||||
|
assertInvalidAddress("SEUvfCySnAqzuNvbRh2SZCbSro8e2dxLYK");
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue