-
Notifications
You must be signed in to change notification settings - Fork 111
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
Propagate delegateOwnerWallet public + pkey to creator-nodes #646
Conversation
Propagating address, cont. Overriding now working Writing file now works Enabling all writes
libs/initScripts/local.js
Outdated
@@ -171,6 +193,47 @@ const _registerCnode4 = async (audiusLibs, ethAccounts) => { | |||
await registerLocalService(audiusLibs2, spCreatorNodeType, creatorNodeEndpoint4, amountOfAuds) | |||
} | |||
|
|||
// Account 1 - Cnode 1 Delegate Wallet Update | |||
const _updateCnode1DelegateOwnerWallet = async (ethAccounts) => { |
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.
this could be refactored as a function that takes in the ethAccounts index so you don't need to duplicate this fn 4 times
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.
i would still have to pass ethAccounts here though which was my reason for not doing the above already
@@ -12,7 +12,7 @@ | |||
"scripts": { | |||
"truffle-test": "./scripts/truffle-test.sh", | |||
"truffle-test-v": "./scripts/truffle-test.sh --verbose-rpc", | |||
"ganache": "docker run --name audius_ganache_cli -d -p 8545:8545 trufflesuite/ganache-cli:latest -h 0.0.0.0 -l 8000000", | |||
"ganache": "docker run --name audius_ganache_cli -d -p 8545:8545 trufflesuite/ganache-cli:latest -h 0.0.0.0 -l 8000000 --acctKeys contracts-ganache-accounts.json", |
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.
is this json file generated when this command is run?
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.
this is interesting, it is generated when the ganache command is run BUT that happens inside the container, which is why the utils functions below call docker exec cat and get the secret values from there
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.
ahhhh yes that makes sense
break | ||
|
||
case 'update-cnode-3-delegatewallet': | ||
// Account 4 - Cnode 3 Delegate Wallet Update |
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.
just curious... where's account #3 🤔
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.
its occupied by disc prov 2
@@ -192,3 +230,36 @@ const _initAllVersions = async (audiusLibs) => { | |||
await setServiceVersion(audiusLibs, serviceType, serviceVersions[serviceType]) | |||
} | |||
} | |||
|
|||
const _updateDelegateOwnerWalletInDockerEnv = async (readPath, writePath, delegateOwnerWallet, delegateWalletPkey) => { |
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.
looks like regardless of whether delegateOwnerWallet
and delegatePrivateKey
are found, you still add the respective values to the file? do we need the for loop check?
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.
discussed offline - need to update current line with delegateOwnerWallet
and delegatePrivateKey
with new value, and if dne, append to end of file.
Update local *.env files with correct values for creator node, required for development and progress in UserReplicaSetManager contract