Skip to content

Standardizes contract structures and adds SolPP support#193

Merged
smartcontracts merged 14 commits intomasterfrom
YAS-539/contracts/standards
Jul 30, 2020
Merged

Standardizes contract structures and adds SolPP support#193
smartcontracts merged 14 commits intomasterfrom
YAS-539/contracts/standards

Conversation

@smartcontracts
Copy link
Copy Markdown
Contributor

Description

Hellooo. This PR generally standardizes the structure of our contracts and adds support for SolPP, a Solidity pre-processor. PR diff is huge because of the many slight changes to contract structures (although functionality and interfaces remains unchanged). Style guide can now be found in contracts/docs/contract-standards.md.

Metadata

Fixes

Contributing Agreement

Copy link
Copy Markdown
Contributor

@karlfloersch karlfloersch left a comment

Choose a reason for hiding this comment

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

Wowza holy cowza! That was a lot of lines to go through! I might have missed some stuff but I left a bunch of comments. And I confess by the end I started skimming lol.

Anyway, left a few comments but once those are addressed this LGTM!

address _l1MsgSenderAddress,
bool _allowRevert
) public {
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unrelated: I took a while to think about account abstraction/different signature schemes and the conclusion I came to is we should have everyone use contract wallets

* Marks a contract as newly created. Unused within this implementation.
* @param _ovmContractAddress Address to mark as newly created.
*/
function associateCreatedContract(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's a possibility that I commented on this in a different PR or messaged you privately or something, but in case I didn't -- is there a better word for this functionality? Of course this is not used in the FullStateManager, but still think the word associate doesn't do the functionality justice

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changed to registerCreatedContract. Seems good enough for now.

let MerkleTrie: ContractFactory
before(async () => {
MerkleTrie = await ethers.getContractFactory('MerkleTrie')
MerkleTrie = await ethers.getContractFactory('MockMerkleTrie')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why are we using a MockMerkleTrie here? Sorry I really should look deeper into the code but just asking this because was surprised to see MerkleTrie.spec testing against a mock

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmmm maybe the word "mock" is confusing. I pulled the term from openzeppelin's primary contracts repo. MockMerkleTrie is just a standard contract that pipes all of the requests to MerkleTrie.

@smartcontracts smartcontracts merged commit 88b5672 into master Jul 30, 2020
@gakonst gakonst deleted the YAS-539/contracts/standards branch March 18, 2021 15:02
snario pushed a commit that referenced this pull request Apr 14, 2021
agusduha pushed a commit that referenced this pull request Mar 20, 2025
* feat: add new interfaces and contracts for L1 & L2 MintableERC20Factory

* chore: update interfaces

* chore: update l2 genesis script

* chore: update test and references

* feat: remove initializable and move config to L1Block

* chore: update scripts

* chore: update tests

* chore: remove unused imports

* chore: semgrep ready

* refactor: update configuration name

* fix: return correct bridge address

* chore: remove commented code, update natspec

* chore: update label

* chore: pre-pr ready

* test: split tests for L1 & L2 OptimismMintableERC20Factory(s)

* chore: remove outdated comment

* test: update OptimismMintableERC20Factory tests
theochap pushed a commit that referenced this pull request Jan 15, 2026
### Description

Ports the span batch element type to `op-alloy-protocol`.

### Provenance

Part of a port migrating the batch types from `kona-derive` to
`op-alloy`. See
[`kona#695`](op-rs/kona#695).
emhane pushed a commit that referenced this pull request Feb 3, 2026
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.

2 participants