-
Notifications
You must be signed in to change notification settings - Fork 2
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 #83 from buttonwood-protocol/updating-prettier-config
Updating prettier config
- Loading branch information
Showing
55 changed files
with
2,964 additions
and
2,879 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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"semi": false, | ||
"semi": true, | ||
"trailingComma": "all", | ||
"singleQuote": true, | ||
"bracketSpacing": true, | ||
|
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Signer } from '@ethersproject/abstract-signer' | ||
import { task } from 'hardhat/config' | ||
import { Signer } from '@ethersproject/abstract-signer'; | ||
import { task } from 'hardhat/config'; | ||
|
||
task('accounts', 'Prints the list of accounts', async (_taskArgs, hre) => { | ||
const accounts: Signer[] = await hre.ethers.getSigners() | ||
const accounts: Signer[] = await hre.ethers.getSigners(); | ||
|
||
for (const account of accounts) { | ||
console.log(await account.getAddress()) | ||
console.log(await account.getAddress()); | ||
} | ||
}) | ||
}); |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import fsExtra from 'fs-extra' | ||
import { TASK_CLEAN } from 'hardhat/builtin-tasks/task-names' | ||
import { task } from 'hardhat/config' | ||
import fsExtra from 'fs-extra'; | ||
import { TASK_CLEAN } from 'hardhat/builtin-tasks/task-names'; | ||
import { task } from 'hardhat/config'; | ||
|
||
task( | ||
TASK_CLEAN, | ||
'Overrides the standard clean task', | ||
async function (_taskArgs, _hre, runSuper) { | ||
await fsExtra.remove('./coverage') | ||
await fsExtra.remove('./coverage.json') | ||
await runSuper() | ||
await fsExtra.remove('./coverage'); | ||
await fsExtra.remove('./coverage.json'); | ||
await runSuper(); | ||
}, | ||
) | ||
); |
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 |
---|---|---|
@@ -1,39 +1,42 @@ | ||
import { task, types } from 'hardhat/config' | ||
import { TaskArguments } from 'hardhat/types' | ||
import { task, types } from 'hardhat/config'; | ||
import { TaskArguments } from 'hardhat/types'; | ||
|
||
task('deploy:ButtonTokenWamplRouter') | ||
.addParam('wampl', 'the address of wampl', undefined, types.string, false) | ||
.setAction(async function (_args: TaskArguments, hre) { | ||
const { wampl } = _args | ||
console.log('Signer', await (await hre.ethers.getSigners())[0].getAddress()) | ||
const { wampl } = _args; | ||
console.log( | ||
'Signer', | ||
await (await hre.ethers.getSigners())[0].getAddress(), | ||
); | ||
const ButtonTokenWamplRouter = await hre.ethers.getContractFactory( | ||
'ButtonTokenWamplRouter', | ||
) | ||
const buttonTokenWamplRouter = await ButtonTokenWamplRouter.deploy(wampl) | ||
await buttonTokenWamplRouter.deployed() | ||
const buttonTokenWamplRouterAddress = buttonTokenWamplRouter.address | ||
); | ||
const buttonTokenWamplRouter = await ButtonTokenWamplRouter.deploy(wampl); | ||
await buttonTokenWamplRouter.deployed(); | ||
const buttonTokenWamplRouterAddress = buttonTokenWamplRouter.address; | ||
console.log( | ||
`ButtonTokenWamplRouter deployed to ${buttonTokenWamplRouterAddress}`, | ||
) | ||
); | ||
|
||
try { | ||
await hre.run('verify:ButtonTokenWamplRouter', { | ||
address: buttonTokenWamplRouterAddress, | ||
wampl, | ||
}) | ||
}); | ||
} catch (e) { | ||
console.log('Unable to verify on etherscan', e) | ||
console.log('Unable to verify on etherscan', e); | ||
} | ||
}) | ||
}); | ||
|
||
task('verify:ButtonTokenWamplRouter', 'Verifies on etherscan') | ||
.addParam('address', 'the contract address', undefined, types.string, false) | ||
.addParam('wampl', 'the address of wampl', undefined, types.string, false) | ||
.setAction(async function (args: TaskArguments, hre) { | ||
const { address, wampl } = args | ||
const { address, wampl } = args; | ||
|
||
await hre.run('verify:verify', { | ||
address, | ||
constructorArguments: [wampl], | ||
}) | ||
}) | ||
}); | ||
}); |
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 |
---|---|---|
@@ -1,39 +1,42 @@ | ||
import { task, types } from 'hardhat/config' | ||
import { TaskArguments } from 'hardhat/types' | ||
import { task, types } from 'hardhat/config'; | ||
import { TaskArguments } from 'hardhat/types'; | ||
|
||
task('deploy:ButtonTokenWethRouter') | ||
.addParam('weth', 'the address of weth', undefined, types.string, false) | ||
.setAction(async function (_args: TaskArguments, hre) { | ||
const { weth } = _args | ||
console.log('Signer', await (await hre.ethers.getSigners())[0].getAddress()) | ||
const { weth } = _args; | ||
console.log( | ||
'Signer', | ||
await (await hre.ethers.getSigners())[0].getAddress(), | ||
); | ||
const ButtonTokenWethRouter = await hre.ethers.getContractFactory( | ||
'ButtonTokenWethRouter', | ||
) | ||
const buttonTokenWethRouter = await ButtonTokenWethRouter.deploy(weth) | ||
await buttonTokenWethRouter.deployed() | ||
const buttonTokenWethRouterAddress = buttonTokenWethRouter.address | ||
); | ||
const buttonTokenWethRouter = await ButtonTokenWethRouter.deploy(weth); | ||
await buttonTokenWethRouter.deployed(); | ||
const buttonTokenWethRouterAddress = buttonTokenWethRouter.address; | ||
console.log( | ||
`ButtonTokenWethRouter deployed to ${buttonTokenWethRouterAddress}`, | ||
) | ||
); | ||
|
||
try { | ||
await hre.run('verify:ButtonTokenWethRouter', { | ||
address: buttonTokenWethRouterAddress, | ||
weth, | ||
}) | ||
}); | ||
} catch (e) { | ||
console.log('Unable to verify on etherscan', e) | ||
console.log('Unable to verify on etherscan', e); | ||
} | ||
}) | ||
}); | ||
|
||
task('verify:ButtonTokenWethRouter', 'Verifies on etherscan') | ||
.addParam('address', 'the contract address', undefined, types.string, false) | ||
.addParam('weth', 'the address of weth', undefined, types.string, false) | ||
.setAction(async function (args: TaskArguments, hre) { | ||
const { address, weth } = args | ||
const { address, weth } = args; | ||
|
||
await hre.run('verify:verify', { | ||
address, | ||
constructorArguments: [weth], | ||
}) | ||
}) | ||
}); | ||
}); |
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 |
---|---|---|
@@ -1,37 +1,37 @@ | ||
import { task, types } from 'hardhat/config' | ||
import { TaskArguments } from 'hardhat/types' | ||
import { task, types } from 'hardhat/config'; | ||
import { TaskArguments } from 'hardhat/types'; | ||
|
||
task('deploy:API3Oracle') | ||
.addParam('dapiproxy', 'the address of the underlying DapiProxy contract') | ||
.addParam('stalenessthresholdsecs', 'the number of seconds before refresh') | ||
.setAction(async function (args: TaskArguments, hre) { | ||
const { dapiproxy, stalenessthresholdsecs } = args | ||
const API3Oracle = await hre.ethers.getContractFactory('API3Oracle') | ||
const oracle = await API3Oracle.deploy(dapiproxy, stalenessthresholdsecs) | ||
await oracle.deployed() | ||
const oracleAddress = oracle.address | ||
console.log(`Oracle deployed to ${oracleAddress}`) | ||
const { dapiproxy, stalenessthresholdsecs } = args; | ||
const API3Oracle = await hre.ethers.getContractFactory('API3Oracle'); | ||
const oracle = await API3Oracle.deploy(dapiproxy, stalenessthresholdsecs); | ||
await oracle.deployed(); | ||
const oracleAddress = oracle.address; | ||
console.log(`Oracle deployed to ${oracleAddress}`); | ||
|
||
try { | ||
await hre.run('verify:API3Oracle', { | ||
address: oracleAddress, | ||
dapiproxy, | ||
stalenessthresholdsecs, | ||
}) | ||
}); | ||
} catch (e) { | ||
console.log('Unable to verify on etherscan', e) | ||
console.log('Unable to verify on etherscan', e); | ||
} | ||
}) | ||
}); | ||
|
||
task('verify:API3Oracle') | ||
.addParam('address', 'the contract address', undefined, types.string, false) | ||
.addParam('dapiproxy', 'the address of the underlying DapiProxy contract') | ||
.addParam('stalenessthresholdsecs', 'the number of seconds before refresh') | ||
.setAction(async function (args: TaskArguments, hre) { | ||
const { address, dapiproxy, stalenessthresholdsecs } = args | ||
const { address, dapiproxy, stalenessthresholdsecs } = args; | ||
|
||
await hre.run('verify:verify', { | ||
address, | ||
constructorArguments: [dapiproxy, stalenessthresholdsecs], | ||
}) | ||
}) | ||
}); | ||
}); |
Oops, something went wrong.