Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bounty v2 #786

Merged
merged 78 commits into from Nov 17, 2023
Merged

Bounty v2 #786

merged 78 commits into from Nov 17, 2023

Conversation

zheng-bin
Copy link
Contributor

Closes: #XXX
Related: #XXX

Description


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]"

yoongbok lee and others added 30 commits December 12, 2022 23:13
* add go-ethereum ecies generatekey

* resume buf compilation

* goimports bounty file

* change encryption_key type to any

* add TestSaveLoadKey

* sort import

* sort msg import
* Add bounty module account

   1. Add test case.
   2. Add bounty account.
   3. set default value.

* Add test case

* Add test case
* add finding init

* add programid:findinglist

* add go-ethereum ecies generatekey

* resume buf compilation

* goimports bounty file

* change encryption_key type to any

* change encrypted_desc type to any

* change severity level type to enum

* add TestSaveLoadKey

* sort import

* severityLevel as enum

* add findings to genesisState

* merged bounty-encryption

* add finding status

* init SetNextFindingID

* fix golint

* pid to program_id, fid to finding_id

* pid to program_id, fid to finding_id

* fix some format error

* add FlagSubmissionEndTime flag

* improve TestFinding and TestProgram

* improve encrypteddesc, encryptedpoc,encryptionkey test
* Bounty query

* Add test case

* Add test case

* Fix test case error

* Fix conflict

* Add test case

* Add finding query

* fix golangci-lint error

* Add test case
* add a helper.go

* fix golangci-lint error
* Add host accept or reject finding

* fix test error
* add plain text of desc and poc in proto file

* add comment to finding

* add release finding process

* reset to release finding one by one, and merge encrypted_desc,desc to one accept interface

* fix lint

* fix finding comment
* check deposit in validateBasic

* check deposit in MsgCreateProgram validateBasic
* finding withdrawal

* fix lint

* change name & wrap errors & event field

* fix ut

* update merge conflict

* update merge conflict
x/bounty/client/cli/query.go Outdated Show resolved Hide resolved
x/bounty/client/cli/query.go Outdated Show resolved Hide resolved
// Get all delegations from a delegator
r.HandleFunc(
"/bounty/programs/{programID}",
programsHandlerFn(clientCtx),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems we didn't actually implement this. still need this code?

x/bounty/handler.go Show resolved Hide resolved
return &types.QueryProgramResponse{Program: program}, nil
}

func (k Keeper) Findings(c context.Context, req *types.QueryFindingsRequest) (*types.QueryFindingsResponse, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please correct me if I'm wrong.
This query is supposed to return all finding for a program? or just return all stored findings?
It seems the finding returned would be empty.

@zheng-bin zheng-bin merged commit 9a881da into master Nov 17, 2023
19 checks passed
@zheng-bin zheng-bin deleted the bounty-v2 branch November 17, 2023 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants