Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,31 @@ ARBITRUM_OUTBOX=
ARBITRUM_ROOTS_SLOT=

#Linea Envs
LINEA_CHAIN_ID=
LINEA_ROLLUP=
LINEA_STATE_ROOT_HASHES_SLOT=
LINEA_L2_MESSAGE_SERVICE=
LINEA_CHAIN_ID=59141
LINEA_ROLLUP=0xB218f8A4Bc926cF1cA7b3423c154a0D627Bdb7E5
LINEA_STATE_ROOT_HASHES_SLOT=282
LINEA_L2_MESSAGE_SERVICE=0x971e727e956690b9957be6d51Ec16E73AcAC83A7

# Scroll Envs
SCROLL_CHAIN_ID=
SCROLL_CHAIN_SEPOLIA=
SCROLL_FINALIZED_STATE_ROOT_SLOT=
L1_SCROLL_MESSENGER=
L2_SCROLL_MESSENGER=
SCROLL_CHAIN_ID=534351
SCROLL_CHAIN=0x2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0
SCROLL_FINALIZED_STATE_ROOT_SLOT=158
L1_SCROLL_MESSENGER=0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A
L2_SCROLL_MESSENGER=0xBa50f5340FB9F3Bd074bD638c9BE13eCB36E603d

# Optimism Envs
OPTIMISM_CHAIN_ID=
OPTIMISM_ANCHOR_GAME_SLOT=
OPTIMISM_ANCHOR_STATE_REGISTRY=
OPTIMISM_L1_CROSS_DOMAIN_MESSENGER_PROXY=
OPTIMISM_L2_CROSS_DOMAIN_MESSENGER=
OPTIMISM_CHAIN_ID=11155420
OPTIMISM_ANCHOR_GAME_SLOT=2
OPTIMISM_ANCHOR_STATE_REGISTRY=0xa1Cec548926eb5d69aa3B7B57d371EdBdD03e64b
OPTIMISM_L1_CROSS_DOMAIN_MESSENGER_PROXY=0x58Cc85b8D04EA49cC6DBd3CbFFd00B4B8D6cb3ef
OPTIMISM_L2_CROSS_DOMAIN_MESSENGER=0x4200000000000000000000000000000000000007

# ZkSync Envs
ZKSYNC_CHAIN_ID=
ZKSYNC_DIAMOND=
ZKSYNC_GATEWAY_ZK_CHAIN=
ZKSYNC_L2_LOGS_ROOT_HASH_SLOT=
ZKSYNC_GATEWAY_CHAIN_ID=
ZKSYNC_CHAIN_ID=300
ZKSYNC_DIAMOND=0x9A6DE0f62Aa270A8bCB1e2610078650D539B1Ef9
ZKSYNC_GATEWAY_ZK_CHAIN=0xFFDbb7B7F35A8b81618F64d95BCc878297759744
ZKSYNC_L2_LOGS_ROOT_HASH_SLOT=15
ZKSYNC_GATEWAY_CHAIN_ID=32657
Comment on lines +20 to +44

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Split Sepolia defaults out of the shared example.

These values are all network-specific Sepolia settings, but the rest of this PR now supports mainnet too. Copying .env.example and only swapping RPC URLs or top-level chain IDs can leave rollup addresses and storage slots pointed at testnet, which is an easy way to produce broken mainnet deployments. Please either keep these blank or publish separate example env files per environment.

🧰 Tools
🪛 dotenv-linter (4.0.0)

[warning] 23-23: [UnorderedKey] The LINEA_L2_MESSAGE_SERVICE key should go before the LINEA_ROLLUP key

(UnorderedKey)


[warning] 27-27: [UnorderedKey] The SCROLL_CHAIN key should go before the SCROLL_CHAIN_ID key

(UnorderedKey)


[warning] 29-29: [UnorderedKey] The L1_SCROLL_MESSENGER key should go before the SCROLL_CHAIN key

(UnorderedKey)


[warning] 30-30: [UnorderedKey] The L2_SCROLL_MESSENGER key should go before the SCROLL_CHAIN key

(UnorderedKey)


[warning] 34-34: [UnorderedKey] The OPTIMISM_ANCHOR_GAME_SLOT key should go before the OPTIMISM_CHAIN_ID key

(UnorderedKey)


[warning] 35-35: [UnorderedKey] The OPTIMISM_ANCHOR_STATE_REGISTRY key should go before the OPTIMISM_CHAIN_ID key

(UnorderedKey)


[warning] 44-44: [UnorderedKey] The ZKSYNC_GATEWAY_CHAIN_ID key should go before the ZKSYNC_GATEWAY_ZK_CHAIN key

(UnorderedKey)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.env.example around lines 20 - 44, The .env.example currently contains
network-specific Sepolia defaults (e.g., LINEA_CHAIN_ID, LINEA_ROLLUP,
LINEA_STATE_ROOT_HASHES_SLOT, SCROLL_CHAIN_ID, SCROLL_CHAIN,
SCROLL_FINALIZED_STATE_ROOT_SLOT, OPTIMISM_CHAIN_ID, OPTIMISM_ANCHOR_GAME_SLOT,
ZKSYNC_CHAIN_ID, ZKSYNC_DIAMOND, etc.); replace those hardcoded values with
blank placeholders (KEY=) or remove them from the shared example, or
alternatively publish separate example files per environment (e.g.,
.env.example.mainnet and .env.example.sepolia) so consumers cannot accidentally
deploy with testnet rollup addresses or slot IDs. Ensure each variable name
remains present for guidance but with no environment-specific value.




6 changes: 3 additions & 3 deletions deployments/arbitrum-sepolia.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"contracts": {
"broadcaster": "0x2e6f2Cb4bf4E4D2166F83958442a180825B94248",
"receiver": "0x712535fE2e24df51917DB5438EB3dA90437F70AF",
"buffer": "0x0000000048C4Ed10cF14A02B9E0AbDDA5227b071",
"pusher": "0x5a5C4f3D0F0Efaeed2aEc9B59B67eC62a4666D88"
"pusher": "0x5a5C4f3D0F0Efaeed2aEc9B59B67eC62a4666D88",
"broadcaster": "0x536c398D9bBAf896b128C99bB7c78CfA3243AE27",
"receiver": "0x16681d01c9169aacaFB6BbCBaF4c7C3002C63059"
},
"copies": {
"ethereum-sepolia": {
Expand Down
26 changes: 26 additions & 0 deletions deployments/arbitrum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"contracts": {
"broadcaster": "0x536c398D9bBAf896b128C99bB7c78CfA3243AE27",
"receiver": "0x16681d01c9169aacaFB6BbCBaF4c7C3002C63059",
"pusher": "0x5a5C4f3D0F0Efaeed2aEc9B59B67eC62a4666D88",
"buffer": "0x0000000048C4Ed10cF14A02B9E0AbDDA5227b071",
"broadcaster-oracle": "0xBf8d2e6961b5725e3A4499BF1A2A1CcAB219DC51",
"input-settler-escrow": "0x15eA18EAcD9C35b454CF1456ed1bD05636B46147",
"output-settler-simple": "0x1DCE289d62C2068584C5D0CFb5C1fD538e832847"
},
"provers": {
"ethereum": {
"pointer": "0xB45B3985Ba20b20014FA73a7E7dAb1c171D869E6",
"prover": "0xFc8992F8dFf4e14573E6588dCc92dcDEa583DeBE"
}
},
"copies": {
"ethereum": {
"linea": "0x347Fdf829FeE4289c520F23b3537e273EA41AE30",
"scroll": "0xa50B98CF3fcC4226eA724223DeA1B9F9ECDa3F70",
"optimism": "0x6B0e07592261540cF9D141d894b8A17FE1A04a98",
"zksync": "0x4148d6E5cF0a095dB68f20A99DBf1232D8BB1cC6",
"base": "0xfBc1Edd87a700DBD7eaa3E038E54E6C7fFba1723"
}
}
}
26 changes: 26 additions & 0 deletions deployments/base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"contracts": {
"broadcaster": "0x536c398D9bBAf896b128C99bB7c78CfA3243AE27",
"receiver": "0x16681d01c9169aacaFB6BbCBaF4c7C3002C63059",
"pusher": "0xcBF1db810c116e21fbf957530b73768924Fb2D02",
"buffer": "0xeB69db5269d89EBF0324e06926BE4200CF7E77f8",
"broadcaster-oracle": "0x0a6edD8A400b6db1bbe0d21Ecef07c4Fce983248",
"input-settler-escrow": "0x15eA18EAcD9C35b454CF1456ed1bD05636B46147",
"output-settler-simple": "0x1DCE289d62C2068584C5D0CFb5C1fD538e832847"
},
"copies": {
"ethereum": {
"arbitrum": "0xfdB7609b3fFd817454fDF8409b01399DF4a45adD",
"linea": "0x347Fdf829FeE4289c520F23b3537e273EA41AE30",
"scroll": "0xa50B98CF3fcC4226eA724223DeA1B9F9ECDa3F70",
"optimism": "0x6B0e07592261540cF9D141d894b8A17FE1A04a98",
"zksync": "0x4148d6E5cF0a095dB68f20A99DBf1232D8BB1cC6"
}
},
"provers": {
"ethereum": {
"pointer": "0x1c7ca0a4d176A03Fe93C1f5d6555f2ED724B6b04",
"prover": "0xE91c715Fbef1CD5bd79f0fCbda3bA499031f3329"
}
}
}
4 changes: 2 additions & 2 deletions deployments/ethereum-sepolia.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"contracts": {
"broadcaster": "0x2e6f2Cb4bf4E4D2166F83958442a180825B94248",
"receiver": "0x712535fE2e24df51917DB5438EB3dA90437F70AF"
"broadcaster": "0x536c398D9bBAf896b128C99bB7c78CfA3243AE27",
"receiver": "0x16681d01c9169aacaFB6BbCBaF4c7C3002C63059"
},
"pushers": {
"arbitrum-sepolia": "0x5a5C4f3D0F0Efaeed2aEc9B59B67eC62a4666D88",
Expand Down
43 changes: 43 additions & 0 deletions deployments/ethereum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"contracts": {
"broadcaster": "0x536c398D9bBAf896b128C99bB7c78CfA3243AE27",
"receiver": "0x16681d01c9169aacaFB6BbCBaF4c7C3002C63059",
"pusher": "0x5a5C4f3D0F0Efaeed2aEc9B59B67eC62a4666D88",
"broadcaster-oracle": "0xBf8d2e6961b5725e3A4499BF1A2A1CcAB219DC51",
"input-settler-escrow": "0x15eA18EAcD9C35b454CF1456ed1bD05636B46147",
"output-settler-simple": "0x1DCE289d62C2068584C5D0CFb5C1fD538e832847"
},
"provers": {
"arbitrum": {
"pointer": "0xC70F25F1C275A1803c511c898c660ee28E08D148",
"prover": "0xfdB7609b3fFd817454fDF8409b01399DF4a45adD"
},
"linea": {
"pointer": "0x70eD7E966C589928e3320c30CF1aD86d49E175d3",
"prover": "0x347Fdf829FeE4289c520F23b3537e273EA41AE30"
},
"scroll": {
"pointer": "0x749a05534A0D023df7238205F6B8146978b23332",
"prover": "0xa50B98CF3fcC4226eA724223DeA1B9F9ECDa3F70"
},
"optimism": {
"pointer": "0xfBB590FAA27E8e51411511f6aC2B868FDF18d607",
"prover": "0x6B0e07592261540cF9D141d894b8A17FE1A04a98"
},
"zksync": {
"pointer": "0xd7CB2eC1D83B93E92785116cF73a8e6F29079831",
"prover": "0x4148d6E5cF0a095dB68f20A99DBf1232D8BB1cC6"
},
"base": {
"pointer": "0x8645f22Bc5d6b9531a76E20d3eD749A55117F47C",
"prover": "0xfBc1Edd87a700DBD7eaa3E038E54E6C7fFba1723"
}
},
"pushers": {
"linea": "0xe0f5B1750670FBea7f8c9D825DdBfa6A34a7727b",
"scroll": "0x331475638c7B3356c3E1d1Ff0c1477F7D8B8fB04",
"zksync": "0x32e6E59958Cb6C7C528573a42456955E1EC3FF12",
"optimism": "0xcf118D7a3635F9B18B4aa88bFCDB4fa51c73719D",
"base": "0xcBF1db810c116e21fbf957530b73768924Fb2D02"
}
}
6 changes: 3 additions & 3 deletions deployments/linea-sepolia.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"contracts": {
"broadcaster": "0x2e6f2Cb4bf4E4D2166F83958442a180825B94248",
"receiver": "0x712535fE2e24df51917DB5438EB3dA90437F70AF",
"buffer": "0xCd455Df9F48Af8C86427fE3F86787D95330F65AA",
"pusher": "0x2aC21Fcfd6905eF13FA9bc0F874f3524029cB443"
"pusher": "0x2aC21Fcfd6905eF13FA9bc0F874f3524029cB443",
"broadcaster": "0x536c398D9bBAf896b128C99bB7c78CfA3243AE27",
"receiver": "0x16681d01c9169aacaFB6BbCBaF4c7C3002C63059"
},
"copies": {
"ethereum-sepolia": {
Expand Down
26 changes: 26 additions & 0 deletions deployments/linea.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"contracts": {
"broadcaster": "0x536c398D9bBAf896b128C99bB7c78CfA3243AE27",
"receiver": "0x16681d01c9169aacaFB6BbCBaF4c7C3002C63059",
"pusher": "0xe0f5B1750670FBea7f8c9D825DdBfa6A34a7727b",
"buffer": "0xe0f5B1750670FBea7f8c9D825DdBfa6A34a7727b",
Comment on lines +5 to +6

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Compare pusher and buffer addresses across mainnet deployment files
echo "=== Comparing pusher and buffer addresses ==="
for f in deployments/arbitrum.json deployments/linea.json deployments/optimism.json deployments/scroll.json deployments/zksync.json; do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    jq '{pusher: .contracts.pusher, buffer: .contracts.buffer}' "$f" 2>/dev/null
  fi
done

Repository: openintentsframework/broadcaster

Length of output: 879


🏁 Script executed:

#!/bin/bash
# Search for pusher and buffer contract references in the codebase
echo "=== Searching for pusher contract references ==="
rg -i "pusher" --max-count 20 -A 3 -B 3

echo ""
echo "=== Searching for buffer contract references ==="
rg -i "buffer" --max-count 20 -A 3 -B 3

Repository: openintentsframework/broadcaster

Length of output: 50389


🏁 Script executed:

#!/bin/bash
# Check the deployment files for patterns and comments
echo "=== Full content of deployment files ==="
for f in deployments/arbitrum.json deployments/linea.json deployments/optimism.json deployments/scroll.json deployments/zksync.json; do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    cat -n "$f"
    echo ""
  fi
done

Repository: openintentsframework/broadcaster

Length of output: 5916


🏁 Script executed:

#!/bin/bash
# Search for Linea-specific configuration or notes
echo "=== Searching for Linea-specific documentation or comments ==="
find . -type f \( -name "*.md" -o -name "*.sol" -o -name "*.sh" -o -name "*.json" \) | xargs grep -l -i "linea" | head -20

Repository: openintentsframework/broadcaster

Length of output: 869


🏁 Script executed:

#!/bin/bash
# Check Linea documentation
cat docs/provers/LINEA.md

Repository: openintentsframework/broadcaster

Length of output: 14074


🏁 Script executed:

#!/bin/bash
# Check deployment scripts for Linea-specific configuration
echo "=== Checking Linea deployment scripts ==="
find scripts/deployment -name "*inea*" -o -name "*inea*" | xargs cat -n 2>/dev/null

Repository: openintentsframework/broadcaster

Length of output: 6535


Fix duplicate pusher and buffer addresses in linea.json.

The pusher and buffer fields are currently set to the same address (0xe0f5B1750670FBea7f8c9D825DdBfa6A34a7727b). The pusher contract is deployed on Ethereum L1, while the buffer contract is deployed on Linea L2—they must have distinct addresses. All other mainnet deployment files (arbitrum.json, optimism.json, scroll.json, zksync.json) correctly use different addresses for these two contracts. Verify the correct L1 pusher address for Linea and update the configuration accordingly.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@deployments/linea.json` around lines 5 - 6, The linea.json deployment has the
pusher and buffer fields both set to the same address; update the "pusher" value
so it points to the correct Ethereum L1 pusher contract (distinct from the Linea
L2 "buffer" address) by looking up the deployed L1 pusher address and replacing
the current "pusher" entry while leaving "buffer" as the Linea L2 address;
ensure the "pusher" and "buffer" fields are different and consistent with other
mainnet deployment files.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The contracts are right, it's a coincidence

"broadcaster-oracle": "0x0a6edD8A400b6db1bbe0d21Ecef07c4Fce983248",
"input-settler-escrow": "0x15eA18EAcD9C35b454CF1456ed1bD05636B46147",
"output-settler-simple": "0x1DCE289d62C2068584C5D0CFb5C1fD538e832847"
},
"copies": {
"ethereum": {
"arbitrum": "0xfdB7609b3fFd817454fDF8409b01399DF4a45adD",
"scroll": "0xa50B98CF3fcC4226eA724223DeA1B9F9ECDa3F70",
"optimism": "0x6B0e07592261540cF9D141d894b8A17FE1A04a98",
"zksync": "0x4148d6E5cF0a095dB68f20A99DBf1232D8BB1cC6",
"base": "0xfBc1Edd87a700DBD7eaa3E038E54E6C7fFba1723"
}
},
"provers": {
"ethereum": {
"pointer": "0x1c7ca0a4d176A03Fe93C1f5d6555f2ED724B6b04",
"prover": "0xc96707EF3F543aE9f81aAa81f92b11F3A6F825Dc"
}
}
}
6 changes: 3 additions & 3 deletions deployments/optimism-sepolia.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"contracts": {
"broadcaster": "0x2e6f2Cb4bf4E4D2166F83958442a180825B94248",
"receiver": "0x712535fE2e24df51917DB5438EB3dA90437F70AF",
"buffer": "0xaC0a6EB6407b9C13c3B374219B2f91fda4DF47C5",
"pusher": "0x2c4ded0d5883646AEAD86a6C748c871afa819125"
"pusher": "0x2c4ded0d5883646AEAD86a6C748c871afa819125",
"broadcaster": "0x536c398D9bBAf896b128C99bB7c78CfA3243AE27",
"receiver": "0x16681d01c9169aacaFB6BbCBaF4c7C3002C63059"
},
"copies": {
"ethereum-sepolia": {
Expand Down
26 changes: 26 additions & 0 deletions deployments/optimism.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"contracts": {
"broadcaster": "0x536c398D9bBAf896b128C99bB7c78CfA3243AE27",
"receiver": "0x16681d01c9169aacaFB6BbCBaF4c7C3002C63059",
"pusher": "0xcf118D7a3635F9B18B4aa88bFCDB4fa51c73719D",
"buffer": "0x9F9F7687eBfaFABA830f741006Fd6D739f76f6A6",
"broadcaster-oracle": "0x0a6edD8A400b6db1bbe0d21Ecef07c4Fce983248",
"input-settler-escrow": "0x15eA18EAcD9C35b454CF1456ed1bD05636B46147",
"output-settler-simple": "0x1DCE289d62C2068584C5D0CFb5C1fD538e832847"
},
"copies": {
"ethereum": {
"arbitrum": "0xfdB7609b3fFd817454fDF8409b01399DF4a45adD",
"linea": "0x347Fdf829FeE4289c520F23b3537e273EA41AE30",
"zksync": "0x4148d6E5cF0a095dB68f20A99DBf1232D8BB1cC6",
"scroll": "0xa50B98CF3fcC4226eA724223DeA1B9F9ECDa3F70",
"base": "0xfBc1Edd87a700DBD7eaa3E038E54E6C7fFba1723"
}
},
"provers": {
"ethereum": {
"pointer": "0x1c7ca0a4d176A03Fe93C1f5d6555f2ED724B6b04",
"prover": "0x0Adf8FefA84B09ebD31E7eDA9c381D4ADB44ca1d"
}
}
}
6 changes: 3 additions & 3 deletions deployments/scroll-sepolia.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"contracts": {
"broadcaster": "0x2e6f2Cb4bf4E4D2166F83958442a180825B94248",
"receiver": "0x712535fE2e24df51917DB5438EB3dA90437F70AF",
"buffer": "0x12e91f63cC0F43434141396AC0E9f5b1A0e103D6",
"pusher": "0xF99b4E792aCaBa74cb2d1A5D3fDBDFfe630C0a8e"
"pusher": "0xF99b4E792aCaBa74cb2d1A5D3fDBDFfe630C0a8e",
"broadcaster": "0x536c398D9bBAf896b128C99bB7c78CfA3243AE27",
"receiver": "0x16681d01c9169aacaFB6BbCBaF4c7C3002C63059"
},
"copies": {
"ethereum-sepolia": {
Expand Down
26 changes: 26 additions & 0 deletions deployments/scroll.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"contracts": {
"broadcaster": "0x536c398D9bBAf896b128C99bB7c78CfA3243AE27",
"receiver": "0x16681d01c9169aacaFB6BbCBaF4c7C3002C63059",
"pusher": "0x331475638c7B3356c3E1d1Ff0c1477F7D8B8fB04",
"buffer": "0x58b67c85CeCAa0e2c4476Ed1Be03970EFbce298c",
"broadcaster-oracle": "0x0a6edD8A400b6db1bbe0d21Ecef07c4Fce983248",
"input-settler-escrow": "0x15eA18EAcD9C35b454CF1456ed1bD05636B46147",
"output-settler-simple": "0x1DCE289d62C2068584C5D0CFb5C1fD538e832847"
},
"copies": {
"ethereum": {
"arbitrum": "0xfdB7609b3fFd817454fDF8409b01399DF4a45adD",
"linea": "0x347Fdf829FeE4289c520F23b3537e273EA41AE30",
"optimism": "0x6B0e07592261540cF9D141d894b8A17FE1A04a98",
"zksync": "0x4148d6E5cF0a095dB68f20A99DBf1232D8BB1cC6",
"base": "0xfBc1Edd87a700DBD7eaa3E038E54E6C7fFba1723"
}
},
"provers": {
"ethereum": {
"pointer": "0x1c7ca0a4d176A03Fe93C1f5d6555f2ED724B6b04",
"prover": "0xe8cBb8F5B085ECE491673E6d1239081b77f0Ca9a"
}
}
}
Comment on lines +1 to +26

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if the broadcaster contract is verified on Scroll mainnet
echo "Checking Scroll mainnet broadcaster contract..."
curl -s "https://api.scrollscan.com/api?module=contract&action=getsourcecode&address=0x536c398D9bBAf896b128C99bB7c78CfA3243AE27" | jq '.result[0].ContractName // "Not verified or error"'

Repository: openintentsframework/broadcaster

Length of output: 198


🏁 Script executed:

# Check the scroll.json file and verify its structure
file_path="deployments/scroll.json"

# Check if file exists and view it with line numbers to see trailing newline
echo "=== File content with line numbers ==="
cat -n "$file_path"

echo ""
echo "=== Check for trailing newline ==="
if [ -z "$(tail -c 1 "$file_path")" ]; then
  echo "File HAS a trailing newline"
else
  echo "File DOES NOT have a trailing newline"
fi

echo ""
echo "=== Validate JSON structure ==="
python3 << 'PYTHON_EOF'
import json
try:
    with open('deployments/scroll.json', 'r') as f:
        data = json.load(f)
    print("✓ Valid JSON structure")
    print(f"✓ Keys present: {list(data.keys())}")
    
    # Validate address formats
    all_addresses = []
    def extract_addresses(obj):
        if isinstance(obj, dict):
            for v in obj.values():
                if isinstance(v, str) and v.startswith('0x'):
                    all_addresses.append(v)
                extract_addresses(v)
        elif isinstance(obj, list):
            for item in obj:
                extract_addresses(item)
    
    extract_addresses(data)
    print(f"✓ Total addresses found: {len(all_addresses)}")
    
    # Validate hex format
    invalid_addresses = []
    for addr in all_addresses:
        if not (len(addr) == 42 and all(c in '0123456789abcdefABCDEF' for c in addr[2:])):
            invalid_addresses.append(addr)
    
    if invalid_addresses:
        print(f"✗ Invalid address formats: {invalid_addresses}")
    else:
        print(f"✓ All {len(all_addresses)} addresses have valid format (42 chars, 0x prefix)")
        
except json.JSONDecodeError as e:
    print(f"✗ Invalid JSON: {e}")
PYTHON_EOF

Repository: openintentsframework/broadcaster

Length of output: 1509


Add trailing newline to maintain POSIX compliance.

The JSON structure and all 13 contract addresses are valid. The file is missing a final newline character; add it to the end of deployments/scroll.json.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@deployments/scroll.json` around lines 1 - 25, The file is missing a final
newline; open the JSON containing the "contracts" (e.g., broadcaster, receiver,
pusher, buffer, broadcaster-oracle, input-settler-escrow, output-settler-simple)
and "copies"/"provers" sections and add a single trailing newline character at
the end of the file so it ends with a POSIX-compliant line break.

6 changes: 3 additions & 3 deletions deployments/zksync-sepolia.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"contracts": {
"broadcaster": "0x5483634580acDB4f0134E09025732DF9784e46e3",
"receiver": "0x712535fE2e24df51917DB5438EB3dA90437F70AF",
"buffer": "0x4309FcAA812F729A2c6Fc9b67094296389eC919c",
"pusher": "0xc69281Edb758A5dDD7A13e12b4F3d81b14Bd983B"
"pusher": "0xc69281Edb758A5dDD7A13e12b4F3d81b14Bd983B",
"broadcaster": "0xE07Fe9bE1615fE5b3eCdbE07aDe090eDFEf65e80",
"receiver": "0x16681d01c9169aacaFB6BbCBaF4c7C3002C63059"
},
"copies": {
"ethereum-sepolia": {
Expand Down
26 changes: 26 additions & 0 deletions deployments/zksync.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"contracts": {
"broadcaster": "0xE07Fe9bE1615fE5b3eCdbE07aDe090eDFEf65e80",
"receiver": "0x16681d01c9169aacaFB6BbCBaF4c7C3002C63059",
"pusher": "0x32e6E59958Cb6C7C528573a42456955E1EC3FF12",
"buffer": "0xe0f5B1750670FBea7f8c9D825DdBfa6A34a7727b",
"broadcaster-oracle": "0x0a6edD8A400b6db1bbe0d21Ecef07c4Fce983248",
"input-settler-escrow": "0x15eA18EAcD9C35b454CF1456ed1bD05636B46147",
"output-settler-simple": "0x1DCE289d62C2068584C5D0CFb5C1fD538e832847"
},
"copies": {
"ethereum": {
"arbitrum": "0xfdB7609b3fFd817454fDF8409b01399DF4a45adD",
"linea": "0x347Fdf829FeE4289c520F23b3537e273EA41AE30",
"scroll": "0xa50B98CF3fcC4226eA724223DeA1B9F9ECDa3F70",
"optimism": "0x6B0e07592261540cF9D141d894b8A17FE1A04a98",
"base": "0xfBc1Edd87a700DBD7eaa3E038E54E6C7fFba1723"
}
},
"provers": {
"ethereum": {
"pointer": "0x1c7ca0a4d176A03Fe93C1f5d6555f2ED724B6b04",
"prover": "0x0C413Eb0681c91e677BA6D4a8bBC0989a7962bd6"
}
}
}
9 changes: 9 additions & 0 deletions scripts/deployment/DeployBase.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ contract DeployBase is Script {
if (chainId == 534351) return "scroll-sepolia";
if (chainId == 11155420) return "optimism-sepolia";
if (chainId == 300) return "zksync-sepolia";

if (chainId == 1) return "ethereum";
if (chainId == 42161) return "arbitrum";
if (chainId == 59144) return "linea";
if (chainId == 534352) return "scroll";
if (chainId == 10) return "optimism";
if (chainId == 324) return "zksync";
if (chainId == 8453) return "base";

revert InvalidChainId(chainId);
}

Expand Down
12 changes: 9 additions & 3 deletions scripts/deployment/block-hash-pusher/DeployBuffers.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ import {DeployBase} from "../DeployBase.s.sol";
contract DeployBuffers is DeployBase {
function run() public {
string memory chainType = vm.envString("CHAIN_TYPE");
string memory parentChain = vm.envString("PARENT_CHAIN");
string memory childChain = vm.envString("CHILD_CHAIN");

uint256 parentChainId = vm.envUint("PARENT_CHAIN_ID");
uint256 childChainId = vm.envUint("CHILD_CHAIN_ID");
string memory parentChain = _chainName(parentChainId);
string memory childChain = _chainName(childChainId);
Comment on lines 14 to +19

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Use one source of truth for the child chain.

parentChain/childChain now come from env IDs, but the buffer implementation is still selected from CHAIN_TYPE and the output manifest is still keyed off block.chainid. If those drift, this script can read the pusher for one chain pair, deploy another chain’s buffer, and write it into a third chain’s JSON. Add an explicit block.chainid == CHILD_CHAIN_ID check and derive or assert the rollup type from that same source.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/deployment/block-hash-pusher/DeployBuffers.s.sol` around lines 14 -
19, The script currently mixes sources for chain identity (CHAIN_TYPE env and
block.chainid) which can cause mismatches; update DeployBuffers.s.sol so the
child chain is a single source of truth by deriving/asserting chain info from
CHILD_CHAIN_ID: use vm.envUint("CHILD_CHAIN_ID") (childChainId) and
_chainName(childChainId) (childChain) everywhere the child is needed, add an
explicit runtime check that block.chainid == childChainId (revert or vm.expect)
to prevent accidental deployment on the wrong chain, and derive or assert the
rollup/buffer implementation (currently selected from chainType/CHAIN_TYPE) from
the same childChainId source instead of CHAIN_TYPE to keep all decisions
consistent. Ensure references to parentChain/parentChainId remain from
PARENT_CHAIN_ID and only use CHAIN_TYPE after validating it matches the derived
rollup type if you must keep it.


address pusherAddress = _getPusherAddress(parentChain, childChain);
if (pusherAddress == address(0)) {
Expand All @@ -38,7 +41,10 @@ contract DeployBuffers is DeployBase {
buffer = address(new LineaBuffer(messenger, pusherAddress));
} else if (keccak256(bytes(chainType)) == keccak256(bytes("scroll"))) {
buffer = address(new ScrollBuffer(messenger, pusherAddress));
} else if (keccak256(bytes(chainType)) == keccak256(bytes("optimism"))) {
} else if (
keccak256(bytes(chainType)) == keccak256(bytes("optimism"))
|| keccak256(bytes(chainType)) == keccak256(bytes("base"))
) {
buffer = address(new OptimismBuffer(messenger, pusherAddress));
} else {
revert("Invalid chain type");
Expand Down
Loading
Loading