Skip to content

Commit

Permalink
Add Polygon (#77)
Browse files Browse the repository at this point in the history
* Added an endpoint for Mumbai/Matic mainnet

* v1.4.6
  • Loading branch information
makoto authored Jul 26, 2021
1 parent 500e2f7 commit e141817
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 12 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,4 +401,8 @@ For all the latest deployed deployer contracts, see refer to `deployedAddresses.

### xDai deployer contract versions

- npm version @wearekickback/contracts-integration 1.4.0 "0x05E9AE465727AAa78De8F761E44D78b43a5d9697"
- npm version @wearekickback/contracts-integration 1.4.0 "0x05E9AE465727AAa78De8F761E44D78b43a5d9697"

### Polygon deployer contract versions

- "0xc1d24FB1a9c6b5051c28b0e963473D3cE3EB3491"
12 changes: 12 additions & 0 deletions deployedAddresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,5 +208,17 @@
"links": {},
"address": "0x779051814b0D1C6714a484a24ba65185ED310139",
"transactionHash": "0xed49348bd031c5eefd91f48114430cede9b6b389540e300623e92d0970b17d32"
},
"137": {
"events": {},
"links": {},
"address": "0xC5ddF439194f84AF79db7d7cd534aD01cC58910d",
"transactionHash": "0x666fe195281dd361995a88786b4534824beafb46852c3a16e8016cabe5e2cb0c"
},
"80001": {
"events": {},
"links": {},
"address": "0xc1d24FB1a9c6b5051c28b0e963473D3cE3EB3491",
"transactionHash": "0xb85a097a92e729c9b83fea2263a8e2fd227a295c349cfbe866421c333625b1e6"
}
}
5 changes: 0 additions & 5 deletions migrations/1_initial_migration.js

This file was deleted.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wearekickback/contracts",
"version": "1.4.5",
"version": "1.4.6",
"description": "Kickback smart contracts",
"main": "index.js",
"publishConfig": {
Expand All @@ -22,6 +22,8 @@
"deploy:kovan": "yarn truffle migrate --network kovan && scripts/local/extractDeployedAddresses.js",
"deploy:rinkeby": "yarn truffle migrate --network rinkeby && scripts/local/extractDeployedAddresses.js",
"deploy:xdai": "yarn truffle migrate --network xdai && scripts/local/extractDeployedAddresses.js",
"deploy:polygon": "yarn truffle migrate --network polygon && scripts/local/extractDeployedAddresses.js",
"deploy:mumbai": "yarn truffle migrate --network mumbai && scripts/local/extractDeployedAddresses.js",
"deploy:local": "yarn truffle migrate && scripts/local/updateOtherReposWithDeployerAddress.js",
"deploy:local2": "npx hardhat run --network localhost scripts/local/deploy.js",
"docker:network": "docker network create kickback",
Expand Down Expand Up @@ -59,7 +61,7 @@
"@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers",
"@nomiclabs/hardhat-truffle5": "^2.0.0",
"@nomiclabs/hardhat-web3": "^2.0.0",
"@truffle/hdwallet-provider": "^1.3.0",
"@truffle/hdwallet-provider": "^1.4.0",
"@wearekickback/shared": "^1.14.1",
"axios": "^0.21.1",
"babel-cli": "^6.26.0",
Expand Down
2 changes: 2 additions & 0 deletions scripts/local/extractDeployedAddresses.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Object.keys(deployedAddresses).forEach(key => {
case '4': // rinkeby
case '42': // kovan
case '100': // poa-xdai
case '137': // polygon
case '80001': // mumbai
break
default:
delete deployedAddresses[key]
Expand Down
10 changes: 10 additions & 0 deletions truffle-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ module.exports = {
gasPrice: 0x01, // <-- Use this low gas price
network_id: 100
},
polygon: {
provider: (num_addresses = 1) => new HDWalletProvider(mnemonic, `https://rpc-mainnet.maticvigil.com/v1/${infuraKey}`, 0, num_addresses),
gasPrice: 1000000000, // 1 gwei
network_id: 137
},
mumbai:{
provider: (num_addresses = 1) => new HDWalletProvider(mnemonic, `https://rpc-mumbai.maticvigil.com/v1/${infuraKey}`, 0, num_addresses),
gasPrice: 1000000000, // 1 gwei
network_id: 80001
},
mainnet: {
// gas: 5000000,
provider: (num_addresses = 1) => new HDWalletProvider(mnemonic, `https://mainnet.infura.io/v3/${infuraKey}`, 0, num_addresses),
Expand Down
9 changes: 5 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2060,16 +2060,17 @@
emittery "^0.4.1"
ora "^3.4.0"

"@truffle/hdwallet-provider@^1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@truffle/hdwallet-provider/-/hdwallet-provider-1.3.0.tgz#3936f08971fbe00cee480c71d471f91afbf5090f"
integrity sha512-/qpChSNAN1ziMF+dJiPLDjcv26p8eV4n/SiBWSzVxbLLXZOJmpn5pTCVtXqI9pn2fGR3gtaAL39hvR/DAiD9EQ==
"@truffle/hdwallet-provider@^1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@truffle/hdwallet-provider/-/hdwallet-provider-1.4.0.tgz#8b937d0688eebc049db4ab0e9ed895598b9b4d48"
integrity sha512-zCc4IWEtfAuKWWktZOaYFoHCvameQIz5Bk+S2ahCPxYMlWECWrbCMjoqqLojB1Hyz+IsvU1cspmr3E6PoO4ZmQ==
dependencies:
"@trufflesuite/web3-provider-engine" "15.0.13-1"
any-promise "^1.3.0"
bindings "^1.5.0"
ethereum-cryptography "^0.1.3"
ethereum-protocol "^1.0.1"
ethereumjs-common "^1.5.0"
ethereumjs-tx "^2.1.2"
ethereumjs-util "^6.1.0"
ethereumjs-wallet "^1.0.1"
Expand Down

0 comments on commit e141817

Please sign in to comment.