Skip to content

Commit b00ac79

Browse files
committed
nit
1 parent b0f872e commit b00ac79

File tree

5 files changed

+27
-3
lines changed

5 files changed

+27
-3
lines changed

contracts/fibonnaci.sol

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.0;
3+
4+
contract Fibonacci {
5+
function fib(uint n) public pure returns (uint) {
6+
if (n <= 1) {
7+
return n;
8+
}
9+
return fib(n - 1) + fib(n - 2);
10+
}
11+
}

src/cli/fib-playground.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Run with
2+
// deno task build --filter dao
3+
// deno --env-file --allow-all src/cli/fib-playground.ts | jless
4+
import { env } from '../tools/lib/index.ts'
5+
6+
const result = await env.debugClient.traceTransaction(
7+
'0x35cb9c87fe1ac4e395b9928ca0308a8f6d02f311a08d4cf37e77038d664aacd8',
8+
'callTracer',
9+
{
10+
withLog: true,
11+
}
12+
)
13+
console.log(result)

src/tools/deploy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { deploy } from './lib/index.ts'
1818
// await deploy({ name: 'Storage', args: [] })
1919

2020
await deploy({
21-
name: 'Storage',
21+
name: 'Fibonacci',
2222
args: [],
2323
})
2424

src/tools/lib/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export const chain = defineChain({
196196
}
197197

198198
console.log(
199-
`✅ ${name} deployed: ${address} at block ${receipt.blockNumber}\n`
199+
`✅ ${name} deployed: ${address} at block ${receipt.blockNumber}\n tx hash: ${receipt.transactionHash}`
200200
)
201201
return address
202202
}

src/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,5 +203,5 @@ export async function createEnv({
203203
return await wallet.waitForTransactionReceipt({ hash })
204204
}
205205

206-
return { chain, deploy, wallet, debugClient }
206+
return { chain, deploy, getByteCode, wallet, debugClient }
207207
}

0 commit comments

Comments
 (0)