Skip to content

Commit

Permalink
fix(contracts): deploy with broadcast flag (#13)
Browse files Browse the repository at this point in the history
* fix(contracts): deploy with broadcast flag

* fix: lint
  • Loading branch information
rymnc authored Jul 3, 2024
1 parent bf223ed commit f423e1b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ lcov.info
yarn.lock

# broadcasts
!broadcast
broadcast/*
broadcast/*/31337/
contracts/!broadcast
contracts/broadcast/*
contracts/broadcast/*/31337/

.certora_internal
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ANVIL_PORT=8545
start:
docker compose up -d
until cast chain-id --rpc-url "http://localhost:${ANVIL_PORT}" 2> /dev/null; do sleep 1; done
cd contracts && forge script --rpc-url "http://localhost:${ANVIL_PORT}" script/Deploy.s.sol:Deploy --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
cd contracts && forge script --broadcast --rpc-url "http://localhost:${ANVIL_PORT}" script/Deploy.s.sol:Deploy --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80

stop:
docker compose down
11 changes: 6 additions & 5 deletions contracts/.gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ScKeystoreTest:test__addUser__addsUser__whenUserInfoIsValid() (gas: 56777)
ScKeystoreTest:test__addUser__reverts__whenUserAlreadyExists() (gas: 61532)
ScKeystoreTest:test__addUser__reverts__whenUserInfoIsMalformed() (gas: 9384)
ScKeystoreTest:test__getUser__returnsUserInfo__whenUserExists() (gas: 60956)
ScKeystoreTest:test__userExists__returnsFalse__whenUserDoesNotExist() (gas: 7976)
ScKeystoreTest:test__addUser__addsUser__whenUserInfoIsValid() (gas: 106200)
ScKeystoreTest:test__addUser__reverts__whenUserAlreadyExists() (gas: 110242)
ScKeystoreTest:test__addUser__reverts__whenUserInfoIsMalformed() (gas: 8989)
ScKeystoreTest:test__getAllKeyPackagesForUser__returnsKeyPackages__whenUserExists() (gas: 111031)
ScKeystoreTest:test__getUser__returnsUserInfo__whenUserExists() (gas: 108923)
ScKeystoreTest:test__userExists__returnsFalse__whenUserDoesNotExist() (gas: 7863)
2 changes: 1 addition & 1 deletion contracts/script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BaseScript } from "./Base.s.sol";
import { DeploymentConfig } from "./DeploymentConfig.s.sol";

contract Deploy is BaseScript {
function run() public returns (ScKeystore scKeystore, DeploymentConfig deploymentConfig) {
function run() public broadcast returns (ScKeystore scKeystore, DeploymentConfig deploymentConfig) {
deploymentConfig = new DeploymentConfig(broadcaster);
scKeystore = new ScKeystore();
}
Expand Down

0 comments on commit f423e1b

Please sign in to comment.