Skip to content

Commit

Permalink
resetting foundry.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
nvitorovic committed Feb 7, 2025
1 parent 019a2b4 commit 8522884
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
10 changes: 9 additions & 1 deletion dist/cleanup.js
Original file line number Diff line number Diff line change
Expand Up @@ -33497,7 +33497,15 @@ async function cleanup() {
async function clearSensitiveData() {
core.debug("Clearing sensitive data: admin RPC etc");
// reset all foundry.toml files
await exec.exec('git', ['ls-files', '**/foundry.toml', '|', 'xargs', 'git', 'checkout', '--']);
// First get list of all foundry.toml files
const { stdout } = await exec.getExecOutput('git', ['ls-files', '**/foundry.toml']);
// Then checkout each file
const files = stdout.trim().split('\n');
for (const file of files) {
if (file) {
await exec.exec('git', ['checkout', '--', file]);
}
}
}
async function push() {
const pushOnComplete = core.getBooleanInput('push_on_complete');
Expand Down
2 changes: 1 addition & 1 deletion examples/foundry/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ cbor_metadata = true

[etherscan]
## placeholders must be replaced with API key ("string"), chain_id (number), and tenderly_foundry_verification_url ("string")
unknown_chain = { key = "O1Us9aUirXqCfHf81hS8MD7-0McDd4EX", chain = 73578453, url = "https://virtual.mainnet.rpc.tenderly.co/ab7b40e4-0536-4ace-acbc-ea26c090f1e6/verify/etherscan" }
unknown_chain = { key = "${TENDERLY_ACCESS_KEY}", chain = 0, url = "${TENDERLY_FOUNDRY_VERIFICATION_URL}" }
10 changes: 9 additions & 1 deletion src/cleanup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,15 @@ async function cleanup(): Promise<void> {
async function clearSensitiveData() {
core.debug("Clearing sensitive data: admin RPC etc");
// reset all foundry.toml files
await exec.exec('git', ['ls-files', '**/foundry.toml', '|', 'xargs', 'git', 'checkout', '--']);
// First get list of all foundry.toml files
const { stdout } = await exec.getExecOutput('git', ['ls-files', '**/foundry.toml']);
// Then checkout each file
const files = stdout.trim().split('\n');
for (const file of files) {
if (file) {
await exec.exec('git', ['checkout', '--', file]);
}
}
}

async function push(): Promise<void> {
Expand Down

0 comments on commit 8522884

Please sign in to comment.