-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Chris Lahaye <[email protected]>
- Loading branch information
1 parent
2cd2cf1
commit 1819fbb
Showing
7 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { ethers, upgrades } from 'hardhat'; | ||
|
||
const { AXELAR_GATEWAY, AXELAR_GAS_SERVICE, AXELAR_NETWORKS, CALL_ADDRESS, MAX_SUPPLY } = process.env; | ||
|
||
async function main() { | ||
const contractFactory = await ethers.getContractFactory('BaseV1'); | ||
|
||
const proxy = await upgrades.deployProxy(contractFactory, [ | ||
AXELAR_GATEWAY, | ||
AXELAR_GAS_SERVICE, | ||
AXELAR_NETWORKS && JSON.parse(AXELAR_NETWORKS) || [], | ||
CALL_ADDRESS || ethers.constants.AddressZero, | ||
MAX_SUPPLY, | ||
]); | ||
|
||
console.log(proxy.address); | ||
} | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { ethers, upgrades } from 'hardhat'; | ||
|
||
const { PASSPORT } = process.env; | ||
|
||
async function main() { | ||
const contractFactory = await ethers.getContractFactory('CrowdfundV1'); | ||
|
||
const proxy = await upgrades.deployProxy(contractFactory, [ | ||
PASSPORT, | ||
]); | ||
|
||
console.log(proxy.address); | ||
} | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { ethers, upgrades } from 'hardhat'; | ||
|
||
const { AXELAR_GATEWAY, AXELAR_GAS_SERVICE, AXELAR_BASE_NETWORK_CHAIN, AXELAR_BASE_NETWORK_CONTRACT_ADDRESS, NAME, SYMBOL, PRICE_AMOUNT, PRICE_FEED_1, PRICE_FEED_2, TREASURY, DRAWER } = process.env; | ||
|
||
const AXELAR_BASE_NETWORK = ethers.utils.keccak256(ethers.utils.toUtf8Bytes('BASE_NETWORK')); | ||
|
||
async function main() { | ||
const contractFactory = await ethers.getContractFactory('PassportV1Axelar'); | ||
|
||
const proxy = await upgrades.deployProxy(contractFactory, [ | ||
AXELAR_GATEWAY, | ||
AXELAR_GAS_SERVICE, | ||
[[AXELAR_BASE_NETWORK, [AXELAR_BASE_NETWORK_CHAIN, AXELAR_BASE_NETWORK_CONTRACT_ADDRESS]]], | ||
NAME, | ||
SYMBOL, | ||
PRICE_AMOUNT, | ||
PRICE_FEED_1 || ethers.constants.AddressZero, | ||
PRICE_FEED_2 || ethers.constants.AddressZero, | ||
TREASURY, | ||
DRAWER | ||
]); | ||
|
||
console.log(proxy.address); | ||
} | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { ethers, upgrades } from 'hardhat'; | ||
|
||
const { CALL_ADDRESS, NAME, SYMBOL, PRICE_AMOUNT, PRICE_FEED_1, PRICE_FEED_2, TREASURY, DRAWER } = process.env; | ||
|
||
async function main() { | ||
const contractFactory = await ethers.getContractFactory('PassportV1Call'); | ||
|
||
const proxy = await upgrades.deployProxy(contractFactory, [ | ||
CALL_ADDRESS, | ||
NAME, | ||
SYMBOL, | ||
PRICE_AMOUNT, | ||
PRICE_FEED_1 || ethers.constants.AddressZero, | ||
PRICE_FEED_2 || ethers.constants.AddressZero, | ||
TREASURY, | ||
DRAWER | ||
]); | ||
|
||
console.log(proxy.address); | ||
} | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { ethers, upgrades } from 'hardhat'; | ||
import * as assert from 'assert'; | ||
|
||
const { NAME } = process.env; | ||
|
||
async function main() { | ||
assert.ok(NAME); | ||
|
||
const contractFactory = await ethers.getContractFactory(NAME); | ||
|
||
const proxy = await upgrades.deployProxy(contractFactory); | ||
|
||
console.log(proxy.address); | ||
} | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { ethers, upgrades } from 'hardhat'; | ||
import * as assert from 'assert'; | ||
|
||
const { NAME, PROXY_ADDRESS } = process.env; | ||
|
||
async function main() { | ||
assert.ok(NAME && PROXY_ADDRESS); | ||
|
||
const contractFactory = await ethers.getContractFactory(NAME); | ||
|
||
const upgrade = await upgrades.prepareUpgrade(PROXY_ADDRESS, contractFactory); | ||
|
||
console.info(upgrade); | ||
} | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { ethers, upgrades } from 'hardhat'; | ||
import * as assert from 'assert'; | ||
|
||
const { NAME, PROXY_ADDRESS } = process.env; | ||
|
||
async function main() { | ||
assert.ok(NAME && PROXY_ADDRESS); | ||
|
||
const contractFactory = await ethers.getContractFactory(NAME); | ||
|
||
await upgrades.upgradeProxy(PROXY_ADDRESS, contractFactory); | ||
} | ||
|
||
main(); |