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(protocol): change statevariables to return a struct #13113

Merged
merged 1 commit into from
Feb 8, 2023
Merged

Conversation

cyberhorsey
Copy link
Contributor

@cyberhorsey cyberhorsey commented Feb 7, 2023

Callign getStateVariables is not very flexible. If we change the order, or add or remove parameters, existing code that uses properties by array index will break. WE see this happen as we move from our current testnet to our new one. It is also not readable for a consumer.

This change removes the array and returns a struct.

Change is OK for Merge but before deploy, taiko-client needs a relevant PR to stop destructuring the array into its own struct, but isntead update the bindings and use this struct directly.

@cyberhorsey cyberhorsey changed the title enhance(protocol): change statevariables to return a struct feat(protocol): change statevariables to return a struct Feb 7, 2023
@codecov
Copy link

codecov bot commented Feb 7, 2023

Codecov Report

Merging #13113 (4d8f408) into main (91a8fe5) will increase coverage by 0.05%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main   #13113      +/-   ##
==========================================
+ Coverage   62.66%   62.71%   +0.05%     
==========================================
  Files         113      113              
  Lines        3217     3208       -9     
  Branches      436      436              
==========================================
- Hits         2016     2012       -4     
+ Misses       1124     1120       -4     
+ Partials       77       76       -1     
Flag Coverage Δ *Carryforward flag
bridge-ui 92.61% <ø> (ø) Carriedforward from 91a8fe5
protocol 53.14% <0.00%> (-0.07%) ⬇️
relayer 69.10% <0.00%> (+0.17%) ⬆️
ui 100.00% <ø> (ø) Carriedforward from 91a8fe5

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
packages/protocol/contracts/L1/TaikoL1.sol 32.69% <ø> (ø)
packages/protocol/contracts/L1/libs/LibUtils.sol 31.57% <0.00%> (+4.30%) ⬆️
...er/indexer/set_initial_processing_block_by_mode.go 80.00% <0.00%> (ø)
...es/protocol/contracts/thirdparty/LibMerkleTrie.sol 83.13% <0.00%> (-7.23%) ⬇️
packages/relayer/http/server.go 95.89% <0.00%> (+2.73%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@dantaik dantaik enabled auto-merge (squash) February 8, 2023 00:53
@dantaik dantaik merged commit 0bffeb0 into main Feb 8, 2023
@dantaik dantaik deleted the state_vars branch February 8, 2023 01:16
@github-actions github-actions bot mentioned this pull request Feb 8, 2023
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

3 participants