-
Notifications
You must be signed in to change notification settings - Fork 11
feat: add astron v5 #64
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
Conversation
WalkthroughThe contract addresses for the Astron chain ID were updated in three categories—TitleEscrowFactory, Deployer, and TokenImplementation—within the contractAddress object in a constants file. No other logic, structure, or chain IDs were modified. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
npm error Exit handler never called! Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/constants/contract-address.ts (1)
48-50: Ensure TokenImplementation byte-code matches the new addressThe new implementation
0x025aF5b49f1755C536d6965093C88d85A7Ec3300must host the same runtime byte-code/hash your front-end or subgraphs expect. Consider pinning the code hash in a follow-up constant to guard against silent redeploys.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/constants/contract-address.ts(3 hunks)
🔇 Additional comments (1)
src/constants/contract-address.ts (1)
36-38: Checksum / deploy-key alignment for Deployer addressConfirm that
0x79ED245fFecdAF8C87BFE35ccF6A7b9FE9024240is the actual signer that deployed the Astron v5 contracts; a mismatch here will block on-chain ownership checks.
| [ChainId.Astron]: "0xa1fCAE62b69D85BfBb5B447f038123A1e4d8f6eC", | ||
| [ChainId.AstronTestnet]: "0x812A0E71c61A42C8d3d449BdfF51834f85686C73", | ||
| }, |
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.
💡 Verification agent
🧩 Analysis chain
Please verify the new Astron TitleEscrowFactory address checksum
0xa1fCAE62b69D85BfBb5B447f038123A1e4d8f6eC looks correct at a glance, but a one-character case error breaks EIP-55 checksum guarantees and makes copy–paste mistakes harder to catch.
Run the quick check below. It exits non-zero if any Astron addresses are not valid checksummed hex strings:
🏁 Script executed:
#!/bin/bash
pip install --quiet eth_utils
python - <<'PY'
import re, sys, json, pathlib
from eth_utils import is_checksum_address, to_checksum_address
data = pathlib.Path("src/constants/contract-address.ts").read_text()
addrs = re.findall(r'0x[a-fA-F0-9]{40}', data)
bad = [a for a in addrs if not is_checksum_address(a)]
if bad:
print("Non-checksummed addresses:", *bad, sep="\n ")
sys.exit(1)
print("All addresses pass EIP-55 checksum ✅")
PYLength of output: 2035
Let’s retry the checksum validation with the required hashing backend installed:
🏁 Script executed:
#!/bin/bash
# Install both eth_utils and the eth-hash backend
pip install --quiet eth_utils "eth-hash[pycryptodome]"
python - <<'PY'
import re, sys, pathlib
from eth_utils import is_checksum_address
data = pathlib.Path("src/constants/contract-address.ts").read_text()
addrs = re.findall(r'0x[a-fA-F0-9]{40}', data)
bad = [a for a in addrs if not is_checksum_address(a)]
if bad:
print("Non-checksummed addresses:", *bad, sep="\n ")
sys.exit(1)
print("All addresses pass EIP-55 checksum ✅")
PYLength of output: 184
Let’s compute the proper EIP-55 checksummed variants for the two addresses:
🏁 Script executed:
#!/bin/bash
# Ensure eth_utils and keccak backend are available
pip install --quiet eth_utils "eth-hash[pycryptodome]"
python - <<'PY'
from eth_utils import to_checksum_address
addresses = [
"0xca70f36aeeda435c1048fd372bf286a41ac538be",
"0xcc72c1b3f7875fda22bcdb147d462d7da64efc55"
]
for addr in addresses:
print(f"{addr} => {to_checksum_address(addr)}")
PYLength of output: 245
Update Astron addresses to EIP-55 checksum
The script found two non-checksummed addresses in src/constants/contract-address.ts. Please update them as follows:
- Replace
0xca70f36aeeda435c1048fd372bf286a41ac538be
with
0xCa70F36aEEDA435c1048FD372Bf286a41ac538Be - Replace
0xcc72c1b3f7875fda22bcdb147d462d7da64efc55
with
0xCc72c1B3f7875fDA22BcDB147D462D7dA64EFC55
This ensures full EIP-55 checksum compliance.
🤖 Prompt for AI Agents
In src/constants/contract-address.ts around lines 24 to 26, the Astron addresses
are not EIP-55 checksummed. Replace the address
"0xca70f36aeeda435c1048fd372bf286a41ac538be" with
"0xCa70F36aEEDA435c1048FD372Bf286a41ac538Be" and replace
"0xcc72c1b3f7875fda22bcdb147d462d7da64efc55" with
"0xCc72c1B3f7875fDA22BcDB147D462D7dA64EFC55" to ensure full EIP-55 checksum
compliance.
|
🎉 This PR is included in version 5.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
What is the background of this pull request?
Changes
Issues
What are the related issues or stories?
Releases
Channels: latest
ETA: Any target release date
Summary by CodeRabbit