-
Notifications
You must be signed in to change notification settings - Fork 40
✨ exa: add crosschain mint and burn support #797
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: main
Are you sure you want to change the base?
Changes from all commits
85563f1
8cd9ca1
ff3a809
4d6de82
d4b3c03
c2662cb
59b3c59
08cd069
95a3cb7
e02a973
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 |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@exactly/protocol": patch | ||
| --- | ||
|
|
||
| ✨ exa: add crosschain mint and burn support |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@exactly/protocol": patch | ||
| --- | ||
|
|
||
| 🔒 exa: restrict initialize to proxy admin or construction |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |
| /lcov.info | ||
| /types/ | ||
|
|
||
| .claude/settings.local.json | ||
| .openzeppelin/unknown-* | ||
| .vscode/ | ||
| cache/ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,9 @@ | ||
| import { MerkleTree } from "merkletreejs"; | ||
| import type { DeployFunction } from "hardhat-deploy/types"; | ||
| import type { EXA, EscrowedEXA } from "../types"; | ||
| import type { EXA, EscrowedEXA, ProxyAdmin } from "../types"; | ||
| import transferOwnership from "./.utils/transferOwnership"; | ||
| import executeOrPropose from "./.utils/executeOrPropose"; | ||
| import timelockPropose from "./.utils/timelockPropose"; | ||
| import validateUpgrade from "./.utils/validateUpgrade"; | ||
| import grantRole from "./.utils/grantRole"; | ||
| import airdrop from "../scripts/airdrop.json"; | ||
|
|
@@ -33,14 +34,27 @@ const func: DeployFunction = async ({ | |
| owner: timelock, | ||
| viaAdminContract: { name: "ProxyAdmin" }, | ||
| proxyContract: "TransparentUpgradeableProxy", | ||
| execute: { init: { methodName: "initialize", args: [] } }, | ||
| execute: { | ||
| init: { methodName: "initialize", args: [] }, | ||
| onUpgrade: { methodName: "initialize2", args: [timelock] }, | ||
itofarina marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }, | ||
| }, | ||
| from: deployer, | ||
| log: true, | ||
| }), | ||
| ); | ||
|
|
||
| const exa = await getContract<EXA>("EXA", await getSigner(deployer)); | ||
|
|
||
| if (!(await exa.hasRole(await exa.DEFAULT_ADMIN_ROLE(), timelock))) { | ||
|
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.
This Useful? React with 👍 / 👎. |
||
| const proxyAdmin = await getContract<ProxyAdmin>("ProxyAdmin", await getSigner(deployer)); | ||
| await timelockPropose(proxyAdmin, "upgradeAndCall", [ | ||
| exa.target, | ||
| (await get("EXA_Implementation")).address, | ||
| exa.interface.encodeFunctionData("initialize2", [timelock]), | ||
| ]); | ||
| } | ||
|
Comment on lines
+49
to
+56
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. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Search for any BRIDGE_ROLE grants in deployment or scripts
rg -n 'BRIDGE_ROLE|grantRole.*bridge' --type ts --type js -C2Repository: exactly/protocol Length of output: 42 🏁 Script executed: # First, find the EXA contract file
find . -type f -name "*EXA*" | grep -E "\.(sol|ts|js)$" | head -20Repository: exactly/protocol Length of output: 257 🏁 Script executed: # Search for mint and burn function definitions
rg -n "function mint|function burn" --type ts --type js --type sol -A3Repository: exactly/protocol Length of output: 87 🏁 Script executed: # Search for role definitions (including different naming patterns)
rg -n "ROLE|keccak256.*role|bytes32.*=" --type ts --type js --type sol | grep -i "admin\|bridge\|role" | head -30Repository: exactly/protocol Length of output: 87 🏁 Script executed: # Read the EXA.sol file to understand role structure
cat ./contracts/periphery/EXA.sol | head -100Repository: exactly/protocol Length of output: 2845 🏁 Script executed: # Search for BRIDGE_ROLE, mint, burn in EXA.sol
grep -n "BRIDGE_ROLE\|function mint\|function burn\|bytes32.*ROLE\|initialize2" ./contracts/periphery/EXA.solRepository: exactly/protocol Length of output: 494 🏁 Script executed: # Check the deploy/EXA.ts file structure
cat ./deploy/EXA.tsRepository: exactly/protocol Length of output: 4163 Add The |
||
|
|
||
| const deployerBalance = await exa.balanceOf(deployer); | ||
| if (deployerBalance !== 0n) await (await exa.transfer(treasury ?? multisig, deployerBalance)).wait(); | ||
|
|
||
|
|
||
itofarina marked this conversation as resolved.
Show resolved
Hide resolved
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
🧹 Nitpick | 🔵 Trivial
🧩 Analysis chain
🌐 Web query:
What is the latest version of Foundry toolchain?💡 Result:
The latest Foundry toolchain release is Foundry v1.6.0 (released January 22, 2026). [1]
A pre-release is also listed: v1.6.0-rc1. [1]
Source(s)
[1] (getfoundry.sh)
Citations:
LGTM - Version upgrades look appropriate, though a newer version exists.
Node.js 22 is the current LTS version. The Foundry toolchain upgrade to v1.5.1 is a solid improvement. However, Foundry v1.6.0 (released January 2026) is now the latest stable version and could be considered for future updates if you want to stay on the cutting edge.