Skip to content

Commit

Permalink
chore: Hardhat config fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tkemi committed Oct 14, 2024
1 parent d5619bc commit 6ee739a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 22 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ jobs:
- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-engines

- name: Create temporary .env file
run: |
echo "KEY_MAINNET=0000000000000000000000000000000000000000000000000000000000000000" >> .env
echo "KEY_TESTNET=0000000000000000000000000000000000000000000000000000000000000000" >> .env
# This is required separately from yarn test because it generates the typechain definitions
- name: Compile
run: yarn compile
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.11
12
18 changes: 9 additions & 9 deletions config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@ export default {
testnet: "",
},
Refundee: {
mainnet: "0x328f7689244Bd7D042c4aE9eC18077b6781D6Dd8",
mainnet: "",
testnet: "",
},
Pool: {
mainnet: "0x7EF8B9bE08bF6694C4844a3388e80B3419a9f803",
mainnet: "",
testnet: "",
},
RewardToken: {
mainnet: "0xB75D0B03c06A926e488e2659DF1A861F860bD3d1",
mainnet: "",
testnet: "",
},
},
StartTime: {
mainnet: 1728561006,
testnet: 172800,
mainnet: 0,
testnet: 0,
},
EndTime: {
mainnet: 1728561306,
testnet: 172800,
mainnet: 0,
testnet: 0,
},
RewardAmount: {
mainnet: 1,
testnet: 1000,
mainnet: 0, // Amount is converted to decimals of the reward token in the script
testnet: 0,
},
};

6 changes: 3 additions & 3 deletions deployments/incentives.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"mainnet": {
"LatestIncentive": {
"rewardToken": "0xB75D0B03c06A926e488e2659DF1A861F860bD3d1",
"pool": "0x7EF8B9bE08bF6694C4844a3388e80B3419a9f803",
"startTime": 1728561006,
"endTime": 1728561306,
"pool": "0x9788C190C55a1C6e20597d52506bD49BB758E984",
"startTime": 1728910778,
"endTime": 1728996844,
"refundee": "0x328f7689244Bd7D042c4aE9eC18077b6781D6Dd8",
"rewardAmount": "1000000"
}
Expand Down
6 changes: 4 additions & 2 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { SolcUserConfig, NetworkUserConfig } from 'hardhat/types'
import 'solidity-coverage'
import "dotenv/config";

const accounts = process.env.PK ? [process.env.PK] : [];

const DEFAULT_COMPILER_SETTINGS: SolcUserConfig = {
version: '0.7.6',
settings: {
Expand Down Expand Up @@ -39,13 +41,13 @@ if (process.env.RUN_COVERAGE == '1') {
const seiTestnet: NetworkUserConfig = {
url: "https://evm-rpc-testnet.sei-apis.com",
chainId: 1328,
accounts: [process.env.KEY_TESTNET!],
accounts: accounts,
};

const seiMainnet: NetworkUserConfig = {
url: "https://evm-rpc.sei-apis.com",
chainId: 1329,
accounts: [process.env.KEY_MAINNET!],
accounts: accounts,
};

const config: HardhatUserConfig = {
Expand Down
4 changes: 2 additions & 2 deletions scripts/createIncentive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const main = async () => {
// Define incentive parameters
const rewardToken = config.Address.RewardToken[networkName]; // Address of the reward token
const pool = config.Address.Pool[networkName]; // Address of the Dragonswap V2 pool
const startTime = config.StartTime[networkName]; // Start time (1 hour from now)
const endTime = config.EndTime[networkName]; // End time (7 days after start)
const startTime = config.StartTime[networkName]; // Start time
const endTime = config.EndTime[networkName]; // End time
const refundee = refundeeAddress; // Address to receive leftover rewards

// Create the incentive key
Expand Down

0 comments on commit 6ee739a

Please sign in to comment.