Skip to content
Open
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
3 changes: 2 additions & 1 deletion script/configs/mainnet/xeigenda-eth.anvil.config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"avsAddress": "0x870679e138bcdf293b7ff14dd44b70fc97e12fc0",
"baseAsset": "0xbeac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac0",
"contracts": {
"stakerNodeCoordinator": {
"init": {
Expand All @@ -9,7 +10,7 @@
"liquidToken": {
"init": {
"name": "EigenDA ETH Liquid Avs Token",
"symbol": "xEigenDA"
"symbol": "xEigenDA-ETH"
}
}
},
Expand Down
1 change: 1 addition & 0 deletions script/configs/mainnet/xeigenda.anvil.config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"avsAddress": "0x870679e138bcdf293b7ff14dd44b70fc97e12fc0",
"baseAsset": "0xec53bf9167f50cdeb3ae105f56099aaab9061f83",
"contracts": {
"stakerNodeCoordinator": {
"init": {
Expand Down
1 change: 1 addition & 0 deletions script/configs/mainnet/xlagrange-eth.anvil.config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"avsAddress": "0x22cac0e6a1465f043428e8aef737b3cb09d0eeda",
"baseAsset": "0xbeac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac0",
"contracts": {
"stakerNodeCoordinator": {
"init": {
Expand Down
3 changes: 2 additions & 1 deletion script/configs/mainnet/xlagrange.anvil.config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"avsAddress": "0x22cac0e6a1465f043428e8aef737b3cb09d0eeda",
"baseAsset": "0x0fc2a55d5bd13033f1ee0cdd11f60f7efe66f467",
"contracts": {
"stakerNodeCoordinator": {
"init": {
Expand All @@ -9,7 +10,7 @@
"liquidToken": {
"init": {
"name": "Lagrange Native Liquid Avs Token",
"symbol": "xLagrange-ETH"
"symbol": "xLagrange"
}
}
},
Expand Down
1 change: 1 addition & 0 deletions script/deploy/holesky/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ contract Deploy is Script, Test {
ILiquidToken.Init({
name: LIQUID_TOKEN_NAME,
symbol: LIQUID_TOKEN_SYMBOL,
baseAsset: address(0), // Placeholder for test environment
initialOwner: admin,
pauser: pauser,
liquidTokenManager: ILiquidTokenManager(address(liquidTokenManager)),
Expand Down
1 change: 1 addition & 0 deletions script/deploy/local/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ contract Deploy is Script, Test {
ILiquidToken.Init({
name: LIQUID_TOKEN_NAME,
symbol: LIQUID_TOKEN_SYMBOL,
baseAsset: address(0), // Placeholder for test environment
initialOwner: admin,
pauser: pauser,
liquidTokenManager: ILiquidTokenManager(address(liquidTokenManager)),
Expand Down
4 changes: 4 additions & 0 deletions script/deploy/mainnet/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ contract Deploy is Script, Test {

// Deployment-level config
address public AVS_ADDRESS;
address public BASE_ASSET;
uint256 public STAKER_NODE_COORDINATOR_MAX_NODES;
string public LIQUID_TOKEN_NAME;
string public LIQUID_TOKEN_SYMBOL;
Expand Down Expand Up @@ -190,6 +191,7 @@ contract Deploy is Script, Test {
pauser = stdJson.readAddress(deployConfigData, ".roles.pauser");
priceUpdater = stdJson.readAddress(deployConfigData, ".roles.priceUpdater");
AVS_ADDRESS = stdJson.readAddress(deployConfigData, ".avsAddress");
BASE_ASSET = stdJson.readAddress(deployConfigData, ".baseAsset");
STAKER_NODE_COORDINATOR_MAX_NODES = stdJson.readUint(
deployConfigData,
".contracts.stakerNodeCoordinator.init.maxNodes"
Expand Down Expand Up @@ -357,6 +359,7 @@ contract Deploy is Script, Test {
ILiquidToken.Init({
name: LIQUID_TOKEN_NAME,
symbol: LIQUID_TOKEN_SYMBOL,
baseAsset: BASE_ASSET,
initialOwner: admin,
pauser: pauser,
liquidTokenManager: ILiquidTokenManager(address(liquidTokenManager)),
Expand Down Expand Up @@ -604,6 +607,7 @@ contract Deploy is Script, Test {
vm.serializeString(parent_object, "name", LIQUID_TOKEN_NAME);
vm.serializeString(parent_object, "symbol", LIQUID_TOKEN_SYMBOL);
vm.serializeAddress(parent_object, "avsAddress", AVS_ADDRESS);
vm.serializeAddress(parent_object, "baseAsset", BASE_ASSET);
vm.serializeUint(parent_object, "chainId", block.chainid);
vm.serializeUint(parent_object, "maxNodes", STAKER_NODE_COORDINATOR_MAX_NODES);
vm.serializeUint(parent_object, "deploymentBlock", block.number);
Expand Down
65 changes: 65 additions & 0 deletions script/outputs/mainnet/deployment_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"avsAddress": "0x22CAc0e6A1465F043428e8AeF737b3cb09D0eEDa",
"baseAsset": "0x0fc2a55d5BD13033f1ee0cdd11f60F7eFe66f467",
"chainId": 1,
"contractDeployments": {
"implementation": {
"liquidTokenManager": {
"address": "0x2c1DE3b4Dbb4aDebEbB5dcECAe825bE2a9fc6eb6",
"block": 22744561,
"timestamp": 1750408907000
},
"stakerNode": {
"address": "0x00EFd0D4639191C49908A7BddbB9A11A994A8527",
"block": 22744561,
"timestamp": 1750408907000
},
"stakerNodeCoordinator": {
"address": "0x83769BeEB7e5405ef0B7dc3C66C43E3a51A6d27f",
"block": 22744561,
"timestamp": 1750408907000
},
"tokenRegistryOracle": {
"address": "0x535B3D7A252fa034Ed71F0C53ec0C6F784cB64E1",
"block": 22744561,
"timestamp": 1750408907000
}
},
"proxy": {
"liquidTokenManager": {
"address": "0x062C88B4ba954955746eDA6f475C26eeaC04614B",
"block": 22744561,
"timestamp": 1750408907000
},
"stakerNodeCoordinator": {
"address": "0x90A5b0DD8c4b06636A4BEf7BA82D9C58f44fAaAd",
"block": 22744561,
"timestamp": 1750408907000
},
"tokenRegistryOracle": {
"address": "0x147B09A8C7d5E4A8253a3e01De4356D3c132010D",
"block": 22744561,
"timestamp": 1750408907000
}
}
},
"deploymentBlock": 22744561,
"deploymentTimestamp": 1750408907000,
"implementationAddress": "0xc051134F56d56160E8c8ed9bB3c439c78AB27cCc",
"maxNodes": 10,
"name": "Lagrange Native Liquid Avs Token",
"proxyAddress": "0x94EDc320466d68c0e80C3e6F454375Fb957e1038",
"roles": {
"admin": "0xba375CAe9cEd62E5C2762F84ed324aef52486651",
"deployer": "0x522B3294E6d06aA25Ad0f1B8891242E335D3B459",
"pauser": "0x60DB8De9a6705c9B36dcE25D631C5EAc0Ac24F4c",
"priceUpdater": "0xba375CAe9cEd62E5C2762F84ed324aef52486651"
},
"symbol": "xLagrange",
"tokens": {
"0": {
"address": "0x0fc2a55d5BD13033f1ee0cdd11f60F7eFe66f467",
"strategy": "0xdCD1206683aDC3D6cc3619C4045cBD7Ec179B403"
}
}
}
5 changes: 5 additions & 0 deletions src/core/LiquidToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ contract LiquidToken is
/// @notice Role identifier for pausing the contract
bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");

/// @notice The primary asset this LAT represents (e.g., ETH, EIGEN, LA)
/// @dev Use address(0) for ETH, actual token address for ERC20 tokens
address public baseAsset;

/// @notice LAT contracts
ILiquidTokenManager public liquidTokenManager;
ITokenRegistryOracle public tokenRegistryOracle;
Expand Down Expand Up @@ -80,6 +84,7 @@ contract LiquidToken is

liquidTokenManager = init.liquidTokenManager;
tokenRegistryOracle = init.tokenRegistryOracle;
baseAsset = init.baseAsset;
}

// ------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/core/LiquidTokenManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ contract LiquidTokenManager is
}

// Price source validation and configuration
bool isNative = (primaryType == 0 && primarySource == address(0));
bool isNative = (address(token) == liquidToken.baseAsset());
if (!isNative && (primaryType < 1 || primaryType > 3)) revert InvalidPriceSource();
if (!isNative && primarySource == address(0)) revert InvalidPriceSource();
if (!isNative) {
Expand Down
5 changes: 5 additions & 0 deletions src/interfaces/ILiquidToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ interface ILiquidToken {
struct Init {
string name;
string symbol;
address baseAsset; // The primary asset this LAT represents (ETH, EIGEN, LA, etc.)
ILiquidTokenManager liquidTokenManager;
ITokenRegistryOracle tokenRegistryOracle;
address initialOwner;
Expand Down Expand Up @@ -208,6 +209,10 @@ interface ILiquidToken {
/// @return An array of queued asset balances
function balanceQueuedAssets(IERC20[] calldata assetList) external view returns (uint256[] memory);

/// @notice Returns the base asset address that this LAT represents
/// @return The address of the base asset (use special address for ETH)
function baseAsset() external view returns (address);

/// @notice Pauses the contract
function pause() external;

Expand Down
Loading