Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
ddf5b16
Merge pull request #1 from Olorunshogo/submission/assignment-01/Oloru…
Olorunshogo Jan 24, 2026
3b9852f
Merge pull request #2 from Olorunshogo/submission/assignment-02/Oloru…
Olorunshogo Jan 24, 2026
e384335
chore: update Contributing.md
sprtd Jan 29, 2026
8f5fb83
chore: merge pull request #22 from BlockheaderWeb3-Community/fix-stru…
sprtd Jan 29, 2026
8de052f
feat(assignment-6): Assignment 6 submission
Jan 29, 2026
dd0a35a
Merge branch 'as-w2-d3' into submission/assignment-6/Olorunshogo
Olorunshogo Jan 29, 2026
a796cd8
chore: merge PR #26 from Olorunshogo/submission/assignment-6/Olorunshogo
sprtd Jan 29, 2026
04a9473
chore: merge PR #29 from BlockheaderWeb3-Community/as-w2-d3
sprtd Jan 29, 2026
59bbec9
chore: add all assignments
henrypeters Jan 30, 2026
6777c21
Remove remaining target directories
henrypeters Jan 30, 2026
5c794e4
feat: add block-explorer folder
henrypeters Jan 30, 2026
c1bf04a
feat: implement bip32 in address-derivation
henrypeters Jan 31, 2026
3a581d1
chore: merge PR #38 from henrypeters/submission/assignments/henrypeters
sprtd Feb 3, 2026
293dd49
chore: merge PR #46 from BlockheaderWeb3-Community/as-w2-d3
sprtd Feb 3, 2026
c13ad8b
Feat: Implement the todo contract
Mac-5 Feb 16, 2026
5ab0b38
feat: Initialize the Milestone escrow contract
Mac-5 Feb 18, 2026
c5dbade
feat: Initialize the TimeLock contract
Mac-5 Feb 18, 2026
302755d
feat: Initialize the Escrow contract
Mac-5 Feb 18, 2026
51ef79c
Remove fallback function from Escrow contract
Mac-5 Feb 24, 2026
c8be813
chore: merge PR #140 from Mac-5/submission/assignment-02/Mac-5
sprtd Feb 24, 2026
9197110
chore: Update .gitignore to exclude artifacts and non-code files
Mac-5 Feb 24, 2026
7ec99cd
chor: merge pull request #166 from BlockheaderWeb3-Community/as-w3-d3
sprtd Feb 25, 2026
f34db7b
Add MarketPlace NFT marketplace implementation
Mac-5 Feb 25, 2026
a529767
Change payment transfer to use call method
Mac-5 Feb 25, 2026
b5e8f2e
Fix call syntax for transferring sellerAmount
Mac-5 Feb 25, 2026
8a99712
chore: add test in package.json
sprtd Feb 25, 2026
6892733
chore: merge PR #168 from Mac-5/features/tokens
sprtd Feb 25, 2026
e532bef
chore: merge PR #174 from BlockheaderWeb3-Community/tokens
sprtd Feb 25, 2026
1da58f1
chore: set up for testing
sprtd Feb 25, 2026
7d751f3
chore: merge PR #178 from BlockheaderWeb3-Community/intro-to-testing
sprtd Feb 25, 2026
0a3ce5c
test: validate Timelock deployment
sprtd Feb 25, 2026
06c1a7b
test: revert 0 ETH deposit
sprtd Feb 25, 2026
0beb97a
test: validate reverts
sprtd Feb 25, 2026
5047801
test: revert past unlock time
sprtd Feb 25, 2026
ebcee19
test: validate multiple deposits
sprtd Feb 25, 2026
72c3a67
chore: merge PR #183 from BlockheaderWeb3-Community/intro-to-test-vault
sprtd Feb 25, 2026
5c02189
Todo assignment
Kingsman-99 Mar 2, 2026
0e03eb7
Escrow-v1
Kingsman-99 Mar 2, 2026
c1d6758
Merge branch 'BlockheaderWeb3-Community:main' into submission/assignm…
Kingsman-99 Mar 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,23 @@
.vscode/

package-lock.json
node_modules
node_modules

# Rust build artifacts
/target
**/target
artifacts/
cache/
typechain-types/

# Logs
*.log

# OS files
.DS_Store
Thumbs.db

# IDE
.idea/
*.swp
*.swo
53 changes: 0 additions & 53 deletions assignments/1-block-observation/README.md

This file was deleted.

7 changes: 7 additions & 0 deletions assignments/1/1-gas/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions assignments/1/1-gas/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "gas"
version = "0.1.0"
edition = "2024"

[dependencies]
42 changes: 42 additions & 0 deletions assignments/1/1-gas/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Simple Gas Fee Calculation in Rust

This project demonstrates a **basic gas fee calculation model** using Rust.
It is intended to explain the **core idea behind gas fees** in blockchains like Ethereum — paying for computational work.

This is a **conceptual example**, not an exact implementation of Ethereum’s gas system.

---

## What This Program Does

The program:
- Defines a unit of computational work
- Defines a price per unit of work
- Multiplies the two values to compute a gas fee

---

## Conceptual Model

```text
Gas Fee = Computational Work × Price Per Unit




### Gas
Gas is a unit of measurement. It measures how much computation a transaction uses

### Gas Limit
Gas limit is the maximum amount of gas you are willing to use for a transaction.

### Gas price
Gas price is how much ETH you pay per unit of gas. It's measured in gwei

### Burnt/Base Fee
Since EIP-1559, Ethereum splits the transaction fee into parts.
The Base Fee (Burnt Fee)
A base fee is calculated automatically by the network
It changes depending on network congestion
This base fee is burned (destroyed forever)
**Burned ETH is removed from circulation → makes ETH deflationary**
14 changes: 14 additions & 0 deletions assignments/1/1-gas/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
fn main() {
let work = 1690;
let price_per_work = 20;

let gas_fee = get_gas_fee(work, price_per_work);

println!("");
println!("Your gas fee is: {}", gas_fee);
println!("")
}

fn get_gas_fee(computation: u32, price_per_compute: u32) -> u32 {
computation * price_per_compute
}
1 change: 1 addition & 0 deletions assignments/1/1-gas/src/target/.rustc_info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc_fingerprint":16396630117534816852,"outputs":{"11857020428658561806":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/henry-peters/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.90.0 (1159e78c4 2025-09-14)\nbinary: rustc\ncommit-hash: 1159e78c4747b02ef996e55082b704c09b970588\ncommit-date: 2025-09-14\nhost: x86_64-unknown-linux-gnu\nrelease: 1.90.0\nLLVM version: 20.1.8\n","stderr":""},"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/henry-peters/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}}
3 changes: 3 additions & 0 deletions assignments/1/1-gas/src/target/CACHEDIR.TAG
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Signature: 8a477f597d28d172789f06886806bc55
# This file is a cache directory tag created by cargo.
# For information about cache directory tags see https://bford.info/cachedir/
Empty file.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
76a749b3a410fb57
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":16285725380928457773,"features":"[]","declared_features":"[]","target":4387091230824909009,"profile":3316208278650011218,"path":4942398508502643691,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/gas-6222b030560bcd99/dep-test-bin-gas","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6310154bb1e45d9c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":16285725380928457773,"features":"[]","declared_features":"[]","target":4387091230824909009,"profile":8731458305071235362,"path":4942398508502643691,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/gas-ca8b278be33612ac/dep-bin-gas","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
68added5a53b3acf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":16285725380928457773,"features":"[]","declared_features":"[]","target":4387091230824909009,"profile":17672942494452627365,"path":4942398508502643691,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/gas-dceba1afc6acf89a/dep-bin-gas","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/home/henry-peters/Desktop/gas_price/gas/target/debug/deps/gas-6222b030560bcd99.d: src/main.rs

/home/henry-peters/Desktop/gas_price/gas/target/debug/deps/libgas-6222b030560bcd99.rmeta: src/main.rs

src/main.rs:
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/home/henry-peters/Desktop/gas_price/gas/target/debug/deps/gas-ca8b278be33612ac.d: src/main.rs

/home/henry-peters/Desktop/gas_price/gas/target/debug/deps/gas-ca8b278be33612ac: src/main.rs

src/main.rs:
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/home/henry-peters/Desktop/gas_price/gas/target/debug/deps/gas-dceba1afc6acf89a.d: src/main.rs

/home/henry-peters/Desktop/gas_price/gas/target/debug/deps/libgas-dceba1afc6acf89a.rmeta: src/main.rs

src/main.rs:
Empty file.
Empty file.
Binary file added assignments/1/1-gas/src/target/debug/gas
Binary file not shown.
1 change: 1 addition & 0 deletions assignments/1/1-gas/src/target/debug/gas.d
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/home/henry-peters/Desktop/gas_price/gas/target/debug/gas: /home/henry-peters/Desktop/gas_price/gas/src/main.rs
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions assignments/1/1-gas/src/target/flycheck0/stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Blocking waiting for file lock on package cache
Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.09s
3 changes: 3 additions & 0 deletions assignments/1/1-gas/src/target/flycheck0/stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{"reason":"compiler-artifact","package_id":"path+file:///home/henry-peters/Desktop/gas_price/gas#0.1.0","manifest_path":"/home/henry-peters/Desktop/gas_price/gas/Cargo.toml","target":{"kind":["bin"],"crate_types":["bin"],"name":"gas","src_path":"/home/henry-peters/Desktop/gas_price/gas/src/main.rs","edition":"2024","doc":true,"doctest":false,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":true},"features":[],"filenames":["/home/henry-peters/Desktop/gas_price/gas/target/debug/deps/libgas-6222b030560bcd99.rmeta"],"executable":null,"fresh":true}
{"reason":"compiler-artifact","package_id":"path+file:///home/henry-peters/Desktop/gas_price/gas#0.1.0","manifest_path":"/home/henry-peters/Desktop/gas_price/gas/Cargo.toml","target":{"kind":["bin"],"crate_types":["bin"],"name":"gas","src_path":"/home/henry-peters/Desktop/gas_price/gas/src/main.rs","edition":"2024","doc":true,"doctest":false,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/home/henry-peters/Desktop/gas_price/gas/target/debug/deps/libgas-dceba1afc6acf89a.rmeta"],"executable":null,"fresh":true}
{"reason":"build-finished","success":true}
Loading