Skip to content

Commit

Permalink
feat: roles script that run every day and send a discord message
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtekgrinder committed Feb 5, 2024
1 parent f930b0e commit da72984
Show file tree
Hide file tree
Showing 9 changed files with 685 additions and 207 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
#ETH_NODE_URI_FORK=http://localhost:8545
#MNEMONIC_FORK=""

#DISCORD_TOKEN=""
30 changes: 30 additions & 0 deletions .github/workflows/check-roles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "check-roles"

on:
schedule:
- cron: "0 0 * * *" # every day at midnight

jobs:
check-roles:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: generate roles files
run: forge script CheckRoles

- name: Install dependencies
run: yarn install

- name: Run script
run: yarn check-roles
44 changes: 0 additions & 44 deletions .github/workflows/checkRoles.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/scripts/download-previous-artifact.js

This file was deleted.

2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ optimizer = true
optimizer_runs = 1000
solc_version = "0.8.23"
ffi = true
fs_permissions = [{ access = "read-write", path = "./scripts/proposals/payload.json"}]
fs_permissions = [{ access = "read-write", path = "./scripts/proposals/payload.json"}, { access = "read-write", path = "./scripts/roles.json"}]

[fuzz]
runs = 10000
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@
"devDependencies": {
"@angleprotocol/sdk": "^0.25.0",
"@layerzerolabs/lz-sdk": "^0.0.30",
"discord.js": "^14.14.1",
"prettier": "^2.0.0",
"prettier-plugin-solidity": "^1.1.3",
"solhint": "^3.5.1",
"solhint-plugin-prettier": "^0.0.5"
},
"dependencies": {}
}
}
Loading

0 comments on commit da72984

Please sign in to comment.