-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50d0f08
commit 7d1fd72
Showing
5 changed files
with
44 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,84 @@ | ||
package eigenpod | ||
|
||
import ( | ||
"github.com/Layr-Labs/eigensdk-go/chainio/clients/eigenpod/bindings" | ||
"github.com/Layr-Labs/eigensdk-go/chainio/clients/eth" | ||
|
||
ieigenpod "github.com/Layr-Labs/eigensdk-go/contracts/bindings/IEigenPod" | ||
ieigenpodmanager "github.com/Layr-Labs/eigensdk-go/contracts/bindings/IEigenPodManager" | ||
"github.com/ethereum/go-ethereum/common" | ||
) | ||
|
||
type ContractBindings struct { | ||
Address common.Address | ||
*bindings.IEigenPod | ||
*ieigenpod.ContractIEigenPod | ||
} | ||
|
||
type ContractCallerBindings struct { | ||
Address common.Address | ||
*bindings.IEigenPodCaller | ||
*ieigenpod.ContractIEigenPodCaller | ||
} | ||
|
||
type ManagerContractBindings struct { | ||
Address common.Address | ||
*bindings.IEigenPodManager | ||
*ieigenpodmanager.ContractIEigenPodManager | ||
} | ||
|
||
type ManagerContractCallerBindings struct { | ||
Address common.Address | ||
*bindings.IEigenPodManagerCaller | ||
*ieigenpodmanager.ContractIEigenPodManagerCaller | ||
} | ||
|
||
func NewContractBindings( | ||
address common.Address, | ||
ethClient eth.HttpBackend, | ||
) (*ContractBindings, error) { | ||
pod, err := bindings.NewIEigenPod(address, ethClient) | ||
pod, err := ieigenpod.NewContractIEigenPod(address, ethClient) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return &ContractBindings{ | ||
Address: address, | ||
IEigenPod: pod, | ||
Address: address, | ||
ContractIEigenPod: pod, | ||
}, nil | ||
} | ||
|
||
func NewContractCallerBindings( | ||
address common.Address, | ||
ethClient eth.HttpBackend, | ||
) (*ContractCallerBindings, error) { | ||
pod, err := bindings.NewIEigenPodCaller(address, ethClient) | ||
pod, err := ieigenpod.NewContractIEigenPodCaller(address, ethClient) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return &ContractCallerBindings{ | ||
Address: address, | ||
IEigenPodCaller: pod, | ||
Address: address, | ||
ContractIEigenPodCaller: pod, | ||
}, nil | ||
} | ||
|
||
func NewManagerContractBindings( | ||
address common.Address, | ||
ethClient eth.HttpBackend, | ||
) (*ManagerContractBindings, error) { | ||
manager, err := bindings.NewIEigenPodManager(address, ethClient) | ||
manager, err := ieigenpodmanager.NewContractIEigenPodManager(address, ethClient) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return &ManagerContractBindings{ | ||
Address: address, | ||
IEigenPodManager: manager, | ||
Address: address, | ||
ContractIEigenPodManager: manager, | ||
}, nil | ||
} | ||
|
||
func NewManagerContractCallerBindings( | ||
address common.Address, | ||
ethClient eth.HttpBackend, | ||
) (*ManagerContractCallerBindings, error) { | ||
manager, err := bindings.NewIEigenPodManagerCaller(address, ethClient) | ||
manager, err := ieigenpodmanager.NewContractIEigenPodManagerCaller(address, ethClient) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return &ManagerContractCallerBindings{ | ||
Address: address, | ||
IEigenPodManagerCaller: manager, | ||
Address: address, | ||
ContractIEigenPodManagerCaller: manager, | ||
}, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters