Celo Alfajores faucet
This commit is contained in:
parent
ec382cd9d9
commit
2c22f92d10
|
@ -6,6 +6,7 @@ const {
|
||||||
KOVAN_CODE,
|
KOVAN_CODE,
|
||||||
SOKOL_CODE,
|
SOKOL_CODE,
|
||||||
RSK_TESTNET_CODE,
|
RSK_TESTNET_CODE,
|
||||||
|
CELO_ALFAJORES_TESTNET_CODE,
|
||||||
} = networkIDs
|
} = networkIDs
|
||||||
|
|
||||||
function getFaucetLinks(network) {
|
function getFaucetLinks(network) {
|
||||||
|
@ -23,6 +24,8 @@ function getFaucetLinks(network) {
|
||||||
return ['https://faucet.poa.network/']
|
return ['https://faucet.poa.network/']
|
||||||
case RSK_TESTNET_CODE:
|
case RSK_TESTNET_CODE:
|
||||||
return ['https://faucet.rsk.co/']
|
return ['https://faucet.rsk.co/']
|
||||||
|
case CELO_ALFAJORES_TESTNET_CODE:
|
||||||
|
return ['https://celo.org/developers/faucet']
|
||||||
default:
|
default:
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "eth-net-props",
|
"name": "eth-net-props",
|
||||||
"version": "1.0.39",
|
"version": "1.0.40",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "eth-net-props",
|
"name": "eth-net-props",
|
||||||
"version": "1.0.39",
|
"version": "1.0.40",
|
||||||
"description": "Get properties of EMV-based network",
|
"description": "Get properties of EMV-based network",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
|
|
|
@ -194,6 +194,13 @@ describe('eth-net-props', () => {
|
||||||
assert.equal(goerliFaucetLinks[0], 'https://goerli-faucet.slock.it/')
|
assert.equal(goerliFaucetLinks[0], 'https://goerli-faucet.slock.it/')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
it(`${claimPrefix} CELO Alfajores`, () => {
|
||||||
|
const celoAlfajoresFaucetLinks = faucetLinks.getFaucetLinks(44787)
|
||||||
|
assert.equal(celoAlfajoresFaucetLinks.length, 1)
|
||||||
|
if (celoAlfajoresFaucetLinks.length > 0) {
|
||||||
|
assert.equal(celoAlfajoresFaucetLinks[0], 'https://celo.org/developers/faucet')
|
||||||
|
}
|
||||||
|
})
|
||||||
it('should not return faucet link for production blockchains', () => {
|
it('should not return faucet link for production blockchains', () => {
|
||||||
assert.equal(faucetLinks.getFaucetLinks(1).length, 0)
|
assert.equal(faucetLinks.getFaucetLinks(1).length, 0)
|
||||||
assert.equal(faucetLinks.getFaucetLinks(99).length, 0)
|
assert.equal(faucetLinks.getFaucetLinks(99).length, 0)
|
||||||
|
|
Loading…
Reference in New Issue