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

Add the sendTransaction endpoint #87

Merged

Conversation

masonforest
Copy link

Description

Add the sendTransaction endpoint

Metadata

Fixes

Contributing Agreement

Copy link

@willmeister willmeister left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Collaborator

@ben-chain ben-chain left a comment

Choose a reason for hiding this comment

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

Looks good! I have a little confusion about the from field which I left in comments, but possible I'm missing something. Approving preemptively either way! 😃

@@ -721,9 +721,10 @@ export class DefaultWeb3Handler
// Generate the calldata which we'll use to call our internal execution manager
// First pull out the `to` field (we just need to check if it's null & if so set ovmTo to the zero address as that's how we deploy contracts)
const ovmTo = ovmTx.to === null ? ZERO_ADDRESS : ovmTx.to
const ovmFrom = ovmTx.from === undefined ? ZERO_ADDRESS : ovmTx.from
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm-it seems a little weird to be setting the OVM's from transaction to the zero address--this would never have a valid signature, right?

Copy link
Author

Choose a reason for hiding this comment

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

Yep! But transactions sent to sendTransaction don't have signatures attached to them yet.

The node is suppose to keep track of which keys are "unlocked" and if a transaction's from address is unlocked the node will sign the transaction. In our implementation we're just treating all transactions as valid when running in test mode and ignoring lock/unlock logic...

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ahhhh, got it!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ahhh got it!

Comment on lines 244 to 251
const transaction = {
nonce: 0,
to: simpleStorage.address,
gasPrice: 0,
gasLimit: 0,
value: 0,
data: transactionData,
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again, it seems like we shouldn't be allowing transactions which are missing a from field. I could be wrong, but for example here does not list from as optional.

Copy link
Author

Choose a reason for hiding this comment

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

@masonforest masonforest merged commit b0b410f into master Apr 17, 2020
@gakonst gakonst deleted the YAS-292/OVMIntegrationTests/sendTransactionEndpoint branch March 18, 2021 15:01
snario pushed a commit that referenced this pull request Apr 14, 2021
keroro520 pushed a commit to keroro520/optimism that referenced this pull request Mar 6, 2024
…ethereum-optimism#87)

* optimize(op-node): make block produce stable when L1 latency unstable

* fix find origin logic

* fix origin_selector_test

* fix ci

* fix ci

---------

Co-authored-by: Owen <103096885+owen-reorg@users.noreply.github.com>
ClaytonNorthey92 added a commit to hemilabs/optimism that referenced this pull request Jun 27, 2024
b5b564702 popm/wasm: add wasm-opt target to optimise wasm binary (ethereum-optimism#146)
27a5081e3 tbc: allow seeds to be overwritten (ethereum-optimism#158)
18afbc403 Fix missing panic (ethereum-optimism#156)
05cee0afb tbc: remove height as the terminal condition for indexers (ethereum-optimism#152)
4402060d6 Use hemilabs/websocket fork of nhooyr.io/websocket (ethereum-optimism#153)
3df5001c4 Add initial CODEOWNERS file (ethereum-optimism#149)
a4685a57f popm/wasm: improve and tidy up Go code (ethereum-optimism#144)
41a0009c1 Add forking detection to TBC (ethereum-optimism#101)
bbeed8bac ignore ulimits in tbc when on localnet (ethereum-optimism#142)
4e1914cc6 Stopgap to re-fetch blocks with no children (ethereum-optimism#131)
12eefff06 e2e: fix issues detected by staticcheck (ethereum-optimism#134)
80153372f Add more documentation for TBC and related RPC protocol (ethereum-optimism#86)
723b63704 bfg: fix issues reported by staticcheck (ethereum-optimism#132)
509fb1be6 electrumx: fix unhandled error in NewJSONRPCRequest (ethereum-optimism#133)
b19af1e1f hemictl: use sort.Strings(...) instead of sort.Sort(sort.StringSlice(...)) (S1032) (ethereum-optimism#123)
cf7c570f9 popmd: remove unused 'handle' func and return err in connectBFG (ethereum-optimism#124)
fa2a4c4de ci: fix bug that makes version type always 'unstable' (ethereum-optimism#125)
ddc39655a ci: use org DOCKERHUB_TOKEN secret (ethereum-optimism#128)
6457d16f5 bfgd: drop btc_blocks_can refresh triggers for l2_keystones/pop_basis (ethereum-optimism#120)
2b3c096bd popm: simplify receivedKeystones variable in tests (ethereum-optimism#116)
6140bbf24 tbc: move RPC tests to a separate test file (ethereum-optimism#114)
c76571ff0 Add configuration option for static fees to web PoP miner (ethereum-optimism#119)
233817e65 popm: use simple conversion instead of unnecessary fmt.Sprintf (S1025) (ethereum-optimism#115)
2879f5fa7 e2e: improve name for variable with type `time.Duration` (ST1011) (ethereum-optimism#117)
4f31965e6 database,e2e: remove use of deprecated io/ioutil (SA1019) (ethereum-optimism#118)
e9e090696 tbc: do not recreate outpoint for ScriptHashByOutpoint. (ethereum-optimism#109)
52eefb136 ignore l2 keystones notifications in tests (ethereum-optimism#112)
eb607994c Sync Docker image environment variables with daemon configs (ethereum-optimism#111)
57281bc5d added a way to monitor and sanity-test localnet (ethereum-optimism#106)
ea1a1c94c bfgd: fix loops unconditionally exited after one interation (SA4004) (ethereum-optimism#108)
29f116fb4 Add pprof http server to daemons (ethereum-optimism#105)
18a315d7e Added README for generating forks in BTC regtest for TBC fork resolution testing (ethereum-optimism#100)
55b8f52cb more robust nextPort (ethereum-optimism#103)
48f8b293f tbcapi: use reverse byte order for hashes in serialised, tidy up (ethereum-optimism#104)
b7e9f5ecb restart initialblocks on-failure (ethereum-optimism#102)
f9d52d423 Update required Go version to v1.22.2 (ethereum-optimism#96)
f6808aa5b Fix op-proposer op-node dependency condition (fixes ethereum-optimism#98) (ethereum-optimism#99)
a882529e8 Kill all pending block downloads if a peer fails (ethereum-optimism#95)
eb66345e1 e2e: tidy up docker-compose file (ethereum-optimism#81)
34766f725 Track pending blocks with ttl package (ethereum-optimism#90)
6ed3eb88b Added configurable fee-per-vB to PoP Miner (ethereum-optimism#91)
509e31fbc Replace os.Kill with syscall.SIGTERM in signal.Notify calls (ethereum-optimism#87)

git-subtree-dir: heminetwork
git-subtree-split: b5b564702e8d3bedcdf0e0a52c22e383d7fd4dbe
bap2pecs pushed a commit to babylonlabs-io/optimism that referenced this pull request Jul 31, 2024
github-merge-queue bot pushed a commit that referenced this pull request Oct 15, 2024
* feat: add superchain erc20 bridge (#61)

* feat: add superchain erc20 bridge

* fix: interfaces and versions

* refactor: optimism superchain erc20 redesign (#62)

* refactor: use oz upgradeable erc20 as dependency

* chore: update interfaces

* fix: tests based on changes

* refactor: remove op as dependency

* feat: add check for supererc20 bridge on modifier

* chore: update tests and interfaces

* chore: update stack vars name on test

* chore: remove empty gitmodules file

* chore: update superchain weth errors

* test: add superchain erc20 bridge tests (#65)

* test: add superchain erc20 bridge tests

* test: add optimism superchain erc20 beacon tests

* test: remove unnecessary test

* test: tests fixes

* test: tests fixes

* chore: update missing bridge on natspec (#69)

* chore: update missing bridge on natspec

* fix: natspecs

---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* fix: remove superchain erc20 base (#70)

* refactor: update isuperchainweth (#71)


---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* feat: rename mint/burn and add SuperchainERC20 (#74)

* refactor: rename mint and burn functions on superchain erc20

* chore: rename optimism superchain erc20 to superchain erc20

* feat: create optimism superchain erc20 contract

* chore: update natspec and errors

* fix: superchain erc20 tests

* refactor: make superchain erc20 abstract

* refactor: move storage and erc20 metadata functions to implementation

* chore: update interfaces

* chore: update superchain erc20 events

* fix: tests

* fix: natspecs

* fix: add semmver lock and snapshots

* fix: remove unused imports

* fix: natspecs

---------

Co-authored-by: 0xDiscotech <131301107+0xDiscotech@users.noreply.github.com>

* fix: refactor zero check (#76)

* fix: pre pr

* fix: semver natspec check failure (#79)

* fix: semver natspec check failure

* fix: ignore mock contracts in semver natspec script

* fix: error message

* feat: add crosschain erc20 interface (#80)

* feat: add crosschain erc20 interface

* fix: refactor interfaces

* fix: superchain bridge natspec (#83)

* fix: superchain weth natspec (#84)

Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>

* fix: stop inheriting superchain interfaces (#85)

* fix: stop inheriting superchain interfaces

* fix: move events and erros into the implementation

* fix: make superchainERC20 inherits from crosschainERC20

* fix: superchain bridge rename (#86)

* fix: fee vault compiler error (#87)

* fix: remove unused imports

* fix: refactor common errors (#90)

* fix: refactor common errors

* fix: remove unused version

* fix: reuse unauthorized error (#92)

* fix: superchain erc20 factory conflicts

* fix: rename crosschain functions (#94)

---------

Co-authored-by: Disco <131301107+0xDiscotech@users.noreply.github.com>
Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>
maurelian pushed a commit that referenced this pull request Oct 17, 2024
github-merge-queue bot pushed a commit that referenced this pull request Oct 17, 2024
* feat: add superchain erc20 bridge (#61)

* feat: add superchain erc20 bridge

* fix: interfaces and versions

* refactor: optimism superchain erc20 redesign (#62)

* refactor: use oz upgradeable erc20 as dependency

* chore: update interfaces

* fix: tests based on changes

* refactor: remove op as dependency

* feat: add check for supererc20 bridge on modifier

* chore: update tests and interfaces

* chore: update stack vars name on test

* chore: remove empty gitmodules file

* chore: update superchain weth errors

* test: add superchain erc20 bridge tests (#65)

* test: add superchain erc20 bridge tests

* test: add optimism superchain erc20 beacon tests

* test: remove unnecessary test

* test: tests fixes

* test: tests fixes

* chore: update missing bridge on natspec (#69)

* chore: update missing bridge on natspec

* fix: natspecs

---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* fix: remove superchain erc20 base (#70)

* refactor: update isuperchainweth (#71)


---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* feat: rename mint/burn and add SuperchainERC20 (#74)

* refactor: rename mint and burn functions on superchain erc20

* chore: rename optimism superchain erc20 to superchain erc20

* feat: create optimism superchain erc20 contract

* chore: update natspec and errors

* fix: superchain erc20 tests

* refactor: make superchain erc20 abstract

* refactor: move storage and erc20 metadata functions to implementation

* chore: update interfaces

* chore: update superchain erc20 events

* fix: tests

* fix: natspecs

* fix: add semmver lock and snapshots

* fix: remove unused imports

* fix: natspecs

---------

Co-authored-by: 0xDiscotech <131301107+0xDiscotech@users.noreply.github.com>

* fix: refactor zero check (#76)

* fix: pre pr

* fix: semver natspec check failure (#79)

* fix: semver natspec check failure

* fix: ignore mock contracts in semver natspec script

* fix: error message

* feat: add crosschain erc20 interface (#80)

* feat: add crosschain erc20 interface

* fix: refactor interfaces

* fix: superchain bridge natspec (#83)

* fix: superchain weth natspec (#84)

Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>

* fix: stop inheriting superchain interfaces (#85)

* fix: stop inheriting superchain interfaces

* fix: move events and erros into the implementation

* fix: make superchainERC20 inherits from crosschainERC20

* fix: superchain bridge rename (#86)

* fix: fee vault compiler error (#87)

* fix: remove unused imports

* fix: refactor common errors (#90)

* fix: refactor common errors

* fix: remove unused version

* feat: add cross domain context function

* fix: reuse unauthorized error (#92)

* fix: superchain erc20 factory conflicts

* fix: rename crosschain functions (#94)

* chore: run pre-pr

* chore: run pre-pr

* fix: mocked calls on tests

* feat: add cross domain message context function (#98)


----
Co-Authored-by: AgusDuha <81362284+agusduha@users.noreply.github.com>

---------

Co-authored-by: AgusDuha <81362284+agusduha@users.noreply.github.com>
Co-authored-by: agusduha <agusnduha@gmail.com>
Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>
maurelian pushed a commit that referenced this pull request Oct 18, 2024
* feat: add superchain erc20 bridge (#61)

* feat: add superchain erc20 bridge

* fix: interfaces and versions

* refactor: optimism superchain erc20 redesign (#62)

* refactor: use oz upgradeable erc20 as dependency

* chore: update interfaces

* fix: tests based on changes

* refactor: remove op as dependency

* feat: add check for supererc20 bridge on modifier

* chore: update tests and interfaces

* chore: update stack vars name on test

* chore: remove empty gitmodules file

* chore: update superchain weth errors

* test: add superchain erc20 bridge tests (#65)

* test: add superchain erc20 bridge tests

* test: add optimism superchain erc20 beacon tests

* test: remove unnecessary test

* test: tests fixes

* test: tests fixes

* chore: update missing bridge on natspec (#69)

* chore: update missing bridge on natspec

* fix: natspecs

---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* fix: remove superchain erc20 base (#70)

* refactor: update isuperchainweth (#71)


---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* feat: rename mint/burn and add SuperchainERC20 (#74)

* refactor: rename mint and burn functions on superchain erc20

* chore: rename optimism superchain erc20 to superchain erc20

* feat: create optimism superchain erc20 contract

* chore: update natspec and errors

* fix: superchain erc20 tests

* refactor: make superchain erc20 abstract

* refactor: move storage and erc20 metadata functions to implementation

* chore: update interfaces

* chore: update superchain erc20 events

* fix: tests

* fix: natspecs

* fix: add semmver lock and snapshots

* fix: remove unused imports

* fix: natspecs

---------

Co-authored-by: 0xDiscotech <131301107+0xDiscotech@users.noreply.github.com>

* fix: refactor zero check (#76)

* fix: pre pr

* fix: semver natspec check failure (#79)

* fix: semver natspec check failure

* fix: ignore mock contracts in semver natspec script

* fix: error message

* feat: add crosschain erc20 interface (#80)

* feat: add crosschain erc20 interface

* fix: refactor interfaces

* fix: superchain bridge natspec (#83)

* fix: superchain weth natspec (#84)

Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>

* fix: stop inheriting superchain interfaces (#85)

* fix: stop inheriting superchain interfaces

* fix: move events and erros into the implementation

* fix: make superchainERC20 inherits from crosschainERC20

* fix: superchain bridge rename (#86)

* fix: fee vault compiler error (#87)

* fix: remove unused imports

* fix: refactor common errors (#90)

* fix: refactor common errors

* fix: remove unused version

* fix: reuse unauthorized error (#92)

* fix: superchain erc20 factory conflicts

* fix: rename crosschain functions (#94)

* feat: superweth redesign

* fix: pr fixes

* fix: fixes post merge

---------

Co-authored-by: Disco <131301107+0xDiscotech@users.noreply.github.com>
Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Oct 22, 2024
* feat: SuperchainWETH redesign (#101)

* feat: add superchain erc20 bridge (#61)

* feat: add superchain erc20 bridge

* fix: interfaces and versions

* refactor: optimism superchain erc20 redesign (#62)

* refactor: use oz upgradeable erc20 as dependency

* chore: update interfaces

* fix: tests based on changes

* refactor: remove op as dependency

* feat: add check for supererc20 bridge on modifier

* chore: update tests and interfaces

* chore: update stack vars name on test

* chore: remove empty gitmodules file

* chore: update superchain weth errors

* test: add superchain erc20 bridge tests (#65)

* test: add superchain erc20 bridge tests

* test: add optimism superchain erc20 beacon tests

* test: remove unnecessary test

* test: tests fixes

* test: tests fixes

* chore: update missing bridge on natspec (#69)

* chore: update missing bridge on natspec

* fix: natspecs

---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* fix: remove superchain erc20 base (#70)

* refactor: update isuperchainweth (#71)


---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* feat: rename mint/burn and add SuperchainERC20 (#74)

* refactor: rename mint and burn functions on superchain erc20

* chore: rename optimism superchain erc20 to superchain erc20

* feat: create optimism superchain erc20 contract

* chore: update natspec and errors

* fix: superchain erc20 tests

* refactor: make superchain erc20 abstract

* refactor: move storage and erc20 metadata functions to implementation

* chore: update interfaces

* chore: update superchain erc20 events

* fix: tests

* fix: natspecs

* fix: add semmver lock and snapshots

* fix: remove unused imports

* fix: natspecs

---------

Co-authored-by: 0xDiscotech <131301107+0xDiscotech@users.noreply.github.com>

* fix: refactor zero check (#76)

* fix: pre pr

* fix: semver natspec check failure (#79)

* fix: semver natspec check failure

* fix: ignore mock contracts in semver natspec script

* fix: error message

* feat: add crosschain erc20 interface (#80)

* feat: add crosschain erc20 interface

* fix: refactor interfaces

* fix: superchain bridge natspec (#83)

* fix: superchain weth natspec (#84)

Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>

* fix: stop inheriting superchain interfaces (#85)

* fix: stop inheriting superchain interfaces

* fix: move events and erros into the implementation

* fix: make superchainERC20 inherits from crosschainERC20

* fix: superchain bridge rename (#86)

* fix: fee vault compiler error (#87)

* fix: remove unused imports

* fix: refactor common errors (#90)

* fix: refactor common errors

* fix: remove unused version

* fix: reuse unauthorized error (#92)

* fix: superchain erc20 factory conflicts

* fix: rename crosschain functions (#94)

* feat: superweth redesign

* fix: pr fixes

* fix: fixes post merge

---------

Co-authored-by: Disco <131301107+0xDiscotech@users.noreply.github.com>
Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>

* fix: SuperchainWETH redesign fixes (#110)

* fix: superchainWETH redesign fixes

* fix: withdraw arg

* fix: fix revert in SuperchainWETH tests (#112)

---------

Co-authored-by: AgusDuha <81362284+agusduha@users.noreply.github.com>
Co-authored-by: Disco <131301107+0xDiscotech@users.noreply.github.com>
Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: agusduha <agusnduha@gmail.com>
github-merge-queue bot pushed a commit that referenced this pull request Oct 22, 2024
…rc20 implementation (#12476)

* feat: add superchain erc20 bridge (#61)

* feat: add superchain erc20 bridge

* fix: interfaces and versions

* refactor: optimism superchain erc20 redesign (#62)

* refactor: use oz upgradeable erc20 as dependency

* chore: update interfaces

* fix: tests based on changes

* refactor: remove op as dependency

* feat: add check for supererc20 bridge on modifier

* chore: update tests and interfaces

* chore: update stack vars name on test

* chore: remove empty gitmodules file

* chore: update superchain weth errors

* test: add superchain erc20 bridge tests (#65)

* test: add superchain erc20 bridge tests

* test: add optimism superchain erc20 beacon tests

* test: remove unnecessary test

* test: tests fixes

* test: tests fixes

* chore: update missing bridge on natspec (#69)

* chore: update missing bridge on natspec

* fix: natspecs

---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* fix: remove superchain erc20 base (#70)

* refactor: update isuperchainweth (#71)


---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* feat: rename mint/burn and add SuperchainERC20 (#74)

* refactor: rename mint and burn functions on superchain erc20

* chore: rename optimism superchain erc20 to superchain erc20

* feat: create optimism superchain erc20 contract

* chore: update natspec and errors

* fix: superchain erc20 tests

* refactor: make superchain erc20 abstract

* refactor: move storage and erc20 metadata functions to implementation

* chore: update interfaces

* chore: update superchain erc20 events

* fix: tests

* fix: natspecs

* fix: add semmver lock and snapshots

* fix: remove unused imports

* fix: natspecs

---------

Co-authored-by: 0xDiscotech <131301107+0xDiscotech@users.noreply.github.com>

* fix: refactor zero check (#76)

* fix: pre pr

* chore: add new solady version and import it for erc20

* fix: undo forge std changes

* chore: re run pre pr script

* fix: semver natspec check failure (#79)

* fix: semver natspec check failure

* fix: ignore mock contracts in semver natspec script

* fix: error message

* feat: add crosschain erc20 interface (#80)

* feat: add crosschain erc20 interface

* fix: refactor interfaces

* fix: superchain bridge natspec (#83)

* fix: superchain weth natspec (#84)

Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>

* fix: stop inheriting superchain interfaces (#85)

* fix: stop inheriting superchain interfaces

* fix: move events and erros into the implementation

* fix: make superchainERC20 inherits from crosschainERC20

* fix: superchain bridge rename (#86)

* fix: fee vault compiler error (#87)

* fix: remove unused imports

* chore: run pre-pr and update vendor interface

* fix: refactor common errors (#90)

* fix: refactor common errors

* fix: remove unused version

* feat: add permit2 on optimism superchain erc20

* chore: run pre-pr script

* fix: reuse unauthorized error (#92)

* fix: superchain erc20 factory conflicts

* fix: rename crosschain functions (#94)

* chore: run pre-pr

* chore: run pre-pr

* chore: run pre-pr

* feat: add new tests on optimism superchain erc20

* fix: vars and params naming on newly added tests

* fix: var name

* feat: support permit2 on optimism superchain erc20 and upgrade solady's erc20 implementation (#97)


---
Co-Authored-by: AgusDuha <81362284+agusduha@users.noreply.github.com>

* chore: use ierc20 alias for ierc20 solady interface (#108)

---------

Co-authored-by: AgusDuha <81362284+agusduha@users.noreply.github.com>
Co-authored-by: agusduha <agusnduha@gmail.com>
Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
…-optimism#12321)

* feat: add superchain erc20 bridge (ethereum-optimism#61)

* feat: add superchain erc20 bridge

* fix: interfaces and versions

* refactor: optimism superchain erc20 redesign (ethereum-optimism#62)

* refactor: use oz upgradeable erc20 as dependency

* chore: update interfaces

* fix: tests based on changes

* refactor: remove op as dependency

* feat: add check for supererc20 bridge on modifier

* chore: update tests and interfaces

* chore: update stack vars name on test

* chore: remove empty gitmodules file

* chore: update superchain weth errors

* test: add superchain erc20 bridge tests (ethereum-optimism#65)

* test: add superchain erc20 bridge tests

* test: add optimism superchain erc20 beacon tests

* test: remove unnecessary test

* test: tests fixes

* test: tests fixes

* chore: update missing bridge on natspec (ethereum-optimism#69)

* chore: update missing bridge on natspec

* fix: natspecs

---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* fix: remove superchain erc20 base (ethereum-optimism#70)

* refactor: update isuperchainweth (ethereum-optimism#71)


---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* feat: rename mint/burn and add SuperchainERC20 (ethereum-optimism#74)

* refactor: rename mint and burn functions on superchain erc20

* chore: rename optimism superchain erc20 to superchain erc20

* feat: create optimism superchain erc20 contract

* chore: update natspec and errors

* fix: superchain erc20 tests

* refactor: make superchain erc20 abstract

* refactor: move storage and erc20 metadata functions to implementation

* chore: update interfaces

* chore: update superchain erc20 events

* fix: tests

* fix: natspecs

* fix: add semmver lock and snapshots

* fix: remove unused imports

* fix: natspecs

---------

Co-authored-by: 0xDiscotech <131301107+0xDiscotech@users.noreply.github.com>

* fix: refactor zero check (ethereum-optimism#76)

* fix: pre pr

* fix: semver natspec check failure (ethereum-optimism#79)

* fix: semver natspec check failure

* fix: ignore mock contracts in semver natspec script

* fix: error message

* feat: add crosschain erc20 interface (ethereum-optimism#80)

* feat: add crosschain erc20 interface

* fix: refactor interfaces

* fix: superchain bridge natspec (ethereum-optimism#83)

* fix: superchain weth natspec (ethereum-optimism#84)

Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>

* fix: stop inheriting superchain interfaces (ethereum-optimism#85)

* fix: stop inheriting superchain interfaces

* fix: move events and erros into the implementation

* fix: make superchainERC20 inherits from crosschainERC20

* fix: superchain bridge rename (ethereum-optimism#86)

* fix: fee vault compiler error (ethereum-optimism#87)

* fix: remove unused imports

* fix: refactor common errors (ethereum-optimism#90)

* fix: refactor common errors

* fix: remove unused version

* fix: reuse unauthorized error (ethereum-optimism#92)

* fix: superchain erc20 factory conflicts

* fix: rename crosschain functions (ethereum-optimism#94)

---------

Co-authored-by: Disco <131301107+0xDiscotech@users.noreply.github.com>
Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
)

* feat: add superchain erc20 bridge (ethereum-optimism#61)

* feat: add superchain erc20 bridge

* fix: interfaces and versions

* refactor: optimism superchain erc20 redesign (ethereum-optimism#62)

* refactor: use oz upgradeable erc20 as dependency

* chore: update interfaces

* fix: tests based on changes

* refactor: remove op as dependency

* feat: add check for supererc20 bridge on modifier

* chore: update tests and interfaces

* chore: update stack vars name on test

* chore: remove empty gitmodules file

* chore: update superchain weth errors

* test: add superchain erc20 bridge tests (ethereum-optimism#65)

* test: add superchain erc20 bridge tests

* test: add optimism superchain erc20 beacon tests

* test: remove unnecessary test

* test: tests fixes

* test: tests fixes

* chore: update missing bridge on natspec (ethereum-optimism#69)

* chore: update missing bridge on natspec

* fix: natspecs

---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* fix: remove superchain erc20 base (ethereum-optimism#70)

* refactor: update isuperchainweth (ethereum-optimism#71)


---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* feat: rename mint/burn and add SuperchainERC20 (ethereum-optimism#74)

* refactor: rename mint and burn functions on superchain erc20

* chore: rename optimism superchain erc20 to superchain erc20

* feat: create optimism superchain erc20 contract

* chore: update natspec and errors

* fix: superchain erc20 tests

* refactor: make superchain erc20 abstract

* refactor: move storage and erc20 metadata functions to implementation

* chore: update interfaces

* chore: update superchain erc20 events

* fix: tests

* fix: natspecs

* fix: add semmver lock and snapshots

* fix: remove unused imports

* fix: natspecs

---------

Co-authored-by: 0xDiscotech <131301107+0xDiscotech@users.noreply.github.com>

* fix: refactor zero check (ethereum-optimism#76)

* fix: pre pr

* fix: semver natspec check failure (ethereum-optimism#79)

* fix: semver natspec check failure

* fix: ignore mock contracts in semver natspec script

* fix: error message

* feat: add crosschain erc20 interface (ethereum-optimism#80)

* feat: add crosschain erc20 interface

* fix: refactor interfaces

* fix: superchain bridge natspec (ethereum-optimism#83)

* fix: superchain weth natspec (ethereum-optimism#84)

Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>

* fix: stop inheriting superchain interfaces (ethereum-optimism#85)

* fix: stop inheriting superchain interfaces

* fix: move events and erros into the implementation

* fix: make superchainERC20 inherits from crosschainERC20

* fix: superchain bridge rename (ethereum-optimism#86)

* fix: fee vault compiler error (ethereum-optimism#87)

* fix: remove unused imports

* fix: refactor common errors (ethereum-optimism#90)

* fix: refactor common errors

* fix: remove unused version

* feat: add cross domain context function

* fix: reuse unauthorized error (ethereum-optimism#92)

* fix: superchain erc20 factory conflicts

* fix: rename crosschain functions (ethereum-optimism#94)

* chore: run pre-pr

* chore: run pre-pr

* fix: mocked calls on tests

* feat: add cross domain message context function (ethereum-optimism#98)


----
Co-Authored-by: AgusDuha <81362284+agusduha@users.noreply.github.com>

---------

Co-authored-by: AgusDuha <81362284+agusduha@users.noreply.github.com>
Co-authored-by: agusduha <agusnduha@gmail.com>
Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
* feat: SuperchainWETH redesign (ethereum-optimism#101)

* feat: add superchain erc20 bridge (ethereum-optimism#61)

* feat: add superchain erc20 bridge

* fix: interfaces and versions

* refactor: optimism superchain erc20 redesign (ethereum-optimism#62)

* refactor: use oz upgradeable erc20 as dependency

* chore: update interfaces

* fix: tests based on changes

* refactor: remove op as dependency

* feat: add check for supererc20 bridge on modifier

* chore: update tests and interfaces

* chore: update stack vars name on test

* chore: remove empty gitmodules file

* chore: update superchain weth errors

* test: add superchain erc20 bridge tests (ethereum-optimism#65)

* test: add superchain erc20 bridge tests

* test: add optimism superchain erc20 beacon tests

* test: remove unnecessary test

* test: tests fixes

* test: tests fixes

* chore: update missing bridge on natspec (ethereum-optimism#69)

* chore: update missing bridge on natspec

* fix: natspecs

---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* fix: remove superchain erc20 base (ethereum-optimism#70)

* refactor: update isuperchainweth (ethereum-optimism#71)


---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* feat: rename mint/burn and add SuperchainERC20 (ethereum-optimism#74)

* refactor: rename mint and burn functions on superchain erc20

* chore: rename optimism superchain erc20 to superchain erc20

* feat: create optimism superchain erc20 contract

* chore: update natspec and errors

* fix: superchain erc20 tests

* refactor: make superchain erc20 abstract

* refactor: move storage and erc20 metadata functions to implementation

* chore: update interfaces

* chore: update superchain erc20 events

* fix: tests

* fix: natspecs

* fix: add semmver lock and snapshots

* fix: remove unused imports

* fix: natspecs

---------

Co-authored-by: 0xDiscotech <131301107+0xDiscotech@users.noreply.github.com>

* fix: refactor zero check (ethereum-optimism#76)

* fix: pre pr

* fix: semver natspec check failure (ethereum-optimism#79)

* fix: semver natspec check failure

* fix: ignore mock contracts in semver natspec script

* fix: error message

* feat: add crosschain erc20 interface (ethereum-optimism#80)

* feat: add crosschain erc20 interface

* fix: refactor interfaces

* fix: superchain bridge natspec (ethereum-optimism#83)

* fix: superchain weth natspec (ethereum-optimism#84)

Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>

* fix: stop inheriting superchain interfaces (ethereum-optimism#85)

* fix: stop inheriting superchain interfaces

* fix: move events and erros into the implementation

* fix: make superchainERC20 inherits from crosschainERC20

* fix: superchain bridge rename (ethereum-optimism#86)

* fix: fee vault compiler error (ethereum-optimism#87)

* fix: remove unused imports

* fix: refactor common errors (ethereum-optimism#90)

* fix: refactor common errors

* fix: remove unused version

* fix: reuse unauthorized error (ethereum-optimism#92)

* fix: superchain erc20 factory conflicts

* fix: rename crosschain functions (ethereum-optimism#94)

* feat: superweth redesign

* fix: pr fixes

* fix: fixes post merge

---------

Co-authored-by: Disco <131301107+0xDiscotech@users.noreply.github.com>
Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>

* fix: SuperchainWETH redesign fixes (ethereum-optimism#110)

* fix: superchainWETH redesign fixes

* fix: withdraw arg

* fix: fix revert in SuperchainWETH tests (ethereum-optimism#112)

---------

Co-authored-by: AgusDuha <81362284+agusduha@users.noreply.github.com>
Co-authored-by: Disco <131301107+0xDiscotech@users.noreply.github.com>
Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: agusduha <agusnduha@gmail.com>
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
…rc20 implementation (ethereum-optimism#12476)

* feat: add superchain erc20 bridge (ethereum-optimism#61)

* feat: add superchain erc20 bridge

* fix: interfaces and versions

* refactor: optimism superchain erc20 redesign (ethereum-optimism#62)

* refactor: use oz upgradeable erc20 as dependency

* chore: update interfaces

* fix: tests based on changes

* refactor: remove op as dependency

* feat: add check for supererc20 bridge on modifier

* chore: update tests and interfaces

* chore: update stack vars name on test

* chore: remove empty gitmodules file

* chore: update superchain weth errors

* test: add superchain erc20 bridge tests (ethereum-optimism#65)

* test: add superchain erc20 bridge tests

* test: add optimism superchain erc20 beacon tests

* test: remove unnecessary test

* test: tests fixes

* test: tests fixes

* chore: update missing bridge on natspec (ethereum-optimism#69)

* chore: update missing bridge on natspec

* fix: natspecs

---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* fix: remove superchain erc20 base (ethereum-optimism#70)

* refactor: update isuperchainweth (ethereum-optimism#71)


---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* feat: rename mint/burn and add SuperchainERC20 (ethereum-optimism#74)

* refactor: rename mint and burn functions on superchain erc20

* chore: rename optimism superchain erc20 to superchain erc20

* feat: create optimism superchain erc20 contract

* chore: update natspec and errors

* fix: superchain erc20 tests

* refactor: make superchain erc20 abstract

* refactor: move storage and erc20 metadata functions to implementation

* chore: update interfaces

* chore: update superchain erc20 events

* fix: tests

* fix: natspecs

* fix: add semmver lock and snapshots

* fix: remove unused imports

* fix: natspecs

---------

Co-authored-by: 0xDiscotech <131301107+0xDiscotech@users.noreply.github.com>

* fix: refactor zero check (ethereum-optimism#76)

* fix: pre pr

* chore: add new solady version and import it for erc20

* fix: undo forge std changes

* chore: re run pre pr script

* fix: semver natspec check failure (ethereum-optimism#79)

* fix: semver natspec check failure

* fix: ignore mock contracts in semver natspec script

* fix: error message

* feat: add crosschain erc20 interface (ethereum-optimism#80)

* feat: add crosschain erc20 interface

* fix: refactor interfaces

* fix: superchain bridge natspec (ethereum-optimism#83)

* fix: superchain weth natspec (ethereum-optimism#84)

Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>

* fix: stop inheriting superchain interfaces (ethereum-optimism#85)

* fix: stop inheriting superchain interfaces

* fix: move events and erros into the implementation

* fix: make superchainERC20 inherits from crosschainERC20

* fix: superchain bridge rename (ethereum-optimism#86)

* fix: fee vault compiler error (ethereum-optimism#87)

* fix: remove unused imports

* chore: run pre-pr and update vendor interface

* fix: refactor common errors (ethereum-optimism#90)

* fix: refactor common errors

* fix: remove unused version

* feat: add permit2 on optimism superchain erc20

* chore: run pre-pr script

* fix: reuse unauthorized error (ethereum-optimism#92)

* fix: superchain erc20 factory conflicts

* fix: rename crosschain functions (ethereum-optimism#94)

* chore: run pre-pr

* chore: run pre-pr

* chore: run pre-pr

* feat: add new tests on optimism superchain erc20

* fix: vars and params naming on newly added tests

* fix: var name

* feat: support permit2 on optimism superchain erc20 and upgrade solady's erc20 implementation (ethereum-optimism#97)


---
Co-Authored-by: AgusDuha <81362284+agusduha@users.noreply.github.com>

* chore: use ierc20 alias for ierc20 solady interface (ethereum-optimism#108)

---------

Co-authored-by: AgusDuha <81362284+agusduha@users.noreply.github.com>
Co-authored-by: agusduha <agusnduha@gmail.com>
Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>
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