-
Notifications
You must be signed in to change notification settings - Fork 16
Merge main -> develop (10/17/2025) #1297
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
base: develop
Are you sure you want to change the base?
Changes from all commits
f4697df
ddf3a89
878404c
dda39fa
83feddc
46353a4
900123a
76e3647
5da64f6
bad5838
1cb7f8e
279b542
a8dd066
a5315b8
67b9250
491ce4a
634a1bc
a496fcf
af170d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
nodejs 20.13.1 | ||
nodejs 20.17.0 | ||
pnpm 10.6.5 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ build: ensure_go_version | |
|
||
# If you have a different version of protoc installed, you can use the following command to generate the protobuf files | ||
# make generate PROTOC_BIN=/path/to/protoc | ||
generate: ensure_go_version clean-generate proto-generate generate-mocks | ||
generate: ensure_go_version clean-generate proto-generate generate-mocks modgraph | ||
|
||
generate-mocks: ensure_go_version | ||
go install github.com/vektra/mockery/[email protected] | ||
|
@@ -104,3 +104,13 @@ install_buf: | |
|
||
ensure_buf_version: | ||
@$(BUF_BIN) --version | grep -q '1.50.0' || (echo "Please use buf 1.50.0" && exit 1) | ||
|
||
gomods: ## Install gomods | ||
go install github.com/jmank88/[email protected] | ||
|
||
gomodtidy: gomods | ||
gomods tidy | ||
|
||
modgraph: gomods | ||
go install github.com/jmank88/[email protected] | ||
./modgraph > go.md |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ report | |
scripts/abigen | ||
scripts/forge_zksync | ||
abi | ||
bytecode/**/*.bin | ||
solc | ||
zkout | ||
coverage | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,3 +58,7 @@ abigen: ## Build & install abigen. | |
.PHONY: mockery | ||
mockery: $(mockery) ## Install mockery. | ||
go install github.com/vektra/mockery/[email protected] | ||
|
||
.PHONY: extract-bytecode-abi | ||
extract-bytecode-abi: ## Extract bytecode and abi from versioned gobindings to bytecode and abi directories | ||
cd gobindings && go run ./cmd/extract_bytecode/main.go |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Bytecode Directory | ||
|
||
This directory contains extracted bytecode from versioned gobindings, organized by version. | ||
|
||
## Overview | ||
|
||
Bytecode is automatically extracted from the gobindings using the extraction script located at: | ||
`gobindings/cmd/extract_bytecode/main.go` | ||
|
||
The script: | ||
- Scans all versioned directories in `gobindings/generated/` (e.g., `v1_0_0`, `v1_2_0`, etc.) | ||
- Excludes the `latest/` directory (unaudited code) | ||
- Extracts the `Bin` field from each `*MetaData` variable in `.go` files | ||
- Writes the bytecode to corresponding `.bin` files in this directory | ||
- Also extracts ABIs (as JSON) to the `../abi` directory | ||
|
||
## Usage | ||
|
||
### Running Manually | ||
|
||
From the `chains/evm` directory: | ||
|
||
``` | ||
make extract-bytecode | ||
``` | ||
|
||
### Running in CI | ||
|
||
The script can be run in CI pipelines. It will: | ||
- Create the bytecode directory structure if it doesn't exist | ||
- Extract bytecode from all versioned gobindings | ||
- Report any errors to stderr with a non-zero exit code | ||
|
||
Example CI integration: | ||
|
||
```yaml | ||
- name: Extract bytecode and ABIs | ||
run: | | ||
cd chains/evm | ||
make extract-bytecode | ||
``` | ||
|
||
Note: The extraction script extracts both bytecode and ABIs in a single pass. | ||
|
||
## Directory Structure | ||
|
||
The bytecode is organized by version with all binaries directly in the version directory: | ||
|
||
``` | ||
bytecode/ | ||
├── v1_0_0/ | ||
│ ├── lock_release_token_pool.bin | ||
│ ├── rmn_proxy_contract.bin | ||
│ └── ... | ||
├── v1_2_0/ | ||
│ ├── burn_mint_token_pool.bin | ||
│ ├── commit_store.bin | ||
│ └── ... | ||
└── ... | ||
``` | ||
|
||
Each `.bin` file contains the raw bytecode hex string (with `0x` prefix) extracted from the corresponding gobinding. | ||
|
||
## How It Works | ||
|
||
The extraction script uses Go's AST parser to: | ||
1. Parse each `.go` file in versioned directories | ||
2. Find variable declarations ending with `MetaData` | ||
3. Extract the `Bin` field from the `&bind.MetaData{...}` composite literal | ||
4. Write the bytecode to a corresponding `.bin` file | ||
|
||
This approach is robust and doesn't rely on regex or string manipulation, ensuring accurate extraction even as the gobinding format evolves. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,10 @@ library Internal { | |
// https://github.com/aptos-labs/aptos-core/blob/main/aptos-move/framework/aptos-framework/doc/account.md#function-create_framework_reserved_account-1 | ||
uint256 public constant APTOS_PRECOMPILE_SPACE = 0x0b; | ||
|
||
// According to the Sui docs, a set of non-contiguous addresses below 0xdee9 are reserved for system use. | ||
// https://github.com/MystenLabs/sui/blob/54ae98508569804127bd73d84aa2fb816bdea402/crates/sui-types/src/lib.rs#L141 | ||
uint256 public constant SUI_PRECOMPILE_SPACE = 0xdee9; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: Remove all Sui references? |
||
|
||
/// @notice This methods provides validation for parsing abi encoded addresses by ensuring the address is within the | ||
/// EVM address space. If it isn't it will revert with an InvalidEVMAddress error, which we can catch and handle | ||
/// more gracefully than a revert from abi.decode. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ import {SafeERC20} from "@openzeppelin/[email protected]/token/ERC20/utils/SafeERC | |
contract BurnFromMintTokenPool is BurnMintTokenPoolAbstract, ITypeAndVersion { | ||
using SafeERC20 for IBurnMintERC20; | ||
|
||
string public constant override typeAndVersion = "BurnFromMintTokenPool 1.6.3-dev"; | ||
string public constant override typeAndVersion = "BurnFromMintTokenPool 1.7.0-dev"; | ||
|
||
constructor( | ||
IBurnMintERC20 token, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ import {TokenPool} from "./TokenPool.sol"; | |
/// If that is expected, please make sure the token's burner/minter roles are adjustable. | ||
/// @dev This contract is a variant of BurnMintTokenPool that uses `burn(amount)`. | ||
contract BurnMintTokenPool is BurnMintTokenPoolAbstract, ITypeAndVersion { | ||
string public constant override typeAndVersion = "BurnMintTokenPool 1.6.3-dev"; | ||
string public constant override typeAndVersion = "BurnMintTokenPool 1.7.0-dev"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated all the token pool versions, pools on develop are CCV enabled and versions should reflect that. |
||
|
||
constructor( | ||
IBurnMintERC20 token, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ import {SafeERC20} from "@openzeppelin/[email protected]/token/ERC20/utils/SafeERC | |
contract BurnToAddressMintTokenPool is BurnMintTokenPoolAbstract, ITypeAndVersion { | ||
using SafeERC20 for IERC20; | ||
|
||
string public constant override typeAndVersion = "BurnToAddressTokenPool 1.6.3-dev"; | ||
string public constant override typeAndVersion = "BurnToAddressTokenPool 1.7.0-dev"; | ||
|
||
/// @notice The address where tokens are sent during a call to lockOrBurn, functionally burning but without decreasing | ||
/// total supply. This address is expected to have no ability to recover the tokens sent to it, and will thus be locked forever. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ import {SafeERC20} from "@openzeppelin/[email protected]/token/ERC20/utils/SafeERC | |
contract BurnWithFromMintTokenPool is BurnMintTokenPoolAbstract, ITypeAndVersion { | ||
using SafeERC20 for IBurnMintERC20; | ||
|
||
string public constant override typeAndVersion = "BurnWithFromMintTokenPool 1.6.3-dev"; | ||
string public constant override typeAndVersion = "BurnWithFromMintTokenPool 1.7.0-dev"; | ||
|
||
constructor( | ||
IBurnMintERC20 token, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ pragma solidity ^0.8.0; | |
|
||
import {Client} from "../../../libraries/Client.sol"; | ||
import {TokenSetup} from "../../TokenSetup.t.sol"; | ||
import {IRouterClient, MockCCIPRouter} from "../MockRouter.sol"; | ||
import {IRouterClient, MockCCIPRouter} from "../../mocks/MockRouter.sol"; | ||
|
||
import {IERC20} from "@openzeppelin/[email protected]/token/ERC20/IERC20.sol"; | ||
import {SafeERC20} from "@openzeppelin/[email protected]/token/ERC20/utils/SafeERC20.sol"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Remove all Sui references?