-
Notifications
You must be signed in to change notification settings - Fork 45
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
refactor avs registry #283
refactor avs registry #283
Conversation
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.
nit comments
DelegationManagerAddr gethcommon.Address | ||
AvsDirectoryAddr gethcommon.Address |
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.
why add el contracts here?
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.
coz avsregistry/writer.go needs elReader contract.
var serviceManagerAddr gethcommon.Address | ||
var registryCoordinatorAddr gethcommon.Address | ||
var stakeRegistryAddr gethcommon.Address | ||
var blsApkRegistryAddr gethcommon.Address | ||
var indexRegistryAddr gethcommon.Address | ||
var operatorStateRetrieverAddr gethcommon.Address | ||
var delegationManagerAddr gethcommon.Address | ||
var avsDirectoryAddr gethcommon.Address |
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.
var serviceManagerAddr gethcommon.Address | |
var registryCoordinatorAddr gethcommon.Address | |
var stakeRegistryAddr gethcommon.Address | |
var blsApkRegistryAddr gethcommon.Address | |
var indexRegistryAddr gethcommon.Address | |
var operatorStateRetrieverAddr gethcommon.Address | |
var delegationManagerAddr gethcommon.Address | |
var avsDirectoryAddr gethcommon.Address | |
var ( | |
serviceManagerAddr gethcommon.Address | |
registryCoordinatorAddr gethcommon.Address | |
stakeRegistryAddr gethcommon.Address | |
blsApkRegistryAddr gethcommon.Address | |
indexRegistryAddr gethcommon.Address | |
operatorStateRetrieverAddr gethcommon.Address | |
delegationManagerAddr gethcommon.Address | |
avsDirectoryAddr gethcommon.Address | |
) |
client, | ||
) | ||
if err != nil { | ||
return nil, utils.WrapError("Failed to fetch ServiceManager contract", err) |
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.
return nil, utils.WrapError("Failed to fetch ServiceManager contract", err) | |
return nil, utils.WrapError("Failed to create ServiceManager contract", err) |
client, | ||
) | ||
if err != nil { | ||
return nil, utils.WrapError("Failed to fetch StakeRegistry contract", err) |
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.
return nil, utils.WrapError("Failed to fetch StakeRegistry contract", err) | |
return nil, utils.WrapError("Failed to create StakeRegistry contract", err) |
client, | ||
) | ||
if err != nil { | ||
return nil, utils.WrapError("Failed to fetch BLSPubkeyRegistry contract", err) |
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.
return nil, utils.WrapError("Failed to fetch BLSPubkeyRegistry contract", err) | |
return nil, utils.WrapError("Failed to create BLSPubkeyRegistry contract", err) |
) *AvsRegistryChainReader { | ||
return &AvsRegistryChainReader{ | ||
) *ChainReader { | ||
logger = logger.With("module", "avsregistry/ChainReader") |
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.
let's create a logger.sublogger("avsregistry/ChainReader")
function which automatically adds the "module" tag? Otherwise we might end up with people using different keys in different subloggers
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.
good call.
350bc45
to
06e6a0b
Compare
Fixes # .
What Changed?
Reviewer Checklist