-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from pooltogether/feat/deploy-twab-delegator
Release v1.3.0
- Loading branch information
Showing
22 changed files
with
6,625 additions
and
1,024 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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,35 @@ | ||
import { dim, red } from 'chalk'; | ||
import { HardhatRuntimeEnvironment } from 'hardhat/types'; | ||
|
||
import { deployAndLog } from '../../src/deployAndLog'; | ||
|
||
export default async function deployToAvalanche(hardhat: HardhatRuntimeEnvironment) { | ||
if (process.env.DEPLOY === 'v1.3.0.avalanche') { | ||
dim(`Deploying: TWAB Delegator Avalanche Mainnet`); | ||
dim(`Version: 1.3.0`); | ||
} else { | ||
return; | ||
} | ||
|
||
const { getNamedAccounts, ethers } = hardhat; | ||
const { getContract } = ethers; | ||
|
||
const { deployer } = await getNamedAccounts(); | ||
|
||
const prizePool = await getContract('YieldSourcePrizePool'); | ||
const ticket = await getContract('Ticket'); | ||
|
||
// =================================================== | ||
// Deploy Contracts | ||
// =================================================== | ||
|
||
if (await prizePool.getTicket() === ticket.address) { | ||
await deployAndLog('TWABDelegator', { | ||
from: deployer, | ||
args: ['PoolTogether Staked avUSDCe Ticket', 'stkPTavUSDCe', ticket.address], | ||
skipIfAlreadyDeployed: true, | ||
}); | ||
} else { | ||
red('Pool ticket address does not match ticket contract address'); | ||
} | ||
} |
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,32 @@ | ||
import { dim, red } from 'chalk'; | ||
import { HardhatRuntimeEnvironment } from 'hardhat/types'; | ||
import { deployAndLog } from '../../src/deployAndLog'; | ||
|
||
export default async function deployToEthereumMainnet(hardhat: HardhatRuntimeEnvironment){ | ||
if (process.env.DEPLOY === 'v1.3.0.mainnet') { | ||
dim(`Deploying: TWAB Delegator Ethereum Mainnet`) | ||
dim(`Version: 1.3.0`) | ||
} else { return } | ||
|
||
const { getNamedAccounts, ethers } = hardhat; | ||
const { getContract } = ethers; | ||
|
||
const { deployer } = await getNamedAccounts(); | ||
|
||
const prizePool = await getContract('YieldSourcePrizePool'); | ||
const ticket = await getContract('Ticket'); | ||
|
||
// =================================================== | ||
// Deploy Contracts | ||
// =================================================== | ||
|
||
if (await prizePool.getTicket() === ticket.address) { | ||
await deployAndLog('TWABDelegator', { | ||
from: deployer, | ||
args: ['PoolTogether Staked aUSDC Ticket', 'stkPTaUSDC', ticket.address], | ||
skipIfAlreadyDeployed: true, | ||
}); | ||
} else { | ||
red('Pool ticket address does not match ticket contract address'); | ||
} | ||
} |
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,32 @@ | ||
import { dim, red } from 'chalk'; | ||
import { HardhatRuntimeEnvironment } from 'hardhat/types'; | ||
import { deployAndLog } from '../../src/deployAndLog'; | ||
|
||
export default async function deployToPolygon(hardhat: HardhatRuntimeEnvironment) { | ||
if (process.env.DEPLOY === 'v1.3.0.polygon') { | ||
dim(`Deploying: TWAB Delegator Polygon Mainnet`) | ||
dim(`Version: 1.3.0`) | ||
} else { return } | ||
|
||
const { getNamedAccounts, ethers } = hardhat; | ||
const { getContract } = ethers; | ||
|
||
const { deployer } = await getNamedAccounts(); | ||
|
||
const prizePool = await getContract('YieldSourcePrizePool'); | ||
const ticket = await getContract('Ticket'); | ||
|
||
// =================================================== | ||
// Deploy Contracts | ||
// =================================================== | ||
|
||
if (await prizePool.getTicket() === ticket.address) { | ||
await deployAndLog('TWABDelegator', { | ||
from: deployer, | ||
args: ['PoolTogether Staked aUSDC Ticket', 'stkPTaUSDC', ticket.address], | ||
skipIfAlreadyDeployed: true, | ||
}); | ||
} else { | ||
red('Pool ticket address does not match ticket contract address'); | ||
} | ||
} |
Oops, something went wrong.