-
Notifications
You must be signed in to change notification settings - Fork 77
39 lines (37 loc) · 1.24 KB
/
manual-query-grant-role-event.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Manually Query Grant Role Events
on:
workflow_dispatch:
inputs:
contractAddress:
description: 'Enter the contract address for which you wanna query the grant role events for'
required: true
type: string
rpc:
description: 'Enter network rpc'
required: true
default: 'https://rpc.ankr.com/eth'
type: string
jobs:
generate-grant-role-logs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.16.0
pnpm-version: 9.0.6
- name: Mask env var
run: |
RPC_URL=$(jq -r '.inputs.rpc' $GITHUB_EVENT_PATH)
echo ::add-mask::$RPC_URL
echo RPC_URL=$RPC_URL >> $GITHUB_ENV
- name: Query Events
run: |
npx hardhat compile && npx hardhat grant-role-event-filter --contract ${{ github.event.inputs.contractAddress }}
working-directory: ./packages/solidity-contracts
- name: Upload event payload as an artifact
uses: actions/upload-artifact@v4
with:
name: event-query-payload
path: ./packages/solidity-contracts/grantedRoles.json
retention-days: 90