Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Minor Tweaks - Typos, Contract Inv Verify Check, & Removed Comment Action #109

Merged
merged 4 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,28 @@ jobs:
run: |
go test -coverprofile=coverage.out ./internal/... >> out.txt

- name: Generate Coverage
run: |
go tool cover -func=coverage.out | grep total | awk '{print $3}' >> out.txt
echo "::set-output name=coverage::$(cat out.txt)"
# - name: Generate Coverage
# run: |
# go tool cover -func=coverage.out | grep total | awk '{print $3}' >> out.txt
# echo "::set-output name=coverage::$(cat out.txt)"

- name: Find Coverage Comment
uses: peter-evans/find-comment@v1
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: '### Current Test Coverage'
# - name: Find Coverage Comment
# uses: peter-evans/find-comment@v1
# id: fc
# with:
# issue-number: ${{ github.event.pull_request.number }}
# comment-author: 'github-actions[bot]'
# body-includes: '### Current Test Coverage'

- name: Add Coverage Comment
uses: actions/github-script@v6
env:
DATA: ${{ steps.fc.outputs.comment-id }}
# - name: Add Coverage Comment
# uses: actions/github-script@v6
# env:
# DATA: ${{ steps.fc.outputs.comment-id }}

with:
script: |
const script = require('./.github/scripts/comment.js')
await script({github, context, core})
# with:
# script: |
# const script = require('./.github/scripts/comment.js')
# await script({github, context, core})

e2e-test:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion internal/engine/registry/contract_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (ei *EventInvariant) Invalidate(td core.TransitData) (*core.InvalOutcome, b
return nil, false, err
}

if td.Address.String() != ei.cfg.Address {
if td.Address != common.HexToAddress(ei.cfg.Address) {
return nil, false, fmt.Errorf(invalidAddrErr, ei.cfg.Address, td.Address.String())
}

Expand Down
4 changes: 2 additions & 2 deletions internal/etl/registry/pipe/event_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ func (ed *EventDefinition) Transform(ctx context.Context, td core.TransitData) (
return []core.TransitData{}, fmt.Errorf("could not convert to block")
}

// 2. Fetch the addresess and events to monitor for
logging.NoContext().Debug("Getting addresess",
// 2. Fetch the addresses and events to monitor for
logging.NoContext().Debug("Getting addresses",
zap.String(core.PUUIDKey, ed.pUUID.String()))

addresses, err := ed.ss.GetSlice(ctx, ed.sk)
Expand Down