-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b3d00bd
commit 9a0e9d0
Showing
18 changed files
with
1,201 additions
and
962 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 |
---|---|---|
@@ -1,16 +1,15 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', // Specifies the ESLint parser | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features | ||
sourceType: 'module', // Allows for the use of imports | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
}, | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin | ||
'plugin:prettier/recommended', // Enable | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:prettier/recommended', // Puts Prettier last to override other settings | ||
], | ||
rules: { | ||
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs | ||
// e.g. "@typescript-eslint/explicit-function-return-type": "off", | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
// other rules... | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1,31 +1,30 @@ | ||
import fs from "fs"; | ||
import path from "path"; | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import { DeployFunction } from 'hardhat-deploy/types'; | ||
|
||
|
||
const func: DeployFunction = async function ({ deployments, config }) { | ||
const { get, log } = deployments; | ||
|
||
const SimpleSwapFactory = await get("SimpleSwapFactory"); | ||
const PriceOracle = await get("PriceOracle"); | ||
const SimpleSwapFactory = await get('SimpleSwapFactory'); | ||
const PriceOracle = await get('PriceOracle'); | ||
|
||
// Generate content for the environment file | ||
let content = ""; | ||
let content = ''; | ||
|
||
content += `echo "----- USE THE COMMANDS BELOW TO SETUP YOUR TERMINALS -----" >&2\n\n`; | ||
content += `export BEE_SWAP_FACTORY_ADDRESS=${SimpleSwapFactory.address}\n`; | ||
content += `export BEE_SWAP_LEGACY_FACTORY_ADDRESSES=${SimpleSwapFactory.address}\n`; | ||
content += `export BEE_SWAP_PRICE_ORACLE_ADDRESS=${PriceOracle.address}\n`; | ||
content += `export BEE_SWAP_ENDPOINT=${config.networks.localhost.url}\n`; | ||
|
||
const envFilePath = path.join(__dirname, "../../deployedContracts.sh"); | ||
const envFilePath = path.join(__dirname, '../../deployedContracts.sh'); | ||
|
||
// Write the content to the file | ||
fs.writeFileSync(envFilePath, content, { flag: "a" }); | ||
fs.writeFileSync(envFilePath, content, { flag: 'a' }); | ||
log(`Exported contract addresses to ${envFilePath}`); | ||
|
||
log("----------------------------------------------------"); | ||
log('----------------------------------------------------'); | ||
}; | ||
|
||
export default func; | ||
func.tags = ["variables"]; | ||
func.tags = ['variables']; |
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,17 +1,16 @@ | ||
import { DeployFunction } from 'hardhat-deploy/types'; | ||
|
||
const func: DeployFunction = async function ({ deployments, getNamedAccounts, network }) { | ||
|
||
const { deploy, log } = deployments; | ||
const { deployer } = await getNamedAccounts(); | ||
|
||
// This code is just used for Sepolia testnet deployment | ||
const waitBlockConfirmations = network.name !== "mainnet" ? 1 : 6; | ||
const waitBlockConfirmations = network.name !== 'mainnet' ? 1 : 6; | ||
|
||
log("----------------------------------------------------"); | ||
log('----------------------------------------------------'); | ||
// sBZZ token address | ||
// TODO this still needs to be done for the first time | ||
}; | ||
|
||
func.tags = ["factory"]; | ||
func.tags = ['factory']; | ||
export default func; |
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
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
Oops, something went wrong.