Skip to content
This repository was archived by the owner on Jan 9, 2025. It is now read-only.

Store COINBASE in storage_var #1069

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

ClementWalter
Copy link
Member

@ClementWalter ClementWalter commented Apr 4, 2024

Made coinbase storage var a constructor argument rather than a hardcoded value.

Time spent on this PR: 1 hour
(methodology: searched the whole source tree for "coinbase", "0xCA40", "precompiles", and "uninitialized")

Pull request type

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Currently Coinbase is a hardcoded constant value (0xCA40796aFB5472abaeD28907D5ED6FC74c04954a) duplicated in a few places in the .py and .cairo sources.

Resolves #1011

What is the new behavior?

That constant is now defined in a single location in constants.py and imported as needed. Accordingly, codebase is also passed as a new argument in the "kakarot" and "EVM" constructors.


This change is Reviewable

@ClementWalter ClementWalter force-pushed the cw/coinbase-storage-var branch from 8e28a39 to 9f38462 Compare April 4, 2024 14:01
@ClementWalter ClementWalter force-pushed the cw/coinbase-storage-var branch from 9f38462 to e36949a Compare April 4, 2024 14:18
@ClementWalter ClementWalter merged commit 42bbc4e into kkrt-labs:main Apr 4, 2024
6 checks passed
@ClementWalter ClementWalter deleted the cw/coinbase-storage-var branch April 4, 2024 15:09
This was referenced Apr 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dev: make coinbase storage var a constructor argument rather than a hardcoded value
3 participants