Skip to content

Conversation

yiweichi
Copy link
Member

Problem:
Some of clients want log files of the contracts that were successfully deployed, so they could get to know the contracts deployment process in detail.

Solution:
Foundry do provide a file -- broadcast/DeployScroll.s.sol/$CHAIN_ID_L1/run-latest.json to cache deployment information.
It doable to persist the file to a node, but kubernetes is supposed to be a cluster of machines, so it will be rather complex to get it.
So here we cat broadcast files in docker, this would be easy to implement, and client shall get those information in deploy-contracts pod logs.

@yiweichi yiweichi requested review from Thegaram and dghelm July 23, 2024 10:00
BATCH_SIZE="100"
fi

if [ "${CHAIN_ID_L1}" = "" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not use defaults here. We can error if it is not provided.

In the broadcast/... path maybe you can also match using * since most likely there will only be 2 subfolders.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but it seems hard to determinate which one is L1 broadcast file and which one is L2 broadcast file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, environment variable CHAIN_ID_L1 and CHAIN_ID_L1 are set by helm chart now when launching the container.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do something like this?

echo ""
echo "Broadcast files:"
cat broadcast/DeployScroll.s.sol/*/run-latest.json

Or if it doesn't work we can use CHAIN_ID_L1 and fail if it is not set.

@dghelm
Copy link

dghelm commented Jul 25, 2024

Morty wants to close this for now, as we'll be achieving the logs through a more docker-native way, now that this isn't part of the k8s cluster.

@dghelm dghelm closed this Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants