From f8a60f11c30f562e85100b6a1e906b5eae0df449 Mon Sep 17 00:00:00 2001 From: veeso Date: Mon, 22 Jan 2024 11:56:12 +0100 Subject: [PATCH] fix: provide swap fee as env on deploy --- ethereum/fly/.env.github | 1 + ethereum/fly/.gitignore | 2 ++ ethereum/fly/scripts/deploy.ts | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ethereum/fly/.env.github b/ethereum/fly/.env.github index 3ef11b2..f40ada4 100644 --- a/ethereum/fly/.env.github +++ b/ethereum/fly/.env.github @@ -4,3 +4,4 @@ PROD_PRIVATE_KEY="00000000000000000000000000000000000000000000000000000000000000 DEV_PRIVATE_KEY="0000000000000000000000000000000000000000000000000000000000000000" LOCAL_PRIVATE_KEY="ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" OWNER_ADDRESS="0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" +SWAP_FEE=10 diff --git a/ethereum/fly/.gitignore b/ethereum/fly/.gitignore index 684b63e..4d149e5 100644 --- a/ethereum/fly/.gitignore +++ b/ethereum/fly/.gitignore @@ -131,6 +131,8 @@ dist node_modules .env +.env.* +!.env.github coverage coverage.json typechain diff --git a/ethereum/fly/scripts/deploy.ts b/ethereum/fly/scripts/deploy.ts index 9ec1d61..f9800eb 100644 --- a/ethereum/fly/scripts/deploy.ts +++ b/ethereum/fly/scripts/deploy.ts @@ -1,12 +1,12 @@ import { ethers } from "hardhat"; require("dotenv").config(); -const { OWNER_ADDRESS } = process.env; +const { OWNER_ADDRESS, SWAP_FEE } = process.env; async function main() { // deploy contract const Contract = await ethers.getContractFactory("Fly"); - const contract = await Contract.deploy(OWNER_ADDRESS!, 761_035); + const contract = await Contract.deploy(OWNER_ADDRESS!, SWAP_FEE!); await contract.waitForDeployment(); const address = await contract.getAddress(); console.log(`Contract deployed to ${address}`);