CI: Updated dist files.
This commit is contained in:
parent
c75c937b13
commit
efeeda5e5c
@ -407,26 +407,30 @@ function waiter(duration) {
|
||||
});
|
||||
}
|
||||
const allNetworks = ["default", "homestead", "ropsten", "rinkeby", "kovan", "goerli"];
|
||||
const ApiKeys = {
|
||||
alchemy: "YrPw6SWb20vJDRFkhWq8aKnTQ8JRNRHM",
|
||||
etherscan: "YTCX255XJGH9SCBUDP2K48S4YWACUEFSJX",
|
||||
infura: "49a0efa3aaee4fd99797bfa94d8ce2f1",
|
||||
};
|
||||
const providerFunctions = [
|
||||
{
|
||||
name: "getDefaultProvider",
|
||||
networks: allNetworks,
|
||||
create: (network) => {
|
||||
if (network == "default") {
|
||||
return ethers.getDefaultProvider();
|
||||
return ethers.getDefaultProvider(null, ApiKeys);
|
||||
}
|
||||
return ethers.getDefaultProvider(network);
|
||||
return ethers.getDefaultProvider(network, ApiKeys);
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "AlchemyProvider",
|
||||
networks: allNetworks,
|
||||
create: (network) => {
|
||||
const testKey = "YrPw6SWb20vJDRFkhWq8aKnTQ8JRNRHM";
|
||||
if (network == "default") {
|
||||
return new ethers.providers.AlchemyProvider(null, testKey);
|
||||
return new ethers.providers.AlchemyProvider(null, ApiKeys.alchemy);
|
||||
}
|
||||
return new ethers.providers.AlchemyProvider(network, testKey);
|
||||
return new ethers.providers.AlchemyProvider(network, ApiKeys.alchemy);
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -441,20 +445,19 @@ const providerFunctions = [
|
||||
networks: allNetworks,
|
||||
create: (network) => {
|
||||
if (network == "default") {
|
||||
return new ethers.providers.InfuraProvider();
|
||||
return new ethers.providers.InfuraProvider(null, ApiKeys.infura);
|
||||
}
|
||||
return new ethers.providers.InfuraProvider(network);
|
||||
return new ethers.providers.InfuraProvider(network, ApiKeys.infura);
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "EtherscanProvider",
|
||||
networks: allNetworks,
|
||||
create: (network) => {
|
||||
const testKey = "YTCX255XJGH9SCBUDP2K48S4YWACUEFSJX";
|
||||
if (network == "default") {
|
||||
return new ethers.providers.EtherscanProvider(null, testKey);
|
||||
return new ethers.providers.EtherscanProvider(null, ApiKeys.infura);
|
||||
}
|
||||
return new ethers.providers.EtherscanProvider(network, testKey);
|
||||
return new ethers.providers.EtherscanProvider(network, ApiKeys.infura);
|
||||
}
|
||||
},
|
||||
{
|
||||
|
File diff suppressed because one or more lines are too long
@ -438,26 +438,30 @@ function waiter(duration) {
|
||||
});
|
||||
}
|
||||
var allNetworks = ["default", "homestead", "ropsten", "rinkeby", "kovan", "goerli"];
|
||||
var ApiKeys = {
|
||||
alchemy: "YrPw6SWb20vJDRFkhWq8aKnTQ8JRNRHM",
|
||||
etherscan: "YTCX255XJGH9SCBUDP2K48S4YWACUEFSJX",
|
||||
infura: "49a0efa3aaee4fd99797bfa94d8ce2f1",
|
||||
};
|
||||
var providerFunctions = [
|
||||
{
|
||||
name: "getDefaultProvider",
|
||||
networks: allNetworks,
|
||||
create: function (network) {
|
||||
if (network == "default") {
|
||||
return ethers_1.ethers.getDefaultProvider();
|
||||
return ethers_1.ethers.getDefaultProvider(null, ApiKeys);
|
||||
}
|
||||
return ethers_1.ethers.getDefaultProvider(network);
|
||||
return ethers_1.ethers.getDefaultProvider(network, ApiKeys);
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "AlchemyProvider",
|
||||
networks: allNetworks,
|
||||
create: function (network) {
|
||||
var testKey = "YrPw6SWb20vJDRFkhWq8aKnTQ8JRNRHM";
|
||||
if (network == "default") {
|
||||
return new ethers_1.ethers.providers.AlchemyProvider(null, testKey);
|
||||
return new ethers_1.ethers.providers.AlchemyProvider(null, ApiKeys.alchemy);
|
||||
}
|
||||
return new ethers_1.ethers.providers.AlchemyProvider(network, testKey);
|
||||
return new ethers_1.ethers.providers.AlchemyProvider(network, ApiKeys.alchemy);
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -472,20 +476,19 @@ var providerFunctions = [
|
||||
networks: allNetworks,
|
||||
create: function (network) {
|
||||
if (network == "default") {
|
||||
return new ethers_1.ethers.providers.InfuraProvider();
|
||||
return new ethers_1.ethers.providers.InfuraProvider(null, ApiKeys.infura);
|
||||
}
|
||||
return new ethers_1.ethers.providers.InfuraProvider(network);
|
||||
return new ethers_1.ethers.providers.InfuraProvider(network, ApiKeys.infura);
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "EtherscanProvider",
|
||||
networks: allNetworks,
|
||||
create: function (network) {
|
||||
var testKey = "YTCX255XJGH9SCBUDP2K48S4YWACUEFSJX";
|
||||
if (network == "default") {
|
||||
return new ethers_1.ethers.providers.EtherscanProvider(null, testKey);
|
||||
return new ethers_1.ethers.providers.EtherscanProvider(null, ApiKeys.infura);
|
||||
}
|
||||
return new ethers_1.ethers.providers.EtherscanProvider(network, testKey);
|
||||
return new ethers_1.ethers.providers.EtherscanProvider(network, ApiKeys.infura);
|
||||
}
|
||||
},
|
||||
{
|
||||
|
File diff suppressed because one or more lines are too long
@ -35,7 +35,7 @@
|
||||
"scripts": {
|
||||
"test": "exit 1"
|
||||
},
|
||||
"tarballHash": "0xa04c8f73fc06eec8e9b75799181b97d43968c7fc9706480c7c9605d3d1d0a4f2",
|
||||
"tarballHash": "0x8d40adaf2cdd7511596449823d5efd2eb3f2550b2f69f7fbce7342eb79a88cdc",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.10"
|
||||
}
|
||||
|
@ -434,26 +434,31 @@ type TestDescription = {
|
||||
|
||||
const allNetworks = [ "default", "homestead", "ropsten", "rinkeby", "kovan", "goerli" ];
|
||||
|
||||
const ApiKeys: Record<string, string> = {
|
||||
alchemy: "YrPw6SWb20vJDRFkhWq8aKnTQ8JRNRHM",
|
||||
etherscan: "YTCX255XJGH9SCBUDP2K48S4YWACUEFSJX",
|
||||
infura: "49a0efa3aaee4fd99797bfa94d8ce2f1",
|
||||
};
|
||||
|
||||
const providerFunctions: Array<ProviderDescription> = [
|
||||
{
|
||||
name: "getDefaultProvider",
|
||||
networks: allNetworks,
|
||||
create: (network: string) => {
|
||||
if (network == "default") {
|
||||
return ethers.getDefaultProvider();
|
||||
return ethers.getDefaultProvider(null, ApiKeys);
|
||||
}
|
||||
return ethers.getDefaultProvider(network);
|
||||
return ethers.getDefaultProvider(network, ApiKeys);
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "AlchemyProvider",
|
||||
networks: allNetworks,
|
||||
create: (network: string) => {
|
||||
const testKey = "YrPw6SWb20vJDRFkhWq8aKnTQ8JRNRHM";
|
||||
if (network == "default") {
|
||||
return new ethers.providers.AlchemyProvider(null, testKey);
|
||||
return new ethers.providers.AlchemyProvider(null, ApiKeys.alchemy);
|
||||
}
|
||||
return new ethers.providers.AlchemyProvider(network, testKey);
|
||||
return new ethers.providers.AlchemyProvider(network, ApiKeys.alchemy);
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -468,20 +473,19 @@ const providerFunctions: Array<ProviderDescription> = [
|
||||
networks: allNetworks,
|
||||
create: (network: string) => {
|
||||
if (network == "default") {
|
||||
return new ethers.providers.InfuraProvider();
|
||||
return new ethers.providers.InfuraProvider(null, ApiKeys.infura);
|
||||
}
|
||||
return new ethers.providers.InfuraProvider(network);
|
||||
return new ethers.providers.InfuraProvider(network, ApiKeys.infura);
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "EtherscanProvider",
|
||||
networks: allNetworks,
|
||||
create: (network: string) => {
|
||||
const testKey = "YTCX255XJGH9SCBUDP2K48S4YWACUEFSJX";
|
||||
if (network == "default") {
|
||||
return new ethers.providers.EtherscanProvider(null, testKey);
|
||||
return new ethers.providers.EtherscanProvider(null, ApiKeys.infura);
|
||||
}
|
||||
return new ethers.providers.EtherscanProvider(network, testKey);
|
||||
return new ethers.providers.EtherscanProvider(network, ApiKeys.infura);
|
||||
}
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user