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

feat(ioctl): project register contract addr config #4039

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

saitofun
Copy link
Contributor

Description

project register contract address config

Fixes #(issue)

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • make test

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link

codecov bot commented Dec 26, 2023

Codecov Report

Attention: 532 lines in your changes are missing coverage. Please review.

Comparison is base (e1f0636) 75.38% compared to head (812160b) 76.26%.
Report is 134 commits behind head on master.

Files Patch % Lines
blockindex/contractstaking/event_handler.go 67.23% 45 Missing and 13 partials ⚠️
action/protocol/staking/staking_statereader.go 69.76% 35 Missing and 17 partials ⚠️
action/protocol/execution/evm/evm.go 48.38% 47 Missing and 1 partial ⚠️
action/protocol/staking/protocol.go 33.33% 28 Missing ⚠️
...tion/protocol/staking/contractstake_bucket_type.go 0.00% 24 Missing ⚠️
api/coreservice.go 68.49% 17 Missing and 6 partials ⚠️
blockindex/contractstaking/util.go 39.47% 22 Missing and 1 partial ⚠️
action/protocol/rewarding/fund.go 23.07% 19 Missing and 1 partial ⚠️
api/websocket.go 0.00% 20 Missing ⚠️
blockindex/sgd_indexer.go 90.30% 12 Missing and 7 partials ⚠️
... and 30 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4039      +/-   ##
==========================================
+ Coverage   75.38%   76.26%   +0.88%     
==========================================
  Files         303      331      +28     
  Lines       25923    28288    +2365     
==========================================
+ Hits        19541    21573    +2032     
- Misses       5360     5617     +257     
- Partials     1022     1098      +76     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

config.TranslateInLang(_flagProjectRegisterContractAddressUsages, config.UILanguage),
)
_ = wsProject.MarkFlagRequired("contract-address")
wsProjectRegisterContractAddress = config.ReadConfig.WsProjectRegisterContract
Copy link
Member

Choose a reason for hiding this comment

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

why this one is special, get value from config.ReadConfig

@@ -69,6 +69,8 @@ type Config struct {
AnalyserEndpoint string `json:"analyserEndpoint" yaml:"analyserEndpoint"`
// WsEndpoint w3bstream endpoint
WsEndpoint string `json:"wsEndpoint" yaml:"wsEndpoint"`
// WsProjectRegisterContract w3bstream project register contract address
WsProjectRegisterContract string `json:"wsProjectRegisterContract" yaml:"wsProjectRegisterContract"`
Copy link
Member

Choose a reason for hiding this comment

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

nit: just make it simple WsRegisterContract?

@saitofun saitofun force-pushed the feat/ioctl_contract_address_config branch from 75b9f49 to 3afc065 Compare January 2, 2024 15:23
@@ -28,12 +28,14 @@ const (
_endpointPattern = "(" + _ipPattern + "|(" + _domainPattern + ")" + "|(" + _localPattern + "))" + `(:\d{1,5})?`
_defaultAnalyserEndpoint = "https://iotex-analyser-api-mainnet.chainanalytics.org"
_defaultWsEndpoint = "sprout-staging.w3bstream.com:9000"
// _defaultProjectRegisterContract default project register contract address
_defaultProjectRegisterContract = "0x4F7e678B0203e0444E17512108dba4B08B39512e"
Copy link
Member

Choose a reason for hiding this comment

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

register a new contract, for the "0x4F7e678B0203e0444E17512108dba4B08B39512e" contains much localhost uri

@@ -35,12 +35,14 @@ const (
_defaultAnalyserEndpoint = "https://iotex-analyser-api-mainnet.chainanalytics.org"
_defaultWsEndpoint = "sprout-staging.w3bstream.com:9000"
_defaultConfigFileName = "config.default"
// _defaultWsProjectRegisterContract default w3bstream project register contract address
_defaultWsProjectRegisterContract = "0x4F7e678B0203e0444E17512108dba4B08B39512e"
Copy link
Member

Choose a reason for hiding this comment

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

same above

@saitofun saitofun force-pushed the feat/ioctl_contract_address_config branch from 3afc065 to 812160b Compare January 3, 2024 03:53
Copy link

sonarcloud bot commented Jan 3, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

8.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@saitofun saitofun merged commit efcc7eb into master Jan 3, 2024
3 of 5 checks passed
@saitofun saitofun deleted the feat/ioctl_contract_address_config branch January 3, 2024 04:10
@saitofun saitofun restored the feat/ioctl_contract_address_config branch January 5, 2024 00:13
@saitofun saitofun deleted the feat/ioctl_contract_address_config branch January 22, 2024 01:50
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.

3 participants