Skip to content

Commit

Permalink
add binding files in same crate (#136)
Browse files Browse the repository at this point in the history
getting invalid path error when publishing to crates io for json files ,
so moved them in the same crate

Co-authored-by: supernovahs <[email protected]>
  • Loading branch information
supernovahs and supernovahs authored Sep 30, 2024
1 parent 7b24e78 commit 19e5c05
Show file tree
Hide file tree
Showing 20 changed files with 219 additions and 16 deletions.
1 change: 1 addition & 0 deletions crates/utils/json/AVSDirectory.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/utils/json/BLSApkRegistry.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/utils/json/ContractsRegistry.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/utils/json/DelegationManager.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/utils/json/ECDSAStakeRegistry.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/utils/json/EigenPod.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/utils/json/EigenPodManager.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/utils/json/IAVSDirectory.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/utils/json/IBLSSignatureChecker.json

Large diffs are not rendered by default.

185 changes: 185 additions & 0 deletions crates/utils/json/IERC20.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
]
1 change: 1 addition & 0 deletions crates/utils/json/IRegistryCoordinator.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/utils/json/ISlasher.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/utils/json/IStrategy.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/utils/json/MockAvsServiceManager.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/utils/json/OperatorStateRetriever.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/utils/json/RegistryCoordinator.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/utils/json/ServiceManagerBase.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/utils/json/StakeRegistry.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/utils/json/StrategyManager.json

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions crates/utils/src/binding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sol!(
#[allow(missing_docs)]
#[sol(rpc)]
StakeRegistry,
"../../crates/contracts/bindings/utils/json/StakeRegistry.json"
"json/StakeRegistry.json"
);

// https://github.com/Layr-Labs/eigenlayer-middleware/blob/m2-mainnet/src/RegistryCoordinator.sol
Expand All @@ -15,7 +15,7 @@ sol!(
#[sol(rpc)]
#[derive(Debug)]
RegistryCoordinator,
"../../crates/contracts/bindings/utils/json/RegistryCoordinator.json"
"json/RegistryCoordinator.json"
);

// https://github.com/Layr-Labs/eigenlayer-middleware/blob/m2-mainnet/src/OperatorStateRetriever.sol
Expand All @@ -24,7 +24,7 @@ sol!(
#[sol(rpc)]
#[derive(Debug)]
OperatorStateRetriever,
"../../crates/contracts/bindings/utils/json/OperatorStateRetriever.json"
"json/OperatorStateRetriever.json"
);

// https://github.com/Layr-Labs/eigenlayer-middleware/blob/m2-mainnet/src/BLSApkRegistry.sol
Expand All @@ -33,86 +33,86 @@ sol!(
#[derive(Debug)]
#[sol(rpc)]
BLSApkRegistry,
"../../crates/contracts/bindings/utils/json/BLSApkRegistry.json"
"json/BLSApkRegistry.json"
);

// https://github.com/Layr-Labs/eigenlayer-middleware/blob/m2-mainnet/src/ServiceManagerBase.sol
sol!(
#[allow(missing_docs)]
#[sol(rpc)]
ServiceManagerBase,
"../../crates/contracts/bindings/utils/json/ServiceManagerBase.json"
"json/ServiceManagerBase.json"
);

// https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/core/AVSDirectory.sol
sol!(
#[allow(missing_docs)]
#[sol(rpc)]
AVSDirectory,
"../../crates/contracts/bindings/utils/json/AVSDirectory.json"
"json/AVSDirectory.json"
);

// https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/core/DelegationManager.sol
sol!(
#[allow(missing_docs)]
#[sol(rpc)]
DelegationManager,
"../../crates/contracts/bindings/utils/json/DelegationManager.json"
"json/DelegationManager.json"
);

// https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/interfaces/ISlasher.sol
sol!(
#[allow(missing_docs)]
#[sol(rpc)]
ISlasher,
"../../crates/contracts/bindings/utils/json/ISlasher.json"
"json/ISlasher.json"
);

// https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/interfaces/IStrategy.sol
sol!(
#[allow(missing_docs)]
#[sol(rpc)]
IStrategy,
"../../crates/contracts/bindings/utils/json/IStrategy.json"
"json/IStrategy.json"
);

// standard
sol!(
#[allow(missing_docs)]
#[sol(rpc)]
IERC20,
"../../crates/contracts/bindings/utils/json/IERC20.json"
"json/IERC20.json"
);

// https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/core/StrategyManager.sol
sol!(
#[allow(missing_docs)]
#[sol(rpc)]
StrategyManager,
"../../crates/contracts/bindings/utils/json/StrategyManager.json"
"json/StrategyManager.json"
);

// https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/interfaces/IAVSDirectory.sol
sol!(
#[allow(missing_docs)]
#[sol(rpc)]
IAVSDirectory,
"../../crates/contracts/bindings/utils/json/IAVSDirectory.json"
"json/IAVSDirectory.json"
);

// https://github.com/Layr-Labs/eigenlayer-middleware/blob/mainnet/src/unaudited/ECDSAStakeRegistry.sol
sol!(
#[allow(missing_docs)]
#[sol(rpc)]
ECDSAStakeRegistry,
"../../crates/contracts/bindings/utils/json/ECDSAStakeRegistry.json"
"json/ECDSAStakeRegistry.json"
);

sol!(
#[allow(missing_docs)]
#[sol(rpc)]
IBLSSignatureChecker,
"../../crates/contracts/bindings/utils/json/IBLSSignatureChecker.json"
"json/IBLSSignatureChecker.json"
);

// Anvil utilities
Expand All @@ -121,12 +121,12 @@ sol!(
#[allow(missing_docs)]
#[sol(rpc)]
ContractsRegistry,
"../../crates/contracts/bindings/utils/json/ContractsRegistry.json"
"json/ContractsRegistry.json"
);

sol!(
#[allow(missing_docs)]
#[sol(rpc)]
mockAvsServiceManager,
"../../crates/contracts/bindings/utils/json/MockAvsServiceManager.json"
"json/MockAvsServiceManager.json"
);

0 comments on commit 19e5c05

Please sign in to comment.