Skip to content
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

Deploy temp v1.9 ERC20Factory #164

Merged
merged 1 commit into from
May 1, 2024
Merged

Deploy temp v1.9 ERC20Factory #164

merged 1 commit into from
May 1, 2024

Conversation

wilsoncusack
Copy link
Contributor

Deployed on Base and Base Sepolia at address 0xf10122d428b4bc8a9d050d06a2037259b4c4b83b.

We will need to wait for #158 in order to get this functionality at 0x4200000000000000000000000000000000000012, but as our docs are already pointing to a abnormal address (due to a past address collision issue from create), we can update our docs immediately with this new address.

@wilsoncusack
Copy link
Contributor Author

Note that Sepolia canonical address already has a version that supports decimals, but wanted to deploy anyway to allow devs 1:1 testing.

@@ -0,0 +1 @@
{}
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to use the deploy template for this task or the generic template will suffice? seems like the deploy template is introducing some of these unnecessary files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What are the cases to use one vs. the other? I just followed the README

Copy link
Contributor

Choose a reason for hiding this comment

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

hm yeah could probably be more clear/named better in the README, but deploy template is typically used to deploy an entirely new network (eg all OP contracts), generic template can be used for one-off tasks like a deployment of a single contract or an upgrade etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh I see, what's the make command for that? I can remove empty folders/files


contract RunERC20FactoryDeploy is Script {
function run() public {
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
Copy link
Contributor

Choose a reason for hiding this comment

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

could we use a K2 key?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why?

Copy link
Contributor

Choose a reason for hiding this comment

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

we've generally avoided any production level interaction with local keys (see assessment here)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What's the paved road for this? This doesn't seem to be documented here?

Copy link
Contributor

@nadir-akhtar-coinbase nadir-akhtar-coinbase left a comment

Choose a reason for hiding this comment

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

@wilsoncusack Small remarks, but otherwise looks good. Also, would be nice as Anika mentioned to remove excess files for clarity and ease of review

function run() public {
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);
new ERC20Factory{salt: '0xBA5ED'}();
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't impact functionality in this case but better practice, especially if someone copies this code pattern down the line w/o knowing why there is no stopBroadcast()

Suggested change
new ERC20Factory{salt: '0xBA5ED'}();
new ERC20Factory{salt: '0xBA5ED'}();
vm.stopBroadcast();

function run() public {
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);
new ERC20Factory{salt: '0xBA5ED'}();
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as with the other deploy script

Suggested change
new ERC20Factory{salt: '0xBA5ED'}();
new ERC20Factory{salt: '0xBA5ED'}();
vm.stopBroadacast();

Copy link
Contributor

@nadir-akhtar-coinbase nadir-akhtar-coinbase left a comment

Choose a reason for hiding this comment

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

Accepting nits staying unresolved in favor of making progress on publicizing the decimal-supporting factory

@wilsoncusack wilsoncusack merged commit 6ea7687 into main May 1, 2024
4 checks passed
@wilsoncusack wilsoncusack deleted the wilson/new-factory branch May 1, 2024 19:10
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