-
Notifications
You must be signed in to change notification settings - Fork 75
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
Use token bridge creator to deploy token bridges #17
Conversation
gvladika
commented
Oct 31, 2023
•
edited
Loading
edited
- deploy L1-L2 token bridge using token bridge creator instead of using SDK
- add flag to deploy L2-L3 token bridge, also using token bridge creator contract
Add support for native L2-L3 bridging of the fee token
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.
Generally seems good. two comments. Didn't try it yet.
test-node.bash
Outdated
docker-compose run -e ARB_KEY=$devprivkey -e ETH_KEY=$devprivkey tokenbridge gen:network | ||
docker-compose run --entrypoint sh tokenbridge -c "cat localNetwork.json" | ||
echo == Deploying L1-L2 token bridge | ||
sleep 120 |
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.
That's a LOT of sleep.
If really needed - add a comment to the print above so users will know to let it run, and add a comment explaining why so long.
Also - if possible, would be better to reduce it (e.g. waiting for something earlier to finish? can we wait/poll directly for the condition we're waiting for?)
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 point, actually delay is not needed at all anymore. Removed here - 683f887
scripts/ethcommands.ts
Outdated
}, | ||
token: { | ||
string: true, | ||
describe: "chain's custom fee token", |
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.
seems like we should be able to have a valid default for this .. weird that it's not in l3deployment.json?
I'd consider adding it there.. and if not, would even create a new testnode-only config file that will be created by the bash shell to have a default 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.
right, token address is already in l3deployment.json. I removed token as input param, and now reading it from json - 8bb39c2
… is used 'docker-compose' CLI seems to be out of date in Github runners, so doesn't recognize '--wait' flag. Ref: https://stackoverflow.com/questions/65949957/how-can-i-wait-for-the-container-to-be-healthy-in-github-action#comment136082101_76422970
…er-compose-patch fix: update docker-compose to docker compose
TODO: switch this to v1.2.0 when it's released
from: { | ||
string: true, | ||
describe: "account (see general help)", | ||
default: "funnel", |
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.
in my tests funnel doesn't have l3tokens initially, so it shouldn't be the default
set the default to bridge-native-token-to-l3.
docker-compose run scripts send-l2 --ethamount 100 --to user_token_bridge_deployer --wait | ||
docker-compose run scripts send-l2 --ethamount 100 --to user_fee_token_deployer --wait | ||
docker compose run scripts send-l2 --ethamount 100 --to user_token_bridge_deployer --wait | ||
docker compose run scripts send-l2 --ethamount 100 --to user_fee_token_deployer --wait |
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 add to scripts/accounts.ts, under "Valid account names" - a description of:
- user_token_bridge_deployer
- user_fee_token_deployer
- l3owner
- l3sequencer
Update L2 chain config