diff --git a/.gitignore b/.gitignore index 962c2511..ab1b93b7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,8 @@ .vscode/ package-lock.json -node_modules \ No newline at end of file +node_modules + +# Rust build artifacts +/target +**/target diff --git a/assignments/1-block-observation/README.md b/assignments/1-block-observation/README.md deleted file mode 100644 index a832de62..00000000 --- a/assignments/1-block-observation/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# The Ethereum Blockchain Explorer (Etherscan) & Transaction Hash - -## The Ethereum Blockchain Explorer (Etherscan) - -### Overview Page Observations -On the Etherscan overview homepage, I observed the following key metrics in the network: -1. **Live Ether Price**: In real-time, this displays the current price of ETH. -2. **Market Capitalization**: Represents the total value of all ETH in circulation. -3. **Transactions**: This displays the total number of transactions processed on the Ethereum network, increasing continuously as new transactions are confirmed. -4. **Last Finalized Block**: This shows us the most recent block that has achieved finality. - - -#### A table that display the lastest blocks -After clicking on the latest block at the time, there are several details I observed about the block and they are: - -1. **Block Height**: This indicates the length of the blockchain, increases after the addition of the new block. -2. **Status**: As at the time I checked it, it was finalized. This shows the status of the finality of the block. -3. **Proposed On** and **Timestamps**: Basically, this gives us information about when the transaction started. -4. Withdrawals -5. **Fee Recipient**: This gives us basic information about the receiver of the transaction. -6. **Block Reward**: This is the total reward earned from the miner. -7. Gas information -8. Block Size -9. **Extra Data**: More information about the recipient - - -#### A table that display the lastest transactions - -After clicking on the latest transaction at the time, there are several transaction details and they are: - -##### Transaction Overview -1. **Transaction Hash**: A unique 64-bit character id for ay given transaction. -2. **Status**: This shows us the progress of the transaction. -3. Block -4. Timestamp**: Giving us information about when the transaction took place. - -##### Transaction Cost Details -This gives us information about the cost of transaction like its fee and gas price. - -Etherscan serves as a powerful blockchain explorer for transparently analyzing Ethereum's blocks, transactions, and validator behavior. - -## Transaction Hash - -### Overview Page Observations - -Similar to the overview page of the etherscan of several transactions and blocks, this page gives us a keen view of the information that pertains to a particular transaction. - -We have the transaction hash of this transaction, the status, spacific block and the amount of block confirmations, timestamp from the time it was proposed (I think), the sender and receiver's wallet address, value of eth sent, transaction fee and gas price. - -There's also a button that when clicked, will show us a dropdown of more information about the transaction - -## Conclusion -In conclusion, I think the Etherscan is a powerful blockchain explorer for analyzing Etherum blocks, transactions, and validator behaviour, transparently. \ No newline at end of file diff --git a/assignments/1/1-gas/Cargo.lock b/assignments/1/1-gas/Cargo.lock new file mode 100644 index 00000000..dad77321 --- /dev/null +++ b/assignments/1/1-gas/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "gas" +version = "0.1.0" diff --git a/assignments/1/1-gas/Cargo.toml b/assignments/1/1-gas/Cargo.toml new file mode 100644 index 00000000..889df012 --- /dev/null +++ b/assignments/1/1-gas/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "gas" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/assignments/1/1-gas/README.md b/assignments/1/1-gas/README.md new file mode 100644 index 00000000..85d6be90 --- /dev/null +++ b/assignments/1/1-gas/README.md @@ -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** diff --git a/assignments/1/1-gas/src/main.rs b/assignments/1/1-gas/src/main.rs new file mode 100644 index 00000000..06ee2d67 --- /dev/null +++ b/assignments/1/1-gas/src/main.rs @@ -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 +} \ No newline at end of file diff --git a/assignments/1/1-gas/src/target/.rustc_info.json b/assignments/1/1-gas/src/target/.rustc_info.json new file mode 100644 index 00000000..043c9013 --- /dev/null +++ b/assignments/1/1-gas/src/target/.rustc_info.json @@ -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":{}} \ No newline at end of file diff --git a/assignments/1/1-gas/src/target/CACHEDIR.TAG b/assignments/1/1-gas/src/target/CACHEDIR.TAG new file mode 100644 index 00000000..20d7c319 --- /dev/null +++ b/assignments/1/1-gas/src/target/CACHEDIR.TAG @@ -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/ diff --git a/assignments/1/1-gas/src/target/debug/.cargo-lock b/assignments/1/1-gas/src/target/debug/.cargo-lock new file mode 100644 index 00000000..e69de29b diff --git a/assignments/1/1-gas/src/target/debug/.fingerprint/gas-6222b030560bcd99/dep-test-bin-gas b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-6222b030560bcd99/dep-test-bin-gas new file mode 100644 index 00000000..5c54f74a Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-6222b030560bcd99/dep-test-bin-gas differ diff --git a/assignments/1/1-gas/src/target/debug/.fingerprint/gas-6222b030560bcd99/invoked.timestamp b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-6222b030560bcd99/invoked.timestamp new file mode 100644 index 00000000..e00328da --- /dev/null +++ b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-6222b030560bcd99/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/assignments/1/1-gas/src/target/debug/.fingerprint/gas-6222b030560bcd99/test-bin-gas b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-6222b030560bcd99/test-bin-gas new file mode 100644 index 00000000..2c2b0a21 --- /dev/null +++ b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-6222b030560bcd99/test-bin-gas @@ -0,0 +1 @@ +76a749b3a410fb57 \ No newline at end of file diff --git a/assignments/1/1-gas/src/target/debug/.fingerprint/gas-6222b030560bcd99/test-bin-gas.json b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-6222b030560bcd99/test-bin-gas.json new file mode 100644 index 00000000..591b885f --- /dev/null +++ b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-6222b030560bcd99/test-bin-gas.json @@ -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} \ No newline at end of file diff --git a/assignments/1/1-gas/src/target/debug/.fingerprint/gas-ca8b278be33612ac/bin-gas b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-ca8b278be33612ac/bin-gas new file mode 100644 index 00000000..a954b4be --- /dev/null +++ b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-ca8b278be33612ac/bin-gas @@ -0,0 +1 @@ +6310154bb1e45d9c \ No newline at end of file diff --git a/assignments/1/1-gas/src/target/debug/.fingerprint/gas-ca8b278be33612ac/bin-gas.json b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-ca8b278be33612ac/bin-gas.json new file mode 100644 index 00000000..c4932d8a --- /dev/null +++ b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-ca8b278be33612ac/bin-gas.json @@ -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} \ No newline at end of file diff --git a/assignments/1/1-gas/src/target/debug/.fingerprint/gas-ca8b278be33612ac/dep-bin-gas b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-ca8b278be33612ac/dep-bin-gas new file mode 100644 index 00000000..5c54f74a Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-ca8b278be33612ac/dep-bin-gas differ diff --git a/assignments/1/1-gas/src/target/debug/.fingerprint/gas-ca8b278be33612ac/invoked.timestamp b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-ca8b278be33612ac/invoked.timestamp new file mode 100644 index 00000000..e00328da --- /dev/null +++ b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-ca8b278be33612ac/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/assignments/1/1-gas/src/target/debug/.fingerprint/gas-dceba1afc6acf89a/bin-gas b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-dceba1afc6acf89a/bin-gas new file mode 100644 index 00000000..8f70570a --- /dev/null +++ b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-dceba1afc6acf89a/bin-gas @@ -0,0 +1 @@ +68added5a53b3acf \ No newline at end of file diff --git a/assignments/1/1-gas/src/target/debug/.fingerprint/gas-dceba1afc6acf89a/bin-gas.json b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-dceba1afc6acf89a/bin-gas.json new file mode 100644 index 00000000..c89306dc --- /dev/null +++ b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-dceba1afc6acf89a/bin-gas.json @@ -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} \ No newline at end of file diff --git a/assignments/1/1-gas/src/target/debug/.fingerprint/gas-dceba1afc6acf89a/dep-bin-gas b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-dceba1afc6acf89a/dep-bin-gas new file mode 100644 index 00000000..5c54f74a Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-dceba1afc6acf89a/dep-bin-gas differ diff --git a/assignments/1/1-gas/src/target/debug/.fingerprint/gas-dceba1afc6acf89a/invoked.timestamp b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-dceba1afc6acf89a/invoked.timestamp new file mode 100644 index 00000000..e00328da --- /dev/null +++ b/assignments/1/1-gas/src/target/debug/.fingerprint/gas-dceba1afc6acf89a/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/assignments/1/1-gas/src/target/debug/deps/gas-6222b030560bcd99.d b/assignments/1/1-gas/src/target/debug/deps/gas-6222b030560bcd99.d new file mode 100644 index 00000000..99fa32f7 --- /dev/null +++ b/assignments/1/1-gas/src/target/debug/deps/gas-6222b030560bcd99.d @@ -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: diff --git a/assignments/1/1-gas/src/target/debug/deps/gas-ca8b278be33612ac b/assignments/1/1-gas/src/target/debug/deps/gas-ca8b278be33612ac new file mode 100755 index 00000000..82fc55ce Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/deps/gas-ca8b278be33612ac differ diff --git a/assignments/1/1-gas/src/target/debug/deps/gas-ca8b278be33612ac.d b/assignments/1/1-gas/src/target/debug/deps/gas-ca8b278be33612ac.d new file mode 100644 index 00000000..45bb4edd --- /dev/null +++ b/assignments/1/1-gas/src/target/debug/deps/gas-ca8b278be33612ac.d @@ -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: diff --git a/assignments/1/1-gas/src/target/debug/deps/gas-dceba1afc6acf89a.d b/assignments/1/1-gas/src/target/debug/deps/gas-dceba1afc6acf89a.d new file mode 100644 index 00000000..e1bb1bfd --- /dev/null +++ b/assignments/1/1-gas/src/target/debug/deps/gas-dceba1afc6acf89a.d @@ -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: diff --git a/assignments/1/1-gas/src/target/debug/deps/libgas-6222b030560bcd99.rmeta b/assignments/1/1-gas/src/target/debug/deps/libgas-6222b030560bcd99.rmeta new file mode 100644 index 00000000..e69de29b diff --git a/assignments/1/1-gas/src/target/debug/deps/libgas-dceba1afc6acf89a.rmeta b/assignments/1/1-gas/src/target/debug/deps/libgas-dceba1afc6acf89a.rmeta new file mode 100644 index 00000000..e69de29b diff --git a/assignments/1/1-gas/src/target/debug/gas b/assignments/1/1-gas/src/target/debug/gas new file mode 100755 index 00000000..82fc55ce Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/gas differ diff --git a/assignments/1/1-gas/src/target/debug/gas.d b/assignments/1/1-gas/src/target/debug/gas.d new file mode 100644 index 00000000..add210d0 --- /dev/null +++ b/assignments/1/1-gas/src/target/debug/gas.d @@ -0,0 +1 @@ +/home/henry-peters/Desktop/gas_price/gas/target/debug/gas: /home/henry-peters/Desktop/gas_price/gas/src/main.rs diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314clw0x-0akh1lh-working/dep-graph.bin b/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314clw0x-0akh1lh-working/dep-graph.bin new file mode 100644 index 00000000..cfadab1b Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314clw0x-0akh1lh-working/dep-graph.bin differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314clw0x-0akh1lh-working/dep-graph.part.bin b/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314clw0x-0akh1lh-working/dep-graph.part.bin new file mode 100644 index 00000000..e69de29b diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314clw0x-0akh1lh-working/query-cache.bin b/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314clw0x-0akh1lh-working/query-cache.bin new file mode 100644 index 00000000..003fb2ed Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314clw0x-0akh1lh-working/query-cache.bin differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314clw0x-0akh1lh-working/work-products.bin b/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314clw0x-0akh1lh-working/work-products.bin new file mode 100644 index 00000000..2fe524a9 Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314clw0x-0akh1lh-working/work-products.bin differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314clw0x-0akh1lh.lock b/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314clw0x-0akh1lh.lock new file mode 100644 index 00000000..e69de29b diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314e7tcd-1l6ep4j-9735nf9w107ndj5ib8ewxleet/dep-graph.bin b/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314e7tcd-1l6ep4j-9735nf9w107ndj5ib8ewxleet/dep-graph.bin new file mode 100644 index 00000000..5c5611e4 Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314e7tcd-1l6ep4j-9735nf9w107ndj5ib8ewxleet/dep-graph.bin differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314e7tcd-1l6ep4j-9735nf9w107ndj5ib8ewxleet/query-cache.bin b/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314e7tcd-1l6ep4j-9735nf9w107ndj5ib8ewxleet/query-cache.bin new file mode 100644 index 00000000..f95f7e92 Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314e7tcd-1l6ep4j-9735nf9w107ndj5ib8ewxleet/query-cache.bin differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314e7tcd-1l6ep4j-9735nf9w107ndj5ib8ewxleet/work-products.bin b/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314e7tcd-1l6ep4j-9735nf9w107ndj5ib8ewxleet/work-products.bin new file mode 100644 index 00000000..2fe524a9 Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314e7tcd-1l6ep4j-9735nf9w107ndj5ib8ewxleet/work-products.bin differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314e7tcd-1l6ep4j.lock b/assignments/1/1-gas/src/target/debug/incremental/gas-02u78cbuqqpc8/s-hf314e7tcd-1l6ep4j.lock new file mode 100644 index 00000000..e69de29b diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314clu0c-0ikir0d-working/dep-graph.bin b/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314clu0c-0ikir0d-working/dep-graph.bin new file mode 100644 index 00000000..5a676a12 Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314clu0c-0ikir0d-working/dep-graph.bin differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314clu0c-0ikir0d-working/dep-graph.part.bin b/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314clu0c-0ikir0d-working/dep-graph.part.bin new file mode 100644 index 00000000..e69de29b diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314clu0c-0ikir0d-working/query-cache.bin b/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314clu0c-0ikir0d-working/query-cache.bin new file mode 100644 index 00000000..386b3e5a Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314clu0c-0ikir0d-working/query-cache.bin differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314clu0c-0ikir0d-working/work-products.bin b/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314clu0c-0ikir0d-working/work-products.bin new file mode 100644 index 00000000..2fe524a9 Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314clu0c-0ikir0d-working/work-products.bin differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314clu0c-0ikir0d.lock b/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314clu0c-0ikir0d.lock new file mode 100644 index 00000000..e69de29b diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314e7sqa-144n2xe-0ztbpvnkak0jpa5y2v80fsaz1/dep-graph.bin b/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314e7sqa-144n2xe-0ztbpvnkak0jpa5y2v80fsaz1/dep-graph.bin new file mode 100644 index 00000000..c19fee0f Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314e7sqa-144n2xe-0ztbpvnkak0jpa5y2v80fsaz1/dep-graph.bin differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314e7sqa-144n2xe-0ztbpvnkak0jpa5y2v80fsaz1/query-cache.bin b/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314e7sqa-144n2xe-0ztbpvnkak0jpa5y2v80fsaz1/query-cache.bin new file mode 100644 index 00000000..9d0e8d09 Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314e7sqa-144n2xe-0ztbpvnkak0jpa5y2v80fsaz1/query-cache.bin differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314e7sqa-144n2xe-0ztbpvnkak0jpa5y2v80fsaz1/work-products.bin b/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314e7sqa-144n2xe-0ztbpvnkak0jpa5y2v80fsaz1/work-products.bin new file mode 100644 index 00000000..2fe524a9 Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314e7sqa-144n2xe-0ztbpvnkak0jpa5y2v80fsaz1/work-products.bin differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314e7sqa-144n2xe.lock b/assignments/1/1-gas/src/target/debug/incremental/gas-1ohv8o6cdgi9o/s-hf314e7sqa-144n2xe.lock new file mode 100644 index 00000000..e69de29b diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/36ofshx0ba74bo22ktlw3fcdi.o b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/36ofshx0ba74bo22ktlw3fcdi.o new file mode 100644 index 00000000..8b2b7402 Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/36ofshx0ba74bo22ktlw3fcdi.o differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/9dp3owgpyp2w5qk2jvyj83kmb.o b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/9dp3owgpyp2w5qk2jvyj83kmb.o new file mode 100644 index 00000000..1826d2e8 Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/9dp3owgpyp2w5qk2jvyj83kmb.o differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/apirxuhr9usla25zsdu9u2ml1.o b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/apirxuhr9usla25zsdu9u2ml1.o new file mode 100644 index 00000000..1c2c5308 Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/apirxuhr9usla25zsdu9u2ml1.o differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/az5ot2acv7syolwmlgexujbs1.o b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/az5ot2acv7syolwmlgexujbs1.o new file mode 100644 index 00000000..8b5ba78a Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/az5ot2acv7syolwmlgexujbs1.o differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/bvrl8mxh5q96e6c7c51c75269.o b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/bvrl8mxh5q96e6c7c51c75269.o new file mode 100644 index 00000000..0637bb40 Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/bvrl8mxh5q96e6c7c51c75269.o differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/cq8rmyc8t3g2dfsa1qogw18zg.o b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/cq8rmyc8t3g2dfsa1qogw18zg.o new file mode 100644 index 00000000..073f7c0d Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/cq8rmyc8t3g2dfsa1qogw18zg.o differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/dep-graph.bin b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/dep-graph.bin new file mode 100644 index 00000000..36314c66 Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/dep-graph.bin differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/dv9ivotfx88xkj7fajb3i5izc.o b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/dv9ivotfx88xkj7fajb3i5izc.o new file mode 100644 index 00000000..eeec74aa Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/dv9ivotfx88xkj7fajb3i5izc.o differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/query-cache.bin b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/query-cache.bin new file mode 100644 index 00000000..a303b638 Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/query-cache.bin differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/work-products.bin b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/work-products.bin new file mode 100644 index 00000000..d6751010 Binary files /dev/null and b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6-elyl0me14zyir5ybfg5orwa4a/work-products.bin differ diff --git a/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6.lock b/assignments/1/1-gas/src/target/debug/incremental/gas-1vtrho1r06nq7/s-hf314esxyk-1c2qot6.lock new file mode 100644 index 00000000..e69de29b diff --git a/assignments/1/1-gas/src/target/flycheck0/stderr b/assignments/1/1-gas/src/target/flycheck0/stderr new file mode 100644 index 00000000..4b198f26 --- /dev/null +++ b/assignments/1/1-gas/src/target/flycheck0/stderr @@ -0,0 +1,2 @@ + Blocking waiting for file lock on package cache + Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.09s diff --git a/assignments/1/1-gas/src/target/flycheck0/stdout b/assignments/1/1-gas/src/target/flycheck0/stdout new file mode 100644 index 00000000..2c37572c --- /dev/null +++ b/assignments/1/1-gas/src/target/flycheck0/stdout @@ -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} diff --git a/assignments/1/1-merkle-root/Cargo.lock b/assignments/1/1-merkle-root/Cargo.lock new file mode 100644 index 00000000..2fc95abd --- /dev/null +++ b/assignments/1/1-merkle-root/Cargo.lock @@ -0,0 +1,4018 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "ascii-canvas" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] + +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "async_io_stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +dependencies = [ + "futures", + "pharos", + "rustc_version", +] + +[[package]] +name = "auto_impl" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdcb70bdbc4d478427380519163274ac86e52916e10f0a8889adf0f96d3fee7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "sha2", + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" + +[[package]] +name = "byte-slice-cast" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" +dependencies = [ + "serde", +] + +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.13+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" +dependencies = [ + "cc", + "pkg-config", +] + +[[package]] +name = "camino" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629a66d692cb9ff1a1c664e41771b3dcaf961985a9774c0eb0bd1b51cf60a48" +dependencies = [ + "serde_core", +] + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "cc" +version = "1.2.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "755d2fce177175ffca841e9a06afdb2c4ab0f593d53b4dee48147dfaade85932" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "chrono" +version = "0.4.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" +dependencies = [ + "num-traits", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "coins-bip32" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +dependencies = [ + "bs58", + "coins-core", + "digest", + "hmac", + "k256", + "serde", + "sha2", + "thiserror 1.0.69", +] + +[[package]] +name = "coins-bip39" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" +dependencies = [ + "bitvec", + "coins-bip32", + "hmac", + "once_cell", + "pbkdf2 0.12.2", + "rand 0.8.5", + "sha2", + "thiserror 1.0.69", +] + +[[package]] +name = "coins-core" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" +dependencies = [ + "base64 0.21.7", + "bech32", + "bs58", + "digest", + "generic-array", + "hex", + "ripemd", + "serde", + "serde_derive", + "sha2", + "sha3", + "thiserror 1.0.69", +] + +[[package]] +name = "colored" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "const-hex" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bb320cac8a0750d7f25280aa97b09c26edfe161164238ecbbb31092b079e735" +dependencies = [ + "cfg-if", + "cpufeatures", + "proptest", + "serde_core", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "const_format" +version = "0.2.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7faa7469a93a566e9ccc1c73fe783b4a65c274c5ace346038dca9c39fe0030ad" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "data-encoding" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "ena" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" +dependencies = [ + "log", +] + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enr" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" +dependencies = [ + "base64 0.21.7", + "bytes", + "hex", + "k256", + "log", + "rand 0.8.5", + "rlp", + "serde", + "sha3", + "zeroize", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "eth-keystore" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" +dependencies = [ + "aes", + "ctr", + "digest", + "hex", + "hmac", + "pbkdf2 0.11.0", + "rand 0.8.5", + "scrypt", + "serde", + "serde_json", + "sha2", + "sha3", + "thiserror 1.0.69", + "uuid", +] + +[[package]] +name = "ethabi" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" +dependencies = [ + "ethereum-types", + "hex", + "once_cell", + "regex", + "serde", + "serde_json", + "sha3", + "thiserror 1.0.69", + "uint", +] + +[[package]] +name = "ethbloom" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +dependencies = [ + "crunchy", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "tiny-keccak", +] + +[[package]] +name = "ethereum-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +dependencies = [ + "ethbloom", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "primitive-types", + "scale-info", + "uint", +] + +[[package]] +name = "ethers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" +dependencies = [ + "ethers-addressbook", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-middleware", + "ethers-providers", + "ethers-signers", + "ethers-solc", +] + +[[package]] +name = "ethers-addressbook" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" +dependencies = [ + "ethers-core", + "once_cell", + "serde", + "serde_json", +] + +[[package]] +name = "ethers-contract" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" +dependencies = [ + "const-hex", + "ethers-contract-abigen", + "ethers-contract-derive", + "ethers-core", + "ethers-providers", + "futures-util", + "once_cell", + "pin-project", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "ethers-contract-abigen" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" +dependencies = [ + "Inflector", + "const-hex", + "dunce", + "ethers-core", + "ethers-etherscan", + "eyre", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "reqwest", + "serde", + "serde_json", + "syn 2.0.114", + "toml", + "walkdir", +] + +[[package]] +name = "ethers-contract-derive" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" +dependencies = [ + "Inflector", + "const-hex", + "ethers-contract-abigen", + "ethers-core", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.114", +] + +[[package]] +name = "ethers-core" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" +dependencies = [ + "arrayvec", + "bytes", + "cargo_metadata", + "chrono", + "const-hex", + "elliptic-curve", + "ethabi", + "generic-array", + "k256", + "num_enum", + "once_cell", + "open-fastrlp", + "rand 0.8.5", + "rlp", + "serde", + "serde_json", + "strum", + "syn 2.0.114", + "tempfile", + "thiserror 1.0.69", + "tiny-keccak", + "unicode-xid", +] + +[[package]] +name = "ethers-etherscan" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" +dependencies = [ + "chrono", + "ethers-core", + "reqwest", + "semver", + "serde", + "serde_json", + "thiserror 1.0.69", + "tracing", +] + +[[package]] +name = "ethers-middleware" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" +dependencies = [ + "async-trait", + "auto_impl", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-providers", + "ethers-signers", + "futures-channel", + "futures-locks", + "futures-util", + "instant", + "reqwest", + "serde", + "serde_json", + "thiserror 1.0.69", + "tokio", + "tracing", + "tracing-futures", + "url", +] + +[[package]] +name = "ethers-providers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" +dependencies = [ + "async-trait", + "auto_impl", + "base64 0.21.7", + "bytes", + "const-hex", + "enr", + "ethers-core", + "futures-core", + "futures-timer", + "futures-util", + "hashers", + "http", + "instant", + "jsonwebtoken", + "once_cell", + "pin-project", + "reqwest", + "serde", + "serde_json", + "thiserror 1.0.69", + "tokio", + "tokio-tungstenite", + "tracing", + "tracing-futures", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "ws_stream_wasm", +] + +[[package]] +name = "ethers-signers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" +dependencies = [ + "async-trait", + "coins-bip32", + "coins-bip39", + "const-hex", + "elliptic-curve", + "eth-keystore", + "ethers-core", + "rand 0.8.5", + "sha2", + "thiserror 1.0.69", + "tracing", +] + +[[package]] +name = "ethers-solc" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66244a771d9163282646dbeffe0e6eca4dda4146b6498644e678ac6089b11edd" +dependencies = [ + "cfg-if", + "const-hex", + "dirs", + "dunce", + "ethers-core", + "glob", + "home", + "md-5", + "num_cpus", + "once_cell", + "path-slash", + "rayon", + "regex", + "semver", + "serde", + "serde_json", + "solang-parser", + "svm-rs", + "thiserror 1.0.69", + "tiny-keccak", + "tokio", + "tracing", + "walkdir", + "yansi", +] + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "flate2" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b375d6465b98090a5f25b1c7703f3859783755aa9a80433b36e0379a3ec2f369" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-locks" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" +dependencies = [ + "futures-channel", + "futures-task", +] + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +dependencies = [ + "gloo-timers", + "send_wrapper 0.4.0", +] + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] + +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "h2" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "hashers" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" +dependencies = [ + "fxhash", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.10", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http", + "hyper", + "rustls", + "tokio", + "tokio-rustls", +] + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-rlp" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +dependencies = [ + "rlp", +] + +[[package]] +name = "impl-serde" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "indenter" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" + +[[package]] +name = "indexmap" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "jsonwebtoken" +version = "8.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +dependencies = [ + "base64 0.21.7", + "pem", + "ring 0.16.20", + "serde", + "serde_json", + "simple_asn1", +] + +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", + "signature", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lalrpop" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" +dependencies = [ + "ascii-canvas", + "bit-set", + "ena", + "itertools", + "lalrpop-util", + "petgraph", + "regex", + "regex-syntax", + "string_cache", + "term", + "tiny-keccak", + "unicode-xid", + "walkdir", +] + +[[package]] +name = "lalrpop-util" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.180" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" + +[[package]] +name = "libredox" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" +dependencies = [ + "bitflags 2.10.0", + "libc", +] + +[[package]] +name = "linux-raw-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "merkle_root" +version = "0.1.0" +dependencies = [ + "colored", + "ethers", + "sha2", + "sha3", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "open-fastrlp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", + "ethereum-types", + "open-fastrlp-derive", +] + +[[package]] +name = "open-fastrlp-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" +dependencies = [ + "bytes", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "parity-scale-codec" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799781ae679d79a948e13d4824a40970bfa500058d245760dd857301059810fa" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "const_format", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "rustversion", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "path-slash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest", + "hmac", + "password-hash", + "sha2", +] + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest", + "hmac", +] + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "petgraph" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset", + "indexmap", +] + +[[package]] +name = "pharos" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +dependencies = [ + "futures", + "rustc_version", +] + +[[package]] +name = "phf" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_macros", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +dependencies = [ + "phf_shared", + "rand 0.8.5", +] + +[[package]] +name = "phf_macros" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.114", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +dependencies = [ + "toml_edit 0.23.10+spec-1.0.0", +] + +[[package]] +name = "proc-macro2" +version = "1.0.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee689443a2bd0a16ab0348b52ee43e3b2d1b1f931c8aa5c9f8de4c86fbe8c40" +dependencies = [ + "bitflags 2.10.0", + "num-traits", + "rand 0.9.2", + "rand_chacha 0.9.0", + "rand_xorshift", + "regex-syntax", + "unarray", +] + +[[package]] +name = "quote" +version = "1.0.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "rand_xorshift" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" +dependencies = [ + "rand_core 0.9.5", +] + +[[package]] +name = "rayon" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.10.0", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.17", + "libredox", + "thiserror 1.0.69", +] + +[[package]] +name = "regex" +version = "1.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-rustls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", + "winreg", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted 0.7.1", + "web-sys", + "winapi", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted 0.9.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rlp-derive", + "rustc-hex", +] + +[[package]] +name = "rlp-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" +dependencies = [ + "bitflags 2.10.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring 0.17.14", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.14", + "untrusted 0.9.0", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scale-info" +version = "2.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346a3b32eba2640d17a9cb5927056b08f3de90f65b72fe09402c2ad07d684d0b" +dependencies = [ + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6630024bf739e2179b91fb424b28898baf819414262c5d376677dbff1fe7ebf" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scrypt" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" +dependencies = [ + "hmac", + "pbkdf2 0.11.0", + "salsa20", + "sha2", +] + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.14", + "untrusted 0.9.0", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest", + "keccak", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core 0.6.4", +] + +[[package]] +name = "simd-adler32" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" + +[[package]] +name = "simple_asn1" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb" +dependencies = [ + "num-bigint", + "num-traits", + "thiserror 2.0.18", + "time", +] + +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + +[[package]] +name = "slab" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "socket2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "solang-parser" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" +dependencies = [ + "itertools", + "lalrpop", + "lalrpop-util", + "phf", + "thiserror 1.0.69", + "unicode-xid", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "string_cache" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared", + "precomputed-hash", +] + +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.114", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "svm-rs" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" +dependencies = [ + "dirs", + "fs2", + "hex", + "once_cell", + "reqwest", + "semver", + "serde", + "serde_json", + "sha2", + "thiserror 1.0.69", + "url", + "zip", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" +dependencies = [ + "fastrand", + "getrandom 0.3.4", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl 2.0.18", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "time" +version = "0.3.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9e442fc33d7fdb45aa9bfeb312c095964abdf596f7567261062b2a7107aaabd" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b36ee98fd31ec7426d599183e8fe26932a8dc1fb76ddb6214d05493377d34ca" + +[[package]] +name = "time-macros" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e552d1249bf61ac2a52db88179fd0673def1e1ad8243a00d9ec9ed71fee3dd" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.49.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2 0.6.1", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +dependencies = [ + "futures-util", + "log", + "rustls", + "tokio", + "tokio-rustls", + "tungstenite", + "webpki-roots", +] + +[[package]] +name = "tokio-util" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime 0.6.11", + "toml_edit 0.22.27", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime 0.6.11", + "toml_write", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.23.10+spec-1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" +dependencies = [ + "indexmap", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.0.6+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" +dependencies = [ + "winnow", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand 0.8.5", + "rustls", + "sha1", + "thiserror 1.0.69", + "url", + "utf-8", +] + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-ident" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom 0.2.17", + "serde", +] + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.2+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" +dependencies = [ + "cfg-if", + "futures-util", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 2.0.114", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-sys" +version = "0.3.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "winnow" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[package]] +name = "ws_stream_wasm" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c173014acad22e83f16403ee360115b38846fe754e735c5d9d3803fe70c6abc" +dependencies = [ + "async_io_stream", + "futures", + "js-sys", + "log", + "pharos", + "rustc_version", + "send_wrapper 0.6.0", + "thiserror 2.0.18", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2 0.11.0", + "sha1", + "time", + "zstd", +] + +[[package]] +name = "zmij" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfcd145825aace48cff44a8844de64bf75feec3080e0aa5cdbde72961ae51a65" + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.16+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/assignments/1/1-merkle-root/Cargo.toml b/assignments/1/1-merkle-root/Cargo.toml new file mode 100644 index 00000000..b0e8566e --- /dev/null +++ b/assignments/1/1-merkle-root/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "merkle_root" +version = "0.1.0" +edition = "2024" + +[dependencies] +colored = "3.1.1" +ethers = "2.0.14" +sha2 = "0.10.9" +sha3 = "0.10.8" diff --git a/assignments/1/1-merkle-root/README.md b/assignments/1/1-merkle-root/README.md new file mode 100644 index 00000000..c6039865 --- /dev/null +++ b/assignments/1/1-merkle-root/README.md @@ -0,0 +1,37 @@ +# Merkle Tree Implementation in Rust (SHA-256 & Keccak256) + +This project demonstrates how a **Merkle Tree** works by hashing a list of transactions and recursively combining them to produce a **Merkle root**. + +The implementation is written in Rust and shows: +- How transactions are hashed +- How Merkle tree levels are built +- How the final Merkle root is computed +- The difference between using **SHA-256** and **Keccak256** + +This is an **educational implementation**, designed to help understand blockchain data structures. + +--- + +## Dependencies + +This project uses the following Rust crates: + +- **sha2** – SHA-256 hashing +- **sha3** – Keccak256 hashing +- **ethers::utils::hex** – Hexadecimal encoding +- **std::io** – Reading user input + +--- + +## What the Program Does (High-Level) + +```text +Transactions + ↓ +SHA-256 hash of each transaction + ↓ +Pairwise hash concatenation + ↓ +Repeated hashing of levels + ↓ +Merkle Root diff --git a/assignments/1/1-merkle-root/src/main.rs b/assignments/1/1-merkle-root/src/main.rs new file mode 100644 index 00000000..e9b0eb39 --- /dev/null +++ b/assignments/1/1-merkle-root/src/main.rs @@ -0,0 +1,156 @@ +use std::{hash, io}; + +use ethers::utils::{hex}; +use sha2::{Sha256, Digest}; +use sha3::Keccak256; +// use sha3::{Keccak256}; + +struct Transaction { + tx: String +} + +// #[derive(Debug, Clone, Copy)] +impl Transaction { + fn new(metadata: &str) -> Self { + Self { + tx: String::from(metadata) + } + } +} + +fn main() { + + let tx1 = Transaction::new("Alice sent 2 eth"); + let tx2 = Transaction::new("Jacks sent 1 eth"); + let tx3 = Transaction::new("Mike sent 8 eth"); + let tx4 = Transaction::new("Richard sent 2 eth"); + let tx5 = Transaction::new("Key sent 2 eth"); + + + print!(" 1 => Proceed "); + print!(" 2 => Concatenate Transactions"); + println!(""); + println!("This is Block #10290, please validate transactions"); + let mut trxn_input = String::new(); + io::stdin().read_line(&mut trxn_input).expect("Failed to read this line"); + + let mut txns = vec![tx1, tx2, tx3, tx4, tx5]; + let mut hashed_trxn = Vec::new(); + + for i in txns.iter_mut(){ + let mut hash = Sha256::new(); + hash.update(i.tx.clone()); + let result = hash.finalize().to_vec(); + hashed_trxn.push(result); + } + + for hash in hashed_trxn.iter() { + println!("{:?}", hex::encode(hash)); + } + + + let sha256_root = get_merkle_root_through_sha256(hashed_trxn.clone()); + // let Keccak256_root = get_merkle_root_through_kecheck(hashed_trxn); + + println!(""); + println!("Merkel root using sha256: ___ {}", hex::encode(sha256_root)); + // println!("Merkel root using keccak256: ___ {}", hex::encode(Keccak256_root)); +} + + +fn get_merkle_root_through_sha256(mut hashes: Vec>) -> Vec { + + println!(""); + println!("Using Sha256"); + if hashes.is_empty(){ + return vec![] + } + + + while hashes.len() > 1{ + let mut next_level = Vec::new(); + + let mut i = 0; + + println!(""); + println!("CURRENT LEVEL"); + for (i, h) in hashes.iter().enumerate(){ + println!("Transaction {}: {}", i, hex::encode(h)) + } + + while i < hashes.len() { + + if i + 1 < hashes.len() { + + println!(""); + println!("Hashing ==[{} + || {}]==", hex::encode(hashes[i].clone()), hex::encode(hashes[i + 1].clone())); + + let mut hasher = Sha256::new(); + hasher.update(&hashes[i]); + hasher.update(&hashes[i + 1]); + let result: Vec = hasher.finalize().to_vec(); + println!(""); + println!("Result: {}", hex::encode(&result)); + next_level.push(result); + }else { + println!("Unlinked hash: {}", hex::encode(hashes[i].clone())); + next_level.push(hashes[i].clone()); + } + + i += 2; + } + hashes = next_level; + } + + hashes.pop().unwrap() + + +} + +fn get_merkle_root_through_kecheck(mut hashes: Vec>) -> Vec { + println!(""); + println!("Using Keccak256"); + if hashes.is_empty(){ + return vec![] + } + + + while hashes.len() > 1{ + let mut next_level = Vec::new(); + + let mut i = 0; + + println!(""); + println!("CURRENT LEVEL"); + for (i, h) in hashes.iter().enumerate(){ + println!("Transaction {}: {}", i, hex::encode(h)) + } + + while i < hashes.len() { + + if i + 1 < hashes.len() { + + println!(""); + println!("Hashing ==[{} + || {}]==", hex::encode(hashes[i].clone()), hex::encode(hashes[i + 1].clone())); + + let mut hasher = Keccak256::new(); + hasher.update(&hashes[i]); + hasher.update(&hashes[i + 1]); + let result: Vec = hasher.finalize().to_vec(); + println!(""); + println!("Result: {}", hex::encode(&result)); + next_level.push(result); + }else { + next_level.push(hashes[i].clone()); + } + + i += 2; + } + hashes = next_level; + } + + hashes.pop().unwrap() + +} diff --git a/assignments/2-block-hash/Cargo.lock b/assignments/2-block-hash/Cargo.lock new file mode 100644 index 00000000..d4cdd6c5 --- /dev/null +++ b/assignments/2-block-hash/Cargo.lock @@ -0,0 +1,606 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block_hash" +version = "0.1.0" +dependencies = [ + "colored", + "ethereum-types", + "hex", + "rlp", + "sha2", + "tiny-keccak", +] + +[[package]] +name = "byte-slice-cast" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "colored" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "const_format" +version = "0.2.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7faa7469a93a566e9ccc1c73fe783b4a65c274c5ace346038dca9c39fe0030ad" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "ethbloom" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +dependencies = [ + "crunchy", + "fixed-hash", + "impl-rlp", + "impl-serde", + "tiny-keccak", +] + +[[package]] +name = "ethereum-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +dependencies = [ + "ethbloom", + "fixed-hash", + "impl-rlp", + "impl-serde", + "primitive-types", + "uint", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-rlp" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +dependencies = [ + "rlp", +] + +[[package]] +name = "impl-serde" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "indexmap" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "libc" +version = "0.2.180" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "parity-scale-codec" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799781ae679d79a948e13d4824a40970bfa500058d245760dd857301059810fa" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "const_format", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "rustversion", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "syn" +version = "2.0.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.23.10+spec-1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" +dependencies = [ + "indexmap", + "toml_datetime", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.0.6+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" +dependencies = [ + "winnow", +] + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unicode-ident" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "winnow" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +dependencies = [ + "memchr", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zerocopy" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71ddd76bcebeed25db614f82bf31a9f4222d3fbba300e6fb6c00afa26cbd4d9d" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8187381b52e32220d50b255276aa16a084ec0a9017a0ca2152a1f55c539758d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/assignments/2-block-hash/Cargo.toml b/assignments/2-block-hash/Cargo.toml new file mode 100644 index 00000000..16790619 --- /dev/null +++ b/assignments/2-block-hash/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "block_hash" +version = "0.1.0" +edition = "2024" + +[dependencies] +rlp = "0.5" +tiny-keccak = { version = "2.0", features = ["keccak"] } +ethereum-types = "0.14" +hex = "0.4.3" +sha2 = "0.10.9" +colored = "3.1.1" diff --git a/assignments/2-block-hash/src/main.rs b/assignments/2-block-hash/src/main.rs new file mode 100644 index 00000000..686aacf5 --- /dev/null +++ b/assignments/2-block-hash/src/main.rs @@ -0,0 +1,127 @@ +use rlp::RlpStream; +use ethereum_types::{H256, U256, Address}; +use tiny_keccak::{Hasher, Keccak}; +use sha2::{Sha256, Digest}; +use colored::*; + +fn keccak256(data: &[u8]) -> [u8; 32] { + let mut hasher = Keccak::v256(); + let mut output = [0u8; 32]; + hasher.update(data); + hasher.finalize(&mut output); + output +} + +struct Transaction { + tx: String +} + +// #[derive(Debug, Clone, Copy)] +impl Transaction { + fn new(metadata: &str) -> Self { + Self { + tx: String::from(metadata) + } + } +} + +fn ethereum_block_hash() -> H256 { + let tx1 = Transaction::new("Alice sent 2 eth"); + let tx2 = Transaction::new("Jacks sent 1 eth"); + let tx3 = Transaction::new("Mike sent 8 eth"); + let tx4 = Transaction::new("Richard sent 2 eth"); + let tx5 = Transaction::new("Key sent 2 eth"); + + let mut txns = vec![tx1, tx2, tx3, tx4, tx5]; + let mut hashed_trxn = Vec::new(); + + for i in txns.iter_mut(){ + let mut hash = Sha256::new(); + hash.update(i.tx.clone()); + let result = hash.finalize().to_vec(); + hashed_trxn.push(result); + } + + let mut stream = RlpStream::new_list(6); + + let block_version: u32 = 678983736; + let block_id: u32 = 350000; + let block_size: u32 = 2783980; + let timestamp: u32 = 178393938; + let bits: u32 = 783883893; + let nonce: u32 = 23838373; + let merkle_root = get_merkle_root(hashed_trxn.clone()); + + + stream.append(&block_version); + stream.append(&block_id); + stream.append(&block_size); + stream.append(×tamp); + stream.append(&bits); + stream.append(&nonce); + stream.append(&merkle_root); + + let rlp_bytes = stream.out(); + H256::from(keccak256(&rlp_bytes)) +} + +fn main() { + let block_hash = ethereum_block_hash(); + + println!(""); + // println!("Block hash: 0x{:x}", block_hash); + + println!("Block hash: {}", format!("0x{:x}", block_hash).green().bold()); + +} + + +fn get_merkle_root(mut hashes: Vec>) -> Vec { + + println!(""); + println!("Getting Merkle Root"); + if hashes.is_empty(){ + return vec![] + } + + + while hashes.len() > 1{ + let mut next_level = Vec::new(); + + let mut i = 0; + + println!(""); + println!("CURRENT LEVEL"); + for (i, h) in hashes.iter().enumerate(){ + println!("Transaction {}: {}", i, hex::encode(h)) + } + + while i < hashes.len() { + + if i + 1 < hashes.len() { + + println!(""); + println!("Hashing ==[{} + || {}]==", hex::encode(hashes[i].clone()), hex::encode(hashes[i + 1].clone())); + + let mut hasher = Sha256::new(); + hasher.update(&hashes[i]); + hasher.update(&hashes[i + 1]); + let result: Vec = hasher.finalize().to_vec(); + println!(""); + println!("Result: {}", hex::encode(&result)); + next_level.push(result); + }else { + println!("Unlinked hash: {}", hex::encode(hashes[i].clone())); + next_level.push(hashes[i].clone()); + } + + i += 2; + } + hashes = next_level; + } + + hashes.pop().unwrap() + + +} \ No newline at end of file diff --git a/assignments/2-gas-hash/README.md b/assignments/2-gas-hash/README.md deleted file mode 100644 index 6f04904e..00000000 --- a/assignments/2-gas-hash/README.md +++ /dev/null @@ -1,83 +0,0 @@ -# Ethereum Gas Fee and Merkle Root Calculator - - -## Overview -This repo contains: -- Simple explanations and calculation of key concepts around gas. -- TypeScript scripts for computing the Merkle roots of transactions using SHA256 and Keccak256. - -## Gas Fees in Ethereum: Explanation and Formula - -In Ethereum (and other EVM-based blockchains), gas is a unit that measures the computational work required to execute a transaction or smart contract. -It prevents spam and ensures fair use of network resources. - -**Gas fees** are the cost paid for this computation and are paid in ETH (or the chain’s native token). -I'll like to explain some concepts that are closesly associated with gas. - -### Key Concepts -- **Gas Limit**: This is the maximum amount of gas a transaction is allowed to use/consume, usually set by the user when submitting the transaction. If the transaction exceeds the limit in for a transaction, it fails and the gas is used. It is set by the user or wallet. If execution requires more gas than the limit, the transaction fails and is not refunded. -- **Gas Price (Gwei)**: This is the price/unit (Gwei, where 1 Gwei = 10^-9 ETH) of gas that the user bids. Miners will usually prefer a higher gas price. -The price per unit of gas, denominated in Gwei - -1 Gwei = 10⁻⁹ ETH -- **Gas Used**: The actual amount of gas consumed by the transaction after it has been executed. Simple ETH transfers use a fixed amount. Smart contracts consume variable gas depending on logic. - -- **Base Fee**: This fee is dynamically adjusted by the protocol depending on how the network is congested. It would watch for the block to be ~50%. This fee is burned, and ETH suply is reduced. Dynamically adjusted by the protocol based on network congestion. Target block usage is ~50%. Burned (removed from circulation), reducing ETH supply. -- **Priority Fee (Tip)**: An optional extra fee to incentivize miners/validators to include your transaction faster. -Optional extra fee paid to validators. Incentivizes faster inclusion in a block. -- **Effective Gas Price**: The total price per gas unit paid = Base Fee + Priority Fee. - -### Gas Fee Formula -**Total Gas Fee = Gas Used x Effective Gas Price** - - -#### Example Calculation - -If you send **2 ETH** and the transaction uses 4 units of gas, with: - -Base Fee = 11 Gwei - -Priority Fee = 3 Gwei - -Total Fee = 4 × (11 + 3) - = 4 × 14 - = 56 Gwei - - -Convert to ETH: - -56 Gwei = 56 × 10⁻⁹ ETH - = 0.000000056 ETH - - -**Total sent:** -2.000000056 ETH - -### What Affects Gas Fees? - -- **Network congestion:** Higher demand → higher base fee -- **Transaction complexity:** More computation → more gas used -- **User tip:** Higher priority fee → faster confirmation - -Gas fees are **market-driven**, not fixed. - - -## Markle Root (Root Hash) -This is a cryptographic hash that serves as a unique fingerprint for all transactions within a blockchain block. It is the final code in a markle tree. - - -### Setup -run -```bash - git clone https://github.com/Olorunshogo/blockheader-web3-assignments.git - cd gas-hash - npm install - node hash.ts -``` - -## Merkle Root -- Prompts for tx count and strings, derives hashes, computes roots with both algorithms. -- Leaves are 64-char hex (32 bytes). - -## Notes -- Tested on Node.js 24.11.1. \ No newline at end of file diff --git a/assignments/2-gas-hash/hash.ts b/assignments/2-gas-hash/hash.ts deleted file mode 100644 index cd282994..00000000 --- a/assignments/2-gas-hash/hash.ts +++ /dev/null @@ -1,166 +0,0 @@ - -import { ethers } from "ethers"; -import * as crypto from 'crypto'; -import * as readline from 'readline-sync'; - -// Gas Price Calculation -function calculateGasFee() { - // Prompt for gas price (in Gwei) - const gasPriceGwei = parseFloat( - readline.question("Enter gas price in Gwei: "), - ); - - // Prompt for gas used (in units) - const gasUsed = parseFloat(readline.question("Enter gas used: ")); - - // Calculate total gas fee in ETH - const totalGasFee = (gasPriceGwei * gasUsed) / 1e9; // Convert Gwei to ETH - console.log(`Total Gas Fee: ${totalGasFee} ETH`); -} - -// Merkle Root Calculations - -// Helper function to hash using the SHA256 algorithm -function sha256Hash(first: Buffer, second: Buffer): string { - const combinedLeaf = Buffer.concat([first, second]); - return crypto.createHash("sha256").update(combinedLeaf).digest("hex"); - -} - -// Similarly, KACCAK256 helper function to combine two leafs -function keccak256Hash(first: Buffer, second: Buffer): string { - const combinedLeaf = Buffer.concat([first, second]); - return ethers.keccak256(combinedLeaf); -} - -// Function to build Merkle Root -function buildMerkleRoot(leaves: string[], hashFunc: (first: Buffer, second: Buffer) => string,): string { - // Check for leaves - if (leaves.length === 0) { - throw new Error("No leaves provided"); - } - - // Convert hex leaves to Buffers: So we dont have to use the 0x prefix - let level: Buffer[] = leaves.map((leaf) => Buffer.from(leaf.slice(2), "hex")); - - while (level.length > 1) { - const nextLevel: Buffer[] = []; - for (let i = 0; i < level.length; i += 2) { - const first = level[i]; - const second = i + 1 < level.length ? level[i + 1] : first; - const parentHex = hashFunc(first, second); - nextLevel.push(Buffer.from(parentHex.slice(2), "hex")); - } - // Log the current level's hashes - console.log( - "Current level hashes: ", - nextLevel.map((hash) => hash.toString("hex")), - ); - - level = nextLevel; - } - - return "Ox" + level[0].toString("hex"); -} - -// Main hash function -function shaHashingFunction() { - // Prompt User for the Number of Transactions - const numTxs = parseInt( - readline.question("Enter number of transactions: "), - 10, - ); - - // Check if the user input character (s) or a number less than 0 - if (isNaN(numTxs) || numTxs < 0) { - console.error("Invalid number"); - return; - } - - // Check if the number of transaction is equal to zero - if (numTxs === 0) { - console.error("Please input a number greater than 0"); - return; - } - - // Initiate the transaction hashes array - const transactionHashes: string[] = []; - - for (let i = 0; i < numTxs; i++) { - // Prompt the user to enter a string to generate each the transaction hash - const inputStr = readline.question( - `Enter string for transaction ${i + 1}: `, - ); - // Derive transaction hash from input string using Keccak256 (simulating tx hash derivation) - const txHash = ethers.sha256(ethers.toUtf8Bytes(inputStr)); - console.log(`Derived Tx Hash ${i + 1}: ${txHash}`); - console.log(`The length of the Tx Hash is: ${i + 1}: ${txHash.length}`); - - // Append transaction hash to the array - transactionHashes.push(txHash); - - console.log(""); - } - - // Merkle Root Calculation - const sha256Root = buildMerkleRoot(transactionHashes, sha256Hash); - console.log("\n Merkle Root with SHA256: ", sha256Root); -} - -function keccakHashingFunction() { - // Prompt User for the Number of Transactions - const numTxs = parseInt( - readline.question("Enter number of transactions: "), - 10, - ); - - // Check if the user input character (s) or a number less than 0 - if (isNaN(numTxs) || numTxs < 0) { - console.error("Invalid number"); - return; - } - - // Check if the number of transaction is equal to zero - if (numTxs === 0) { - console.error("Please input a number greater than 0"); - return; - } - - // Initiate the transaction hashes array - const transactionHashes: string[] = []; - - for (let i = 0; i < numTxs; i++) { - // Prompt the user to enter a string to generate each the transaction hash - const inputStr = readline.question( - `Enter string for transaction ${i + 1}: `, - ); - // Derive transaction hash from input string using Keccak256 (simulating tx hash derivation) - const txHash = ethers.keccak256(ethers.toUtf8Bytes(inputStr)); - console.log(`Derived Tx Hash ${i + 1}: ${txHash}`); - console.log(`The length of the Tx Hash is: ${i + 1}: ${txHash.length}`); - - // Append transaction hash to the array - transactionHashes.push(txHash); - - console.log(""); - } - - // Merkle Root Calculation - const keccak256Root = buildMerkleRoot(transactionHashes, keccak256Hash); - console.log("\n Merkle Root with Keccak256: ", keccak256Root); -} - -// Run the gas fee calculator -calculateGasFee(); - -// Run the hashing functions -shaHashingFunction(); -keccakHashingFunction(); - - - - - - - - diff --git a/assignments/2-gas-hash/package.json b/assignments/2-gas-hash/package.json deleted file mode 100644 index 59854dad..00000000 --- a/assignments/2-gas-hash/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "module", - "dependencies": { - "@types/node": "^25.0.9", - "crypto": "^1.0.1", - "ethers": "^6.16.0", - "readline-sync": "^1.4.10", - "ts-node": "^10.9.2" - }, - "devDependencies": { - "@types/readline-sync": "^1.4.8" - } -} diff --git a/assignments/3-block-observation/README.md b/assignments/3-block-observation/README.md new file mode 100644 index 00000000..d3098ee5 --- /dev/null +++ b/assignments/3-block-observation/README.md @@ -0,0 +1,37 @@ +# Observations on a Block explorer(Etherscan) and a Transaction hash + + +### 1. Exploring the block explorer +While on the block explorer, I observed some standard metrics which were: +- Ether price: This gives the current market value of one `ether` +- Market cap: Short for market capitalisation, it is calculated by multiplying the current value of ether by the total circulating supply. +- Transactions: This shows the total number of transactions processed in ethereum over a period of time. +- Last finalised block: This is the most recent block that have ben finalized or confirmed by the consensus mechanism +- Latest blocks: This shows recent blocks that have been added to the blockchain +- Latest transaction: This shows all the recent transaction that were mined in a block. + +### 2. Exploring a block on etherscan (Block explorer) +After clicking on a recent block under the `Latest blocks` section, there were some details I observed which were: +- Block Height: It shows the number in which the block is positioned, right from the genesis block. It shows the length of the blockchain. +- Status: It shows if a block is fiinalised/confirmed +- Timestamp: It shows the date and time at which the block was created. +- Transactions: Shows the number of transactions the block carries +- Fee recipient: This is the address of the block that receives transaction fees/gas fees +- Block reward: This is the reward given to a block producer/validator +- Block difficulty: This is the total difficulty of the chain up until the recent recent block. + +### 3. Exploring a transaction hash + +- **Sending ETH to my address** +On my rabby wallet, I clicked on `Send` button which prompted me to input an amount and put in the receivers' address, since I'm sending to myself, I inputted my wallet address. After that I clicked `Send` then I signed and confirmed the transaction. Immediately I was redirected to `etherscan.io`, there I observed some details like: +- Transaction hash: It is unique identifier that is generated cryptographically when a transaction is created, it's more like a proof that a transaction a has gone through. +- Status: This shows if a transaction was successful or not +- Block: This shows the block height which this transaction is included. +- Timestamp: The date a time in which this transaction was created. +- From: Senders' address +- To: Receivers' address +- Value: The value of ETH I'm spending + +## Conclusion +The ethereum block explorer is a powerful tool that shows in real time the processes and production of blocks and transactions. +As well as a transaction hash that serves as a proof that an exchange of value has already taken place. \ No newline at end of file diff --git a/assignments/4-terminologies/README.md b/assignments/4-terminologies/README.md new file mode 100644 index 00000000..53863914 --- /dev/null +++ b/assignments/4-terminologies/README.md @@ -0,0 +1,85 @@ +## Exec hash, finalized root, epoch and block hash, slots, fork choice + +### Block hash +A block hash is a short fingerprint of a block. +It’s created by hashing the block’s contents (transactions, metadata, etc.) +Looks like random hex: 0x9f3a... +Why it matters: +If anything in the block changes → the hash changes +This makes blocks tamper-evident + +### Execution hash (execution payload hash) +Ethereum has two layers now: +Execution layer → transactions, balances, smart contracts +Consensus layer → validators, slots, finality +Execution hash is: +A hash that represents the result of executing transactions in a block +It commits to: +- Account balances +- Contract storage +- Gas usage +- Logs, etc. +**Why it exists**: +Consensus layer needs to know “this is the exact execution result” +Prevents lying about transaction outcomes + +### Finalized root: +A cryptographic commitment to Ethereum’s state that is locked in forever +When something is finalized: +It cannot be reverted +Even if validators disagree later +Ethereum finalizes blocks using validator votes (called finality). +Why it matters: +Exchanges wait for finalization before crediting deposits +Apps trust finalized data + +### Epoch +🔹 Slot +Time unit: 12 seconds +Each slot can have one block + +🔹 Epoch +32 slots = 1 epoch +About 6.4 minutes +**So**: +Slot → Block +32 Slots → 1 Epoch + +🔹 Epoch purpose: +Group slots together +Validators vote during epochs +Finalization happens at epoch boundaries + +### Fork choice +Ethereum is decentralized, so: +Sometimes two blocks appear at the same time +Network temporarily disagrees + +**Fork choice rule answers**: +``` +“Which chain should I follow?” +``` +Ethereum uses a rule called `LMD-GHOST`: +Follow the chain with the most validator support +Heavier = more votes, not more computation + +**Why fork choice exists:** +Keeps everyone converging on one canonical chain +Resolves temporary splits. You can say it's a rule for picking the “real” chain + +**Think of it like this** +Multiple branches → pick the branch with more people standing on it + +### How everything connects (big picture) +Time → Slots → Blocks → Epochs + ↓ + Block Hash + ↓ + Execution Hash + ↓ + Finalized Root + + +Fork choice decides which blocks matter +Epochs organize validator voting +Finalized root locks history forever \ No newline at end of file diff --git a/assignments/5-json-rpc-methods/README.md b/assignments/5-json-rpc-methods/README.md new file mode 100644 index 00000000..6e863fcf --- /dev/null +++ b/assignments/5-json-rpc-methods/README.md @@ -0,0 +1,172 @@ +# JSON RPC METHODS + +## What is `JSON RPC` in Ethereum? +JSON-RPC is just a way for your app to talk to an Ethereum node. +**Think of it like this:** +- Ethereum node = a server that knows the blockchain +- JSON-RPC = the language you use to ask it questions or give it instructions +- You send a JSON message +- The node replies with JSON + +### Basic structure of a JSON-RPC request +Every request looks roughly like this: +```rust +{ + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [], + "id": 1 +} + +``` +**In here,** +`jsonrpc` => The JSON-RPC protocol version +`method` => What you eant to do +`params` => data you pass in +`id` => This is the request ID + +## Main Ethereum JSON-RPC Method Groups +Ethereum methods are grouped by prefix: + +Prefix Purpose +eth_ Core Ethereum blockchain operations +net_ Network info +web3_ Client utilities +debug_ Debugging (advanced) +trace_ Execution tracing (advanced) + + + + + +## Essential Ethereum JSON-RPC Methods (Beginner List) +### 1️⃣ Blockchain Info +`eth_blockNumber` +📦 Get the latest block number +``` +"What is the most recent block?" +``` +Used for: +syncing +checking chain progress + +`eth_getBlockByNumber` +📦 Get block details by block number +"Give me block #18000000" +Can return: +- transactions +- block hash +- miner +- timestamp + +`eth_getBlockByHash` +📦 Get block details using block hash +```rust +"Give me the block with this hash" +``` + +### 2️⃣ Accounts & Balances +`eth_getBalance` +💰 Get ETH balance of an address +``` +"How much ETH does this address have?" +``` +Returns balance in wei (smallest ETH unit). + +`eth_getTransactionCount` +🔢 Get nonce for an address +"How many transactions has this address sent?" +Important for: +- creating transactions +- preventing replay + + + +### 3️⃣ Transactions +`eth_getTransactionByHash` +📨 Get transaction details +``` +"Show me this transaction" +``` + + +`eth_getTransactionReceipt` +🧾 Check if transaction succeeded or failed +Returns: +- status (success/fail) +- gas used +- logs (events) + + + +`eth_sendRawTransaction` +🚀 Send a signed transaction +``` +"Broadcast this already-signed transaction" +``` +NOTE: Node does not sign for you, +Wallet signs → node broadcasts + + + +### 4️⃣ Smart Contracts +`eth_call` +🤖 Call a contract function (read-only) +"Call this function, but don’t change state" +Used for: +reading contract data +no gas cost +instant response + +`eth_estimateGas` +⛽ Estimate gas for a transaction +"How much gas will this transaction need?" + + +`eth_getCode` +📜 Get contract bytecode +"Is there a contract at this address?" +If result is 0x → no contract. + +### 5️⃣ Logs & Events +`eth_getLogs` +📡 Get smart-contract events +"Show me all Transfer events for this token" +Used heavily by: +indexers +explorers +analytics + +### 6️⃣ Network Info +`net_version` +🌐 Get chain ID +"Which network is this?" + +Examples: +1 → Ethereum Mainnet +5 → Goerli (deprecated) +11155111 → Sepolia + +`net_peerCount` +👥 How many peers connected + +### 7️⃣ Utility Methods +`web3_clientVersion` +🧠 Get node software info +"Geth? Nethermind? Erigon?" + + +`web3_sha3` +🔐 Keccak-256 hash +"Hash this data the Ethereum way" + +**Example: Balance Check in Plain English** +> App → Node: +> “What’s the balance of 0xABC... at the latest block?” + +That’s just: +```rust +eth_getBalance(address, "latest") +``` + + diff --git a/assignments/6-address-derivation/Cargo.lock b/assignments/6-address-derivation/Cargo.lock new file mode 100644 index 00000000..19bd30d2 --- /dev/null +++ b/assignments/6-address-derivation/Cargo.lock @@ -0,0 +1,738 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "address_derivative" +version = "0.1.0" +dependencies = [ + "bip39", + "hex", + "k256", + "sha3", + "tiny-hderive", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base58" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" + +[[package]] +name = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + +[[package]] +name = "bip39" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90dbd31c98227229239363921e60fcf5e558e43ec69094d46fc4996f08d1d5bc" +dependencies = [ + "bitcoin_hashes", + "rand 0.8.5", + "rand_core 0.6.4", + "serde", + "unicode-normalization", +] + +[[package]] +name = "bitcoin_hashes" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26ec84b80c482df901772e931a9a681e26a1b9ee2302edeff23cb30328745c8b" +dependencies = [ + "hex-conservative", +] + +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding", + "byte-tools", + "byteorder", + "generic-array 0.12.4", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array 0.14.9", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", +] + +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array 0.14.9", + "rand_core 0.6.4", + "subtle 2.6.1", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array 0.14.9", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +dependencies = [ + "generic-array 0.12.4", + "subtle 1.0.0", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array 0.12.4", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle 2.6.1", +] + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array 0.14.9", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle 2.6.1", + "zeroize", +] + +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core 0.6.4", + "subtle 2.6.1", +] + +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + +[[package]] +name = "generic-array" +version = "0.14.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle 2.6.1", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-conservative" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda06d18ac606267c40c04e41b9947729bf8b9efe74bd4e82b61a5f26a510b9f" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "hmac" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" +dependencies = [ + "crypto-mac", + "digest 0.8.1", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "hmac-drbg" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" +dependencies = [ + "digest 0.8.1", + "generic-array 0.12.4", + "hmac 0.7.1", +] + +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2 0.10.9", + "signature", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "libc" +version = "0.2.180" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" + +[[package]] +name = "libsecp256k1" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" +dependencies = [ + "arrayref", + "crunchy", + "digest 0.8.1", + "hmac-drbg", + "rand 0.7.3", + "sha2 0.8.2", + "subtle 2.6.1", + "typenum", +] + +[[package]] +name = "memzero" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93c0d11ac30a033511ae414355d80f70d9f29a44a49140face477117a1ee90db" + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac 0.12.1", + "subtle 2.6.1", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array 0.14.9", + "pkcs8", + "subtle 2.6.1", + "zeroize", +] + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sha2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +dependencies = [ + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tiny-hderive" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01b874a4992538d4b2f4fbbac11b9419d685f4b39bdc3fed95b04e07bfd76040" +dependencies = [ + "base58", + "hmac 0.7.1", + "libsecp256k1", + "memzero", + "sha2 0.8.2", +] + +[[package]] +name = "tinyvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "unicode-ident" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" + +[[package]] +name = "unicode-normalization" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "zerocopy" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdea86ddd5568519879b8187e1cf04e24fce28f7fe046ceecbce472ff19a2572" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c15e1b46eff7c6c91195752e0eeed8ef040e391cdece7c25376957d5f15df22" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" diff --git a/assignments/6-address-derivation/Cargo.toml b/assignments/6-address-derivation/Cargo.toml new file mode 100644 index 00000000..521706ed --- /dev/null +++ b/assignments/6-address-derivation/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "address_derivative" +version = "0.1.0" +edition = "2024" + +[dependencies] +bip39 = { version = "2.0", features = ["rand"] } +hex = "0.4.3" +tiny-hderive = "0.3" +k256 = { version = "0.13", features = ["ecdsa"] } +sha3 = "0.10" \ No newline at end of file diff --git a/assignments/6-address-derivation/README.md b/assignments/6-address-derivation/README.md new file mode 100644 index 00000000..5bd28ce5 --- /dev/null +++ b/assignments/6-address-derivation/README.md @@ -0,0 +1,42 @@ +# Ethereum Wallet Generator in Rust + +This project demonstrates how to generate an **Ethereum wallet** in Rust using industry standards such as **BIP-39**, **BIP-32/BIP-44**, and **Keccak256**. + +The program: +- Generates cryptographically secure entropy +- Creates a 12-word mnemonic phrase +- Derives an Ethereum private key using a BIP-44 path +- Computes the public key +- Generates an Ethereum address + +--- + +## Dependencies + +This project uses the following crates: + +- **bip39** – mnemonic phrase generation (BIP-39) +- **tiny-hderive** – hierarchical deterministic key derivation (BIP-32 / BIP-44) +- **k256** – secp256k1 elliptic curve cryptography (Ethereum keys) +- **sha3** – Keccak256 hashing (Ethereum address format) +- **hex** – hexadecimal encoding +- **rand (OsRng)** – secure randomness from the operating system + +--- + +## What the Code Does (High-Level) + +```text +OS Randomness + ↓ +Entropy + ↓ +12-word Mnemonic + ↓ +Seed + ↓ +Private Key + ↓ +Public Key + ↓ +Ethereum Address \ No newline at end of file diff --git a/assignments/6-address-derivation/src/main.rs b/assignments/6-address-derivation/src/main.rs new file mode 100644 index 00000000..84353cfe --- /dev/null +++ b/assignments/6-address-derivation/src/main.rs @@ -0,0 +1,97 @@ +use bip39::rand::RngCore; +use bip39::{Language, Mnemonic}; +use bip39::rand::rngs::OsRng; + +use tiny_hderive::bip32::ExtendedPrivKey; + +use k256::ecdsa::SigningKey; +use k256::elliptic_curve::sec1::ToEncodedPoint; +use k256::elliptic_curve::FieldBytes; + +use sha3::{Digest, Keccak256}; + + +fn main() { + let mut rng = OsRng; + + let mnemonic = Mnemonic::generate_in_with(&mut rng, Language::English, 15).expect("failed to generate mnemonic"); + println!(""); + println!("Mnemonic phrase"); + println!("==============="); + println!("{}", mnemonic); + println!(""); + let seed = mnemonic.to_seed(""); + + + + + for i in 0..5{ + let derivation_path = format!("m/44'/60'/0'/0/{}", i); + + let child_key = ExtendedPrivKey::derive(seed.as_slice(), &*derivation_path).expect("Derivation failed"); + + let raw_prv = child_key.secret(); + let signing_key = SigningKey::from_slice(&child_key.secret()) + .expect("Invalid private key"); + + let public_key = signing_key.verifying_key(); + let encoded = public_key.to_encoded_point(false); + let pubkey_bytes = encoded.as_bytes(); + let pubkey = &pubkey_bytes[1..]; + + let hash = Keccak256::digest(pubkey); + let address = &hash[12..]; + + + println!(""); + println!("WALLET {}", i+1); + println!("Derivation path: {}", derivation_path); + println!("Private key in hex(before signing key): {}", hex::encode(raw_prv)); + println!("Public Key in hex: {}", hex::encode(pubkey)); + println!("Address: 0x{}", hex::encode(address)); + println!(""); + } + + +} + + + + + + + + +////////////LEARNING + +// fn main() { +// // 1️⃣ Generate a mnemonic +// let mut rng = OsRng; +// let mnemonic = Mnemonic::generate_in_with(&mut rng, Language::English, 12).unwrap(); +// println!("Mnemonic: {}", mnemonic); + +// let seed = mnemonic.to_seed(""); + +// // 2️⃣ Derive two keys with different derivation paths +// let key0 = ExtendedPrivKey::derive(seed.as_slice(), "m/44'/60'/0'/0/0").unwrap(); +// let key1 = ExtendedPrivKey::derive(seed.as_slice(), "m/44'/60'/0'/0/0").unwrap(); + +// // 3️⃣ Convert each to Ethereum address +// let addr0 = private_key_to_eth_address(&key0); +// let addr1 = private_key_to_eth_address(&key1); + +// println!("Address 0: 0x{}", hex::encode(addr0)); +// println!("Address 1: 0x{}", hex::encode(addr1)); +// } + +// // Helper function to convert ExtendedPrivKey → Ethereum address +// fn private_key_to_eth_address(key: &ExtendedPrivKey) -> [u8; 20] { +// let signing_key = SigningKey::from_slice(&key.secret()).unwrap(); +// let pubkey = signing_key.verifying_key().to_encoded_point(false); +// let pubkey_bytes = pubkey.as_bytes(); +// let pubkey_no_prefix = &pubkey_bytes[1..]; // remove 0x04 prefix +// let hash = Keccak256::digest(pubkey_no_prefix); +// let mut address = [0u8; 20]; +// address.copy_from_slice(&hash[12..]); // last 20 bytes +// address +// } \ No newline at end of file diff --git a/erc20/.gitignore b/erc20/.gitignore new file mode 100644 index 00000000..c522c4a3 --- /dev/null +++ b/erc20/.gitignore @@ -0,0 +1,19 @@ +# Node Modules +node_modules/ + +# Hardhat generated folders +artifacts/ +cache/ +typechain-types/ +typechain/ +coverage/ +coverage.json + +# Environment Variables (NEVER PUSH YOUR PRIVATE KEYS!) +.env + +# Custom Ignored Files for this Push +contracts/DeployedMarketplace.md +scripts/testMarketplace.ts +contracts/ERC20.sol +contracts/ERC721.sol \ No newline at end of file diff --git a/erc20/README.md b/erc20/README.md new file mode 100644 index 00000000..107f05e9 --- /dev/null +++ b/erc20/README.md @@ -0,0 +1,71 @@ + + + + + + + + + + diff --git a/erc20/contracts/Counter.sol b/erc20/contracts/Counter.sol new file mode 100644 index 00000000..c4997b49 --- /dev/null +++ b/erc20/contracts/Counter.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.28; + +contract Counter { + uint public x; + + event Increment(uint by); + + function inc() public { + x++; + emit Increment(1); + } + + function incBy(uint by) public { + require(by > 0, "incBy: increment should be positive"); + x += by; + emit Increment(by); + } +} diff --git a/erc20/contracts/Counter.t.sol b/erc20/contracts/Counter.t.sol new file mode 100644 index 00000000..ac71d5b8 --- /dev/null +++ b/erc20/contracts/Counter.t.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.28; + +import {Counter} from "./Counter.sol"; +import {Test} from "forge-std/Test.sol"; + +// Solidity tests are compatible with foundry, so they +// use the same syntax and offer the same functionality. + +contract CounterTest is Test { + Counter counter; + + function setUp() public { + counter = new Counter(); + } + + function test_InitialValue() public view { + require(counter.x() == 0, "Initial value should be 0"); + } + + function testFuzz_Inc(uint8 x) public { + for (uint8 i = 0; i < x; i++) { + counter.inc(); + } + require(counter.x() == x, "Value after calling inc x times should be x"); + } + + function test_IncByZero() public { + vm.expectRevert(); + counter.incBy(0); + } +} diff --git a/erc20/contracts/NFTmarketplace.sol b/erc20/contracts/NFTmarketplace.sol new file mode 100644 index 00000000..078cef46 --- /dev/null +++ b/erc20/contracts/NFTmarketplace.sol @@ -0,0 +1,123 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.28; + +// ERC721 Interface +interface IERC721 { + function ownerOf(uint256 tokenId) external view returns (address); + function getApproved(uint256 tokenId) external view returns (address); + function isApprovedForAll(address owner, address operator) external view returns (bool); + function transferFrom(address from, address to, uint256 tokenId) external; +} + +contract NFTmarketplace { + // Reentrancy guard + uint256 private constant _NOT_ENTERED = 1; + uint256 private constant _ENTERED = 2; + uint256 private _status; + + modifier nonReentrant() { + require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); + _status = _ENTERED; + _; + _status = _NOT_ENTERED; + } + + // Marketplace state & setting + address public owner; + address payable public treasury; + uint256 public feePercentage; // e.g., 25 for 2.5% + + struct Listing { + address seller; + uint256 price; + } + + // Maps + mapping(address => mapping(uint256 => Listing)) public listings; // NFT contract => tokenId => Listing + + event ItemListed(address indexed seller, address indexed nftAddress, uint256 indexed tokenId, uint256 price); + event ListingCancelled(address indexed seller, address indexed nftAddress, uint256 indexed tokenId); + event ItemBought(address indexed buyer, address indexed nftAddress, uint256 indexed tokenId, uint256 price); + + constructor(address payable _treasury) { + owner = msg.sender; + treasury = _treasury; + feePercentage = 25; + _status = _NOT_ENTERED; + } + + modifier onlyOwner() { + require(msg.sender == owner, "Only owner can call this"); + _; + } + + // Marketplace fee + function setFeePercentage(uint256 _newFee) external onlyOwner { + feePercentage = _newFee; + } + + // Listing NFTs + function listNFT(address nftAddress, uint256 tokenId, uint256 price) external { + require(price > 0, "Price must be > 0"); + + IERC721 nft = IERC721(nftAddress); + require(nft.ownerOf(tokenId) == msg.sender, "Not the owner"); + + require( + nft.getApproved(tokenId) == address(this) || nft.isApprovedForAll(msg.sender, address (this)), + "Marketplace not approved" + ); + + // Escrow the NFT + nft.transferFrom(msg.sender, address(this), tokenId); + + // Save the listing + listings[nftAddress][tokenId] = Listing(msg.sender, price); + + emit ItemListed(msg.sender, nftAddress, tokenId, price); + } + + // Cancel Listing + function cancelListing(address nftAddress, uint256 tokenId) external nonReentrant { + Listing memory listing = listings[nftAddress][tokenId]; + + require(listing.price > 0, "Not Listed"); + require(listing.seller == msg.sender, "Not the selleer"); + + // Remove Listing + delete listings[nftAddress][tokenId]; + + // Return NFT back to Seller + IERC721(nftAddress).transferFrom(address(this), msg.sender, tokenId); + + emit ListingCancelled(msg.sender, nftAddress, tokenId); + } + + // Buy NFT + function buyNFT(address nftAddress, uint256 tokenId) external payable nonReentrant { + Listing memory listing = listings[nftAddress][tokenId]; + + require(listing.price > 0, "Not Listed"); + require(msg.value >= listing.price, "Insufficient payment"); + + // Calculate fee and seller cut + uint256 fee = (msg.value * feePercentage) / 1000; + uint256 sellerProceeds = msg.value - fee; + + // Remove listing to prevent reentrancy + delete listings[nftAddress][tokenId]; + + // Transfer NFT to buyer + IERC721(nftAddress).transferFrom(address(this), msg.sender, tokenId); + + // Transfer funds to treasury + (bool feeSuccess, ) = treasury.call{value: fee}(""); + require(feeSuccess, "Treasury transfer failed"); + + // Transfer remaining funds to seller + (bool sellerSuccesss, ) = payable(listing.seller).call{value: sellerProceeds}(""); + require(sellerSuccesss, "Seller transfer failed"); + + emit ItemBought(msg.sender, nftAddress, tokenId, listing.price); + } +} \ No newline at end of file diff --git a/erc20/hardhat.config.ts b/erc20/hardhat.config.ts new file mode 100644 index 00000000..0225d71b --- /dev/null +++ b/erc20/hardhat.config.ts @@ -0,0 +1,40 @@ +import hardhatToolboxMochaEthersPlugin from "@nomicfoundation/hardhat-toolbox-mocha-ethers"; +import { configVariable, defineConfig } from "hardhat/config"; + +export default defineConfig({ + plugins: [hardhatToolboxMochaEthersPlugin], + solidity: { + profiles: { + default: { + version: "0.8.28", + }, + production: { + version: "0.8.28", + settings: { + optimizer: { + enabled: true, + runs: 200, + }, + }, + }, + }, + }, + networks: { + hardhatMainnet: { + type: "edr-simulated", + chainType: "l1", + }, + hardhatOp: { + type: "edr-simulated", + chainType: "op", + }, + sepolia: { + type: "http", + chainType: "l1", + url: configVariable("SEPOLIA_RPC_URL"), + accounts: [configVariable("SEPOLIA_PRIVATE_KEY")], + }, + }, + + // 7e318ba7f9c52530342d2ae81ccb02da9156d4c49121d541ac8de41d0d6ce619 +}); diff --git a/erc20/ignition/deployments/chain-11155111/build-info/solc-0_8_28-46340a8327d1ad8f41ff4718c2249f1e0ea18999.json b/erc20/ignition/deployments/chain-11155111/build-info/solc-0_8_28-46340a8327d1ad8f41ff4718c2249f1e0ea18999.json new file mode 100644 index 00000000..71d1edf9 --- /dev/null +++ b/erc20/ignition/deployments/chain-11155111/build-info/solc-0_8_28-46340a8327d1ad8f41ff4718c2249f1e0ea18999.json @@ -0,0 +1,39 @@ +{ + "_format": "hh3-sol-build-info-1", + "id": "solc-0_8_28-46340a8327d1ad8f41ff4718c2249f1e0ea18999", + "solcVersion": "0.8.28", + "solcLongVersion": "0.8.28+commit.7893614a", + "userSourceNameMap": { + "contracts/NFTmarketplace.sol": "project/contracts/NFTmarketplace.sol" + }, + "input": { + "language": "Solidity", + "settings": { + "evmVersion": "cancun", + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "remappings": [] + }, + "sources": { + "project/contracts/NFTmarketplace.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.28;\n\n// ERC721 Interface\ninterface IERC721 {\n function ownerOf(uint256 tokenId) external view returns (address);\n function getApproved(uint256 tokenId) external view returns (address);\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n function transferFrom(address from, address to, uint256 tokenId) external;\n}\n\ncontract NFTmarketplace {\n // Reentrancy guard\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n uint256 private _status;\n\n modifier nonReentrant() {\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n _status = _ENTERED;\n _;\n _status = _NOT_ENTERED;\n }\n\n // Marketplace state & setting\n address public owner;\n address payable public treasury;\n uint256 public feePercentage; // e.g., 25 for 2.5%\n\n struct Listing {\n address seller;\n uint256 price;\n }\n\n // Maps\n mapping(address => mapping(uint256 => Listing)) public listings; // NFT contract => tokenId => Listing\n\n event ItemListed(address indexed seller, address indexed nftAddress, uint256 indexed tokenId, uint256 price);\n event ListingCancelled(address indexed seller, address indexed nftAddress, uint256 indexed tokenId);\n event ItemBought(address indexed buyer, address indexed nftAddress, uint256 indexed tokenId, uint256 price);\n\n constructor(address payable _treasury) {\n owner = msg.sender;\n treasury = _treasury;\n feePercentage = 25;\n _status = _NOT_ENTERED;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"Only owner can call this\");\n _;\n }\n\n // Marketplace fee\n function setFeePercentage(uint256 _newFee) external onlyOwner {\n feePercentage = _newFee;\n }\n\n // Listing NFTs\n function listNFT(address nftAddress, uint256 tokenId, uint256 price) external {\n require(price > 0, \"Price must be > 0\");\n\n IERC721 nft = IERC721(nftAddress);\n require(nft.ownerOf(tokenId) == msg.sender, \"Not the owner\");\n\n require(\n nft.getApproved(tokenId) == address(this) || nft.isApprovedForAll(msg.sender, address (this)),\n \"Marketplace not approved\"\n );\n\n // Escrow the NFT\n nft.transferFrom(msg.sender, address(this), tokenId);\n\n // Save the listing\n listings[nftAddress][tokenId] = Listing(msg.sender, price);\n\n emit ItemListed(msg.sender, nftAddress, tokenId, price);\n }\n\n // Cancel Listing\n function cancelListing(address nftAddress, uint256 tokenId) external nonReentrant {\n Listing memory listing = listings[nftAddress][tokenId];\n\n require(listing.price > 0, \"Not Listed\");\n require(listing.seller == msg.sender, \"Not the selleer\");\n\n // Remove Listing\n delete listings[nftAddress][tokenId];\n\n // Return NFT back to Seller\n IERC721(nftAddress).transferFrom(address(this), msg.sender, tokenId);\n\n emit ListingCancelled(msg.sender, nftAddress, tokenId);\n }\n\n // Buy NFT\n function buyNFT(address nftAddress, uint256 tokenId) external payable nonReentrant {\n Listing memory listing = listings[nftAddress][tokenId];\n\n require(listing.price > 0, \"Not Listed\");\n require(msg.value >= listing.price, \"Insufficient payment\");\n\n // Calculate fee and seller cut \n uint256 fee = (msg.value * feePercentage) / 1000;\n uint256 sellerProceeds = msg.value - fee;\n\n // Remove listing to prevent reentrancy\n delete listings[nftAddress][tokenId];\n\n // Transfer NFT to buyer\n IERC721(nftAddress).transferFrom(address(this), msg.sender, tokenId);\n\n // Transfer funds to treasury\n (bool feeSuccess, ) = treasury.call{value: fee}(\"\");\n require(feeSuccess, \"Treasury transfer failed\");\n\n // Transfer remaining funds to seller\n (bool sellerSuccesss, ) = payable(listing.seller).call{value: sellerProceeds}(\"\");\n require(sellerSuccesss, \"Seller transfer failed\");\n\n emit ItemBought(msg.sender, nftAddress, tokenId, listing.price);\n }\n}" + } + } + } +} \ No newline at end of file diff --git a/erc20/ignition/deployments/chain-11155111/deployed_addresses.json b/erc20/ignition/deployments/chain-11155111/deployed_addresses.json new file mode 100644 index 00000000..a5dff7b8 --- /dev/null +++ b/erc20/ignition/deployments/chain-11155111/deployed_addresses.json @@ -0,0 +1,3 @@ +{ + "NFTMarketplaceModule#NFTmarketplace": "0x5974F3d3f8518ef4DF49F22A5464a54997d262DB" +} \ No newline at end of file diff --git a/erc20/ignition/deployments/chain-11155111/journal.jsonl b/erc20/ignition/deployments/chain-11155111/journal.jsonl new file mode 100644 index 00000000..4f6c1430 --- /dev/null +++ b/erc20/ignition/deployments/chain-11155111/journal.jsonl @@ -0,0 +1,8 @@ + +{"chainId":11155111,"type":"DEPLOYMENT_INITIALIZE"} +{"artifactId":"NFTMarketplaceModule#NFTmarketplace","constructorArgs":["0x32e431575062f115be156a19C13bA4aa29d44065"],"contractName":"NFTmarketplace","dependencies":[],"from":"0x32e431575062f115be156a19c13ba4aa29d44065","futureId":"NFTMarketplaceModule#NFTmarketplace","futureType":"NAMED_ARTIFACT_CONTRACT_DEPLOYMENT","libraries":{},"strategy":"basic","strategyConfig":{},"type":"DEPLOYMENT_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"NFTMarketplaceModule#NFTmarketplace","networkInteraction":{"data":"0x6080604052348015600e575f5ffd5b50604051610ca1380380610ca1833981016040819052602b916064565b60018054336001600160a01b0319918216178255600280549091166001600160a01b03939093169290921790915560196003555f55608f565b5f602082840312156073575f5ffd5b81516001600160a01b03811681146088575f5ffd5b9392505050565b610c058061009c5f395ff3fe608060405260043610610078575f3560e01c8063a82ba76f1161004c578063a82ba76f14610162578063ad05f1b414610177578063ae06c1b714610196578063b2ddee06146101b5575f5ffd5b806207df301461007c57806361d027b3146100e95780638da5cb5b14610120578063a001ecdd1461013f575b5f5ffd5b348015610087575f5ffd5b506100c5610096366004610ab8565b600460209081525f9283526040808420909152908252902080546001909101546001600160a01b039091169082565b604080516001600160a01b0390931683526020830191909152015b60405180910390f35b3480156100f4575f5ffd5b50600254610108906001600160a01b031681565b6040516001600160a01b0390911681526020016100e0565b34801561012b575f5ffd5b50600154610108906001600160a01b031681565b34801561014a575f5ffd5b5061015460035481565b6040519081526020016100e0565b610175610170366004610ab8565b6101d4565b005b348015610182575f5ffd5b50610175610191366004610ae2565b610546565b3480156101a1575f5ffd5b506101756101b0366004610b14565b61085b565b3480156101c0575f5ffd5b506101756101cf366004610ab8565b6108ba565b60025f540361022a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60025f9081556001600160a01b0380841682526004602090815260408084208585528252928390208351808501909452805490921683526001909101549082018190526102a65760405162461bcd60e51b815260206004820152600a602482015269139bdd08131a5cdd195960b21b6044820152606401610221565b80602001513410156102f15760405162461bcd60e51b8152602060048201526014602482015273125b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606401610221565b5f6103e8600354346103039190610b3f565b61030d9190610b5c565b90505f61031a8234610b7b565b6001600160a01b0386165f8181526004602081815260408084208a855290915280832080546001600160a01b03191681556001019290925590516323b872dd60e01b8152309181019190915233602482015260448101879052919250906323b872dd906064015f604051808303815f87803b158015610397575f5ffd5b505af11580156103a9573d5f5f3e3d5ffd5b50506002546040515f93506001600160a01b03909116915084908381818185875af1925050503d805f81146103f9576040519150601f19603f3d011682016040523d82523d5f602084013e6103fe565b606091505b505090508061044f5760405162461bcd60e51b815260206004820152601860248201527f5472656173757279207472616e73666572206661696c656400000000000000006044820152606401610221565b83516040515f916001600160a01b03169084908381818185875af1925050503d805f8114610498576040519150601f19603f3d011682016040523d82523d5f602084013e61049d565b606091505b50509050806104e75760405162461bcd60e51b815260206004820152601660248201527514d95b1b195c881d1c985b9cd9995c8819985a5b195960521b6044820152606401610221565b85876001600160a01b0316336001600160a01b03167f263223b1dd81e51054a4e6f791d45a4a1ddb4aadcd93a2dfd892615c3fdac187886020015160405161053191815260200190565b60405180910390a4505060015f555050505050565b5f81116105895760405162461bcd60e51b815260206004820152601160248201527005072696365206d757374206265203e203607c1b6044820152606401610221565b6040516331a9108f60e11b815260048101839052839033906001600160a01b03831690636352211e90602401602060405180830381865afa1580156105d0573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105f49190610b8e565b6001600160a01b03161461063a5760405162461bcd60e51b815260206004820152600d60248201526c2737ba103a34329037bbb732b960991b6044820152606401610221565b60405163020604bf60e21b81526004810184905230906001600160a01b0383169063081812fc90602401602060405180830381865afa15801561067f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106a39190610b8e565b6001600160a01b0316148061071f575060405163e985e9c560e01b81523360048201523060248201526001600160a01b0382169063e985e9c590604401602060405180830381865afa1580156106fb573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061071f9190610bb0565b61076b5760405162461bcd60e51b815260206004820152601860248201527f4d61726b6574706c616365206e6f7420617070726f76656400000000000000006044820152606401610221565b6040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b038216906323b872dd906064015f604051808303815f87803b1580156107b6575f5ffd5b505af11580156107c8573d5f5f3e3d5ffd5b50506040805180820182523380825260208083018881526001600160a01b038b81165f818152600485528781208d82528552879020955186546001600160a01b031916921691909117855590516001909401939093559251878152889550919350917fd547e933094f12a9159076970143ebe73234e64480317844b0dcb36117116de4910160405180910390a450505050565b6001546001600160a01b031633146108b55760405162461bcd60e51b815260206004820152601860248201527f4f6e6c79206f776e65722063616e2063616c6c207468697300000000000000006044820152606401610221565b600355565b60025f540361090b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610221565b60025f9081556001600160a01b0380841682526004602090815260408084208585528252928390208351808501909452805490921683526001909101549082018190526109875760405162461bcd60e51b815260206004820152600a602482015269139bdd08131a5cdd195960b21b6044820152606401610221565b80516001600160a01b031633146109d25760405162461bcd60e51b815260206004820152600f60248201526e2737ba103a34329039b2b63632b2b960891b6044820152606401610221565b6001600160a01b0383165f81815260046020818152604080842087855290915280832080546001600160a01b03191681556001019290925590516323b872dd60e01b81523091810191909152336024820152604481018490526323b872dd906064015f604051808303815f87803b158015610a4b575f5ffd5b505af1158015610a5d573d5f5f3e3d5ffd5b50506040518492506001600160a01b038616915033907fe1bfe61cb157e0896411ccf9a5c40e4c346f7bb6e1d2a44de4a724f0cb5c6fb0905f90a4505060015f5550565b6001600160a01b0381168114610ab5575f5ffd5b50565b5f5f60408385031215610ac9575f5ffd5b8235610ad481610aa1565b946020939093013593505050565b5f5f5f60608486031215610af4575f5ffd5b8335610aff81610aa1565b95602085013595506040909401359392505050565b5f60208284031215610b24575f5ffd5b5035919050565b634e487b7160e01b5f52601160045260245ffd5b8082028115828204841417610b5657610b56610b2b565b92915050565b5f82610b7657634e487b7160e01b5f52601260045260245ffd5b500490565b81810381811115610b5657610b56610b2b565b5f60208284031215610b9e575f5ffd5b8151610ba981610aa1565b9392505050565b5f60208284031215610bc0575f5ffd5b81518015158114610ba9575f5ffdfea264697066735822122059d1e3d09a9869ebc9e8498e7c86c11a66434b97439d1ea892b2e02357df1d9364736f6c634300081c003300000000000000000000000032e431575062f115be156a19c13ba4aa29d44065","id":1,"type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"NFTMarketplaceModule#NFTmarketplace","networkInteractionId":1,"nonce":37,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"NFTMarketplaceModule#NFTmarketplace","networkInteractionId":1,"nonce":37,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"1000026"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"1000000"}},"hash":"0xf55adcddc6f29fb06f46117ad208b76ee6940878ecfba87a5f85026d66ecbb43"},"type":"TRANSACTION_SEND"} +{"futureId":"NFTMarketplaceModule#NFTmarketplace","hash":"0xf55adcddc6f29fb06f46117ad208b76ee6940878ecfba87a5f85026d66ecbb43","networkInteractionId":1,"receipt":{"blockHash":"0x32f4dfffede6b47583a46bb6a0b4b6821f414601f9d1c090308c4c06ee86d264","blockNumber":10318951,"contractAddress":"0x5974F3d3f8518ef4DF49F22A5464a54997d262DB","logs":[],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"NFTMarketplaceModule#NFTmarketplace","result":{"address":"0x5974F3d3f8518ef4DF49F22A5464a54997d262DB","type":"SUCCESS"},"type":"DEPLOYMENT_EXECUTION_STATE_COMPLETE"} \ No newline at end of file diff --git a/erc20/ignition/modules/Counter.ts b/erc20/ignition/modules/Counter.ts new file mode 100644 index 00000000..042e61c8 --- /dev/null +++ b/erc20/ignition/modules/Counter.ts @@ -0,0 +1,9 @@ +import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; + +export default buildModule("CounterModule", (m) => { + const counter = m.contract("Counter"); + + m.call(counter, "incBy", [5n]); + + return { counter }; +}); diff --git a/erc20/ignition/modules/ERC20.ts b/erc20/ignition/modules/ERC20.ts new file mode 100644 index 00000000..38213172 --- /dev/null +++ b/erc20/ignition/modules/ERC20.ts @@ -0,0 +1,6 @@ +import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; + +export default buildModule('ERC20Module', (m) => { + const erc20 = m.contract('ERC20', ['LONER', 'LNR', 6, 2000000000]) + return {erc20} +}) \ No newline at end of file diff --git a/erc20/ignition/modules/ERC721.ts b/erc20/ignition/modules/ERC721.ts new file mode 100644 index 00000000..6e457488 --- /dev/null +++ b/erc20/ignition/modules/ERC721.ts @@ -0,0 +1,11 @@ +import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; + +export default buildModule("ERC721Module", (m) => { + const erc721 = m.contract("ERC721", [ + "DEFI-WOMAN", + "WIDNFT", + "ipfs://bafkreih4myeqd4jpuxj2lv7aqdyayvfvj2wa25yus52jnq7nnge5vacmti/" + ]); + + return { erc721 }; +}); \ No newline at end of file diff --git a/erc20/ignition/modules/NFTmarketplace.ts b/erc20/ignition/modules/NFTmarketplace.ts new file mode 100644 index 00000000..e1e0fcba --- /dev/null +++ b/erc20/ignition/modules/NFTmarketplace.ts @@ -0,0 +1,11 @@ +import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; + +export default buildModule("NFTMarketplaceModule", (m) => { + // This is your wallet address. It will act as the "treasury" to collect the 2.5% fees. + const treasuryAddress = "0x32e431575062f115be156a19C13bA4aa29d44065"; + + // Deploy the contract and pass the treasury address to the constructor + const marketplace = m.contract("NFTmarketplace", [treasuryAddress]); + + return { marketplace }; +}); \ No newline at end of file diff --git a/erc20/package.json b/erc20/package.json new file mode 100644 index 00000000..cefb1a42 --- /dev/null +++ b/erc20/package.json @@ -0,0 +1,20 @@ +{ + "name": "erc20", + "version": "1.0.0", + "type": "module", + "devDependencies": { + "@nomicfoundation/hardhat-ethers": "^4.0.4", + "@nomicfoundation/hardhat-ignition": "^3.0.7", + "@nomicfoundation/hardhat-toolbox-mocha-ethers": "^3.0.2", + "@types/chai": "^4.3.20", + "@types/chai-as-promised": "^8.0.2", + "@types/mocha": "^10.0.10", + "@types/node": "^22.19.11", + "chai": "^5.3.3", + "ethers": "^6.16.0", + "forge-std": "github:foundry-rs/forge-std#v1.9.4", + "hardhat": "^3.1.8", + "mocha": "^11.7.5", + "typescript": "~5.8.0" + } +} diff --git a/erc20/scripts/mint.ts b/erc20/scripts/mint.ts new file mode 100644 index 00000000..7b7d07a9 --- /dev/null +++ b/erc20/scripts/mint.ts @@ -0,0 +1,36 @@ +import { ethers } from "ethers"; + +async function main() { + // 1. Connect directly to the Sepolia RPC + const provider = new ethers.JsonRpcProvider("https://ethereum-sepolia-rpc.publicnode.com"); + + // 2. Connect your wallet using the private key from your config comments + const privateKey = "7e318ba7f9c52530342d2ae81ccb02da9156d4c49121d541ac8de41d0d6ce619"; + const wallet = new ethers.Wallet(privateKey, provider); + + console.log(`Wallet connected: ${wallet.address}`); + + // 3. Connect to your deployed contract + const contractAddress = "0xe4f44FCB12bfe1996163106177c44FA64560A9Ff"; + + // We only need the ABI for the mint function to interact with it + const abi = [ + "function mint(address to, uint256 tokenId) external" + ]; + const erc721 = new ethers.Contract(contractAddress, abi, wallet); + + // 4. Execute the mint transaction! + console.log("Sending mint transaction for Token #1..."); + const tx = await erc721.mint(wallet.address, 1); + + console.log(`Transaction sent! Hash: ${tx.hash}`); + console.log("Waiting for block confirmation..."); + + await tx.wait(); + console.log("✅ Minted Token 1 successfully!"); +} + +main().catch((error) => { + console.error(error); + process.exitCode = 1; +}); \ No newline at end of file diff --git a/erc20/scripts/send-op-tx.ts b/erc20/scripts/send-op-tx.ts new file mode 100644 index 00000000..c10a2360 --- /dev/null +++ b/erc20/scripts/send-op-tx.ts @@ -0,0 +1,22 @@ +import { network } from "hardhat"; + +const { ethers } = await network.connect({ + network: "hardhatOp", + chainType: "op", +}); + +console.log("Sending transaction using the OP chain type"); + +const [sender] = await ethers.getSigners(); + +console.log("Sending 1 wei from", sender.address, "to itself"); + +console.log("Sending L2 transaction"); +const tx = await sender.sendTransaction({ + to: sender.address, + value: 1n, +}); + +await tx.wait(); + +console.log("Transaction sent successfully"); diff --git a/erc20/test/Counter.ts b/erc20/test/Counter.ts new file mode 100644 index 00000000..f8c38986 --- /dev/null +++ b/erc20/test/Counter.ts @@ -0,0 +1,36 @@ +import { expect } from "chai"; +import { network } from "hardhat"; + +const { ethers } = await network.connect(); + +describe("Counter", function () { + it("Should emit the Increment event when calling the inc() function", async function () { + const counter = await ethers.deployContract("Counter"); + + await expect(counter.inc()).to.emit(counter, "Increment").withArgs(1n); + }); + + it("The sum of the Increment events should match the current value", async function () { + const counter = await ethers.deployContract("Counter"); + const deploymentBlockNumber = await ethers.provider.getBlockNumber(); + + // run a series of increments + for (let i = 1; i <= 10; i++) { + await counter.incBy(i); + } + + const events = await counter.queryFilter( + counter.filters.Increment(), + deploymentBlockNumber, + "latest", + ); + + // check that the aggregated events match the current value + let total = 0n; + for (const event of events) { + total += event.args.by; + } + + expect(await counter.x()).to.equal(total); + }); +}); diff --git a/erc20/tsconfig.json b/erc20/tsconfig.json new file mode 100644 index 00000000..9b1380cc --- /dev/null +++ b/erc20/tsconfig.json @@ -0,0 +1,13 @@ +/* Based on https://github.com/tsconfig/bases/blob/501da2bcd640cf95c95805783e1012b992338f28/bases/node22.json */ +{ + "compilerOptions": { + "lib": ["es2023"], + "module": "node16", + "target": "es2022", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "moduleResolution": "node16", + "outDir": "dist" + } +} diff --git a/erc20/types/ethers-contracts/Counter.ts b/erc20/types/ethers-contracts/Counter.ts new file mode 100644 index 00000000..b34567ad --- /dev/null +++ b/erc20/types/ethers-contracts/Counter.ts @@ -0,0 +1,119 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "./common.js" + + + export interface CounterInterface extends Interface { + getFunction(nameOrSignature: "inc" | "incBy" | "x"): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Increment"): EventFragment; + + encodeFunctionData(functionFragment: 'inc', values?: undefined): string; +encodeFunctionData(functionFragment: 'incBy', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'x', values?: undefined): string; + + decodeFunctionResult(functionFragment: 'inc', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'incBy', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'x', data: BytesLike): Result; + } + + + export namespace IncrementEvent { + export type InputTuple = [by: BigNumberish]; + export type OutputTuple = [by: bigint]; + export interface OutputObject {by: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export interface Counter extends BaseContract { + + connect(runner?: ContractRunner | null): Counter; + waitForDeployment(): Promise; + + interface: CounterInterface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + inc: TypedContractMethod< + [], + [void], + 'nonpayable' + > + + + + incBy: TypedContractMethod< + [by: BigNumberish, ], + [void], + 'nonpayable' + > + + + + x: TypedContractMethod< + [], + [bigint], + 'view' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'inc'): TypedContractMethod< + [], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'incBy'): TypedContractMethod< + [by: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'x'): TypedContractMethod< + [], + [bigint], + 'view' + >; + + getEvent(key: 'Increment'): TypedContractEvent; + + filters: { + + 'Increment(uint256)': TypedContractEvent; + Increment: TypedContractEvent; + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/ERC20.ts b/erc20/types/ethers-contracts/ERC20.ts new file mode 100644 index 00000000..2dc87880 --- /dev/null +++ b/erc20/types/ethers-contracts/ERC20.ts @@ -0,0 +1,241 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "./common.js" + + + export interface ERC20Interface extends Interface { + getFunction(nameOrSignature: "allowance" | "approve" | "balanceOf" | "decimals" | "mint" | "name" | "symbol" | "totalSupply" | "transfer" | "transferFrom"): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + + encodeFunctionData(functionFragment: 'allowance', values: [AddressLike, AddressLike]): string; +encodeFunctionData(functionFragment: 'approve', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'balanceOf', values: [AddressLike]): string; +encodeFunctionData(functionFragment: 'decimals', values?: undefined): string; +encodeFunctionData(functionFragment: 'mint', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'name', values?: undefined): string; +encodeFunctionData(functionFragment: 'symbol', values?: undefined): string; +encodeFunctionData(functionFragment: 'totalSupply', values?: undefined): string; +encodeFunctionData(functionFragment: 'transfer', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'transferFrom', values: [AddressLike, AddressLike, BigNumberish]): string; + + decodeFunctionResult(functionFragment: 'allowance', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'decimals', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'mint', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'symbol', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'totalSupply', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'transfer', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'transferFrom', data: BytesLike): Result; + } + + + export namespace ApprovalEvent { + export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject {owner: string, spender: string, value: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace TransferEvent { + export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; + export type OutputTuple = [from: string, to: string, value: bigint]; + export interface OutputObject {from: string, to: string, value: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export interface ERC20 extends BaseContract { + + connect(runner?: ContractRunner | null): ERC20; + waitForDeployment(): Promise; + + interface: ERC20Interface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike, ], + [bigint], + 'view' + > + + + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish, ], + [boolean], + 'nonpayable' + > + + + + balanceOf: TypedContractMethod< + [account: AddressLike, ], + [bigint], + 'view' + > + + + + decimals: TypedContractMethod< + [], + [bigint], + 'view' + > + + + + mint: TypedContractMethod< + [amount: BigNumberish, ], + [boolean], + 'nonpayable' + > + + + + name: TypedContractMethod< + [], + [string], + 'view' + > + + + + symbol: TypedContractMethod< + [], + [string], + 'view' + > + + + + totalSupply: TypedContractMethod< + [], + [bigint], + 'view' + > + + + + transfer: TypedContractMethod< + [to: AddressLike, amount: BigNumberish, ], + [boolean], + 'nonpayable' + > + + + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, amount: BigNumberish, ], + [boolean], + 'nonpayable' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'allowance'): TypedContractMethod< + [owner: AddressLike, spender: AddressLike, ], + [bigint], + 'view' + >; +getFunction(nameOrSignature: 'approve'): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish, ], + [boolean], + 'nonpayable' + >; +getFunction(nameOrSignature: 'balanceOf'): TypedContractMethod< + [account: AddressLike, ], + [bigint], + 'view' + >; +getFunction(nameOrSignature: 'decimals'): TypedContractMethod< + [], + [bigint], + 'view' + >; +getFunction(nameOrSignature: 'mint'): TypedContractMethod< + [amount: BigNumberish, ], + [boolean], + 'nonpayable' + >; +getFunction(nameOrSignature: 'name'): TypedContractMethod< + [], + [string], + 'view' + >; +getFunction(nameOrSignature: 'symbol'): TypedContractMethod< + [], + [string], + 'view' + >; +getFunction(nameOrSignature: 'totalSupply'): TypedContractMethod< + [], + [bigint], + 'view' + >; +getFunction(nameOrSignature: 'transfer'): TypedContractMethod< + [to: AddressLike, amount: BigNumberish, ], + [boolean], + 'nonpayable' + >; +getFunction(nameOrSignature: 'transferFrom'): TypedContractMethod< + [from: AddressLike, to: AddressLike, amount: BigNumberish, ], + [boolean], + 'nonpayable' + >; + + getEvent(key: 'Approval'): TypedContractEvent; +getEvent(key: 'Transfer'): TypedContractEvent; + + filters: { + + 'Approval(address,address,uint256)': TypedContractEvent; + Approval: TypedContractEvent; + + + 'Transfer(address,address,uint256)': TypedContractEvent; + Transfer: TypedContractEvent; + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/ERC721.sol/ERC721.ts b/erc20/types/ethers-contracts/ERC721.sol/ERC721.ts new file mode 100644 index 00000000..ad1a242f --- /dev/null +++ b/erc20/types/ethers-contracts/ERC721.sol/ERC721.ts @@ -0,0 +1,318 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "../common.js" + + + export interface ERC721Interface extends Interface { + getFunction(nameOrSignature: "approve" | "balanceOf" | "burn" | "getApproved" | "isApprovedForAll" | "mint" | "name" | "ownerOf" | "setApprovalForAll" | "setBaseURI" | "supportsInterface" | "symbol" | "tokenURI" | "transferFrom"): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "ApprovalForAll" | "Transfer"): EventFragment; + + encodeFunctionData(functionFragment: 'approve', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'balanceOf', values: [AddressLike]): string; +encodeFunctionData(functionFragment: 'burn', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'getApproved', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'isApprovedForAll', values: [AddressLike, AddressLike]): string; +encodeFunctionData(functionFragment: 'mint', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'name', values?: undefined): string; +encodeFunctionData(functionFragment: 'ownerOf', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'setApprovalForAll', values: [AddressLike, boolean]): string; +encodeFunctionData(functionFragment: 'setBaseURI', values: [string]): string; +encodeFunctionData(functionFragment: 'supportsInterface', values: [BytesLike]): string; +encodeFunctionData(functionFragment: 'symbol', values?: undefined): string; +encodeFunctionData(functionFragment: 'tokenURI', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'transferFrom', values: [AddressLike, AddressLike, BigNumberish]): string; + + decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'burn', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'getApproved', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'isApprovedForAll', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'mint', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'ownerOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'setApprovalForAll', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'setBaseURI', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'supportsInterface', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'symbol', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'tokenURI', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'transferFrom', data: BytesLike): Result; + } + + + export namespace ApprovalEvent { + export type InputTuple = [owner: AddressLike, approved: AddressLike, tokenId: BigNumberish]; + export type OutputTuple = [owner: string, approved: string, tokenId: bigint]; + export interface OutputObject {owner: string, approved: string, tokenId: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace ApprovalForAllEvent { + export type InputTuple = [owner: AddressLike, operator: AddressLike, approved: boolean]; + export type OutputTuple = [owner: string, operator: string, approved: boolean]; + export interface OutputObject {owner: string, operator: string, approved: boolean }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace TransferEvent { + export type InputTuple = [from: AddressLike, to: AddressLike, tokenId: BigNumberish]; + export type OutputTuple = [from: string, to: string, tokenId: bigint]; + export interface OutputObject {from: string, to: string, tokenId: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export interface ERC721 extends BaseContract { + + connect(runner?: ContractRunner | null): ERC721; + waitForDeployment(): Promise; + + interface: ERC721Interface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + approve: TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + balanceOf: TypedContractMethod< + [owner: AddressLike, ], + [bigint], + 'view' + > + + + + burn: TypedContractMethod< + [tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + getApproved: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + isApprovedForAll: TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + > + + + + mint: TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + name: TypedContractMethod< + [], + [string], + 'view' + > + + + + ownerOf: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + setApprovalForAll: TypedContractMethod< + [operator: AddressLike, approved: boolean, ], + [void], + 'nonpayable' + > + + + + setBaseURI: TypedContractMethod< + [newBaseURI: string, ], + [void], + 'nonpayable' + > + + + + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike, ], + [boolean], + 'view' + > + + + + symbol: TypedContractMethod< + [], + [string], + 'view' + > + + + + tokenURI: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'approve'): TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'balanceOf'): TypedContractMethod< + [owner: AddressLike, ], + [bigint], + 'view' + >; +getFunction(nameOrSignature: 'burn'): TypedContractMethod< + [tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'getApproved'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'isApprovedForAll'): TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + >; +getFunction(nameOrSignature: 'mint'): TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'name'): TypedContractMethod< + [], + [string], + 'view' + >; +getFunction(nameOrSignature: 'ownerOf'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'setApprovalForAll'): TypedContractMethod< + [operator: AddressLike, approved: boolean, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'setBaseURI'): TypedContractMethod< + [newBaseURI: string, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'supportsInterface'): TypedContractMethod< + [interfaceId: BytesLike, ], + [boolean], + 'view' + >; +getFunction(nameOrSignature: 'symbol'): TypedContractMethod< + [], + [string], + 'view' + >; +getFunction(nameOrSignature: 'tokenURI'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'transferFrom'): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; + + getEvent(key: 'Approval'): TypedContractEvent; +getEvent(key: 'ApprovalForAll'): TypedContractEvent; +getEvent(key: 'Transfer'): TypedContractEvent; + + filters: { + + 'Approval(address,address,uint256)': TypedContractEvent; + Approval: TypedContractEvent; + + + 'ApprovalForAll(address,address,bool)': TypedContractEvent; + ApprovalForAll: TypedContractEvent; + + + 'Transfer(address,address,uint256)': TypedContractEvent; + Transfer: TypedContractEvent; + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/ERC721.sol/IER721Metadata.ts b/erc20/types/ethers-contracts/ERC721.sol/IER721Metadata.ts new file mode 100644 index 00000000..ba14d2b2 --- /dev/null +++ b/erc20/types/ethers-contracts/ERC721.sol/IER721Metadata.ts @@ -0,0 +1,303 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "../common.js" + + + export interface IER721MetadataInterface extends Interface { + getFunction(nameOrSignature: "approve" | "balanceOf" | "getAproved" | "isApprovedForAll" | "name" | "ownerOf" | "safeTransferFrom(address,address,uint256)" | "safeTransferFrom(address,address,uint256,bytes)" | "setApprovalForAll" | "supportsInterface" | "symbol" | "tokenURI" | "transferFrom"): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "ApprovalForAll" | "Transfer"): EventFragment; + + encodeFunctionData(functionFragment: 'approve', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'balanceOf', values: [AddressLike]): string; +encodeFunctionData(functionFragment: 'getAproved', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'isApprovedForAll', values: [AddressLike, AddressLike]): string; +encodeFunctionData(functionFragment: 'name', values?: undefined): string; +encodeFunctionData(functionFragment: 'ownerOf', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'safeTransferFrom(address,address,uint256)', values: [AddressLike, AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'safeTransferFrom(address,address,uint256,bytes)', values: [AddressLike, AddressLike, BigNumberish, BytesLike]): string; +encodeFunctionData(functionFragment: 'setApprovalForAll', values: [AddressLike, boolean]): string; +encodeFunctionData(functionFragment: 'supportsInterface', values: [BytesLike]): string; +encodeFunctionData(functionFragment: 'symbol', values?: undefined): string; +encodeFunctionData(functionFragment: 'tokenURI', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'transferFrom', values: [AddressLike, AddressLike, BigNumberish]): string; + + decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'getAproved', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'isApprovedForAll', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'ownerOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'safeTransferFrom(address,address,uint256)', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'safeTransferFrom(address,address,uint256,bytes)', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'setApprovalForAll', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'supportsInterface', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'symbol', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'tokenURI', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'transferFrom', data: BytesLike): Result; + } + + + export namespace ApprovalEvent { + export type InputTuple = [owner: AddressLike, approved: AddressLike, tokenId: BigNumberish]; + export type OutputTuple = [owner: string, approved: string, tokenId: bigint]; + export interface OutputObject {owner: string, approved: string, tokenId: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace ApprovalForAllEvent { + export type InputTuple = [owner: AddressLike, operator: AddressLike, approved: boolean]; + export type OutputTuple = [owner: string, operator: string, approved: boolean]; + export interface OutputObject {owner: string, operator: string, approved: boolean }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace TransferEvent { + export type InputTuple = [from: AddressLike, to: AddressLike, tokenID: BigNumberish]; + export type OutputTuple = [from: string, to: string, tokenID: bigint]; + export interface OutputObject {from: string, to: string, tokenID: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export interface IER721Metadata extends BaseContract { + + connect(runner?: ContractRunner | null): IER721Metadata; + waitForDeployment(): Promise; + + interface: IER721MetadataInterface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + approve: TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + balanceOf: TypedContractMethod< + [owner: AddressLike, ], + [bigint], + 'view' + > + + + + getAproved: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + isApprovedForAll: TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + > + + + + name: TypedContractMethod< + [], + [string], + 'view' + > + + + + ownerOf: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + "safeTransferFrom(address,address,uint256)": TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + "safeTransferFrom(address,address,uint256,bytes)": TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, data: BytesLike, ], + [void], + 'nonpayable' + > + + + + setApprovalForAll: TypedContractMethod< + [operator: AddressLike, approved: boolean, ], + [void], + 'nonpayable' + > + + + + supportsInterface: TypedContractMethod< + [interfaceID: BytesLike, ], + [boolean], + 'view' + > + + + + symbol: TypedContractMethod< + [], + [string], + 'view' + > + + + + tokenURI: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'approve'): TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'balanceOf'): TypedContractMethod< + [owner: AddressLike, ], + [bigint], + 'view' + >; +getFunction(nameOrSignature: 'getAproved'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'isApprovedForAll'): TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + >; +getFunction(nameOrSignature: 'name'): TypedContractMethod< + [], + [string], + 'view' + >; +getFunction(nameOrSignature: 'ownerOf'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'safeTransferFrom(address,address,uint256)'): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'safeTransferFrom(address,address,uint256,bytes)'): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, data: BytesLike, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'setApprovalForAll'): TypedContractMethod< + [operator: AddressLike, approved: boolean, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'supportsInterface'): TypedContractMethod< + [interfaceID: BytesLike, ], + [boolean], + 'view' + >; +getFunction(nameOrSignature: 'symbol'): TypedContractMethod< + [], + [string], + 'view' + >; +getFunction(nameOrSignature: 'tokenURI'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'transferFrom'): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; + + getEvent(key: 'Approval'): TypedContractEvent; +getEvent(key: 'ApprovalForAll'): TypedContractEvent; +getEvent(key: 'Transfer'): TypedContractEvent; + + filters: { + + 'Approval(address,address,uint256)': TypedContractEvent; + Approval: TypedContractEvent; + + + 'ApprovalForAll(address,address,bool)': TypedContractEvent; + ApprovalForAll: TypedContractEvent; + + + 'Transfer(address,address,uint256)': TypedContractEvent; + Transfer: TypedContractEvent; + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/ERC721.sol/IERC165.ts b/erc20/types/ethers-contracts/ERC721.sol/IERC165.ts new file mode 100644 index 00000000..fde6e81f --- /dev/null +++ b/erc20/types/ethers-contracts/ERC721.sol/IERC165.ts @@ -0,0 +1,75 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BytesLike, FunctionFragment, Result, Interface, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener, TypedContractMethod } from "../common.js" + + + export interface IERC165Interface extends Interface { + getFunction(nameOrSignature: "supportsInterface"): FunctionFragment; + + + + encodeFunctionData(functionFragment: 'supportsInterface', values: [BytesLike]): string; + + decodeFunctionResult(functionFragment: 'supportsInterface', data: BytesLike): Result; + } + + + + export interface IERC165 extends BaseContract { + + connect(runner?: ContractRunner | null): IERC165; + waitForDeployment(): Promise; + + interface: IERC165Interface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike, ], + [boolean], + 'view' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'supportsInterface'): TypedContractMethod< + [interfaceId: BytesLike, ], + [boolean], + 'view' + >; + + + + filters: { + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/ERC721.sol/IERC721.ts b/erc20/types/ethers-contracts/ERC721.sol/IERC721.ts new file mode 100644 index 00000000..afd82d6e --- /dev/null +++ b/erc20/types/ethers-contracts/ERC721.sol/IERC721.ts @@ -0,0 +1,228 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "../common.js" + + + export interface IERC721Interface extends Interface { + getFunction(nameOrSignature: "approve" | "balanceOf" | "getApproved" | "isApprovedForAll" | "ownerOf" | "setApprovalForAll" | "supportsInterface" | "transferFrom"): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "ApprovalForAll" | "Transfer"): EventFragment; + + encodeFunctionData(functionFragment: 'approve', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'balanceOf', values: [AddressLike]): string; +encodeFunctionData(functionFragment: 'getApproved', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'isApprovedForAll', values: [AddressLike, AddressLike]): string; +encodeFunctionData(functionFragment: 'ownerOf', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'setApprovalForAll', values: [AddressLike, boolean]): string; +encodeFunctionData(functionFragment: 'supportsInterface', values: [BytesLike]): string; +encodeFunctionData(functionFragment: 'transferFrom', values: [AddressLike, AddressLike, BigNumberish]): string; + + decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'getApproved', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'isApprovedForAll', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'ownerOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'setApprovalForAll', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'supportsInterface', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'transferFrom', data: BytesLike): Result; + } + + + export namespace ApprovalEvent { + export type InputTuple = [owner: AddressLike, approved: AddressLike, tokenId: BigNumberish]; + export type OutputTuple = [owner: string, approved: string, tokenId: bigint]; + export interface OutputObject {owner: string, approved: string, tokenId: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace ApprovalForAllEvent { + export type InputTuple = [owner: AddressLike, operator: AddressLike, approved: boolean]; + export type OutputTuple = [owner: string, operator: string, approved: boolean]; + export interface OutputObject {owner: string, operator: string, approved: boolean }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace TransferEvent { + export type InputTuple = [from: AddressLike, to: AddressLike, tokenId: BigNumberish]; + export type OutputTuple = [from: string, to: string, tokenId: bigint]; + export interface OutputObject {from: string, to: string, tokenId: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export interface IERC721 extends BaseContract { + + connect(runner?: ContractRunner | null): IERC721; + waitForDeployment(): Promise; + + interface: IERC721Interface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + approve: TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + balanceOf: TypedContractMethod< + [owner: AddressLike, ], + [bigint], + 'view' + > + + + + getApproved: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + isApprovedForAll: TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + > + + + + ownerOf: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + setApprovalForAll: TypedContractMethod< + [operator: AddressLike, approved: boolean, ], + [void], + 'nonpayable' + > + + + + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike, ], + [boolean], + 'view' + > + + + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'approve'): TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'balanceOf'): TypedContractMethod< + [owner: AddressLike, ], + [bigint], + 'view' + >; +getFunction(nameOrSignature: 'getApproved'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'isApprovedForAll'): TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + >; +getFunction(nameOrSignature: 'ownerOf'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'setApprovalForAll'): TypedContractMethod< + [operator: AddressLike, approved: boolean, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'supportsInterface'): TypedContractMethod< + [interfaceId: BytesLike, ], + [boolean], + 'view' + >; +getFunction(nameOrSignature: 'transferFrom'): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; + + getEvent(key: 'Approval'): TypedContractEvent; +getEvent(key: 'ApprovalForAll'): TypedContractEvent; +getEvent(key: 'Transfer'): TypedContractEvent; + + filters: { + + 'Approval(address,address,uint256)': TypedContractEvent; + Approval: TypedContractEvent; + + + 'ApprovalForAll(address,address,bool)': TypedContractEvent; + ApprovalForAll: TypedContractEvent; + + + 'Transfer(address,address,uint256)': TypedContractEvent; + Transfer: TypedContractEvent; + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/ERC721.sol/IERC721Metadata.ts b/erc20/types/ethers-contracts/ERC721.sol/IERC721Metadata.ts new file mode 100644 index 00000000..6fd51494 --- /dev/null +++ b/erc20/types/ethers-contracts/ERC721.sol/IERC721Metadata.ts @@ -0,0 +1,273 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "../common.js" + + + export interface IERC721MetadataInterface extends Interface { + getFunction(nameOrSignature: "approve" | "balanceOf" | "getApproved" | "isApprovedForAll" | "name" | "ownerOf" | "setApprovalForAll" | "supportsInterface" | "symbol" | "tokenURI" | "transferFrom"): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "ApprovalForAll" | "Transfer"): EventFragment; + + encodeFunctionData(functionFragment: 'approve', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'balanceOf', values: [AddressLike]): string; +encodeFunctionData(functionFragment: 'getApproved', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'isApprovedForAll', values: [AddressLike, AddressLike]): string; +encodeFunctionData(functionFragment: 'name', values?: undefined): string; +encodeFunctionData(functionFragment: 'ownerOf', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'setApprovalForAll', values: [AddressLike, boolean]): string; +encodeFunctionData(functionFragment: 'supportsInterface', values: [BytesLike]): string; +encodeFunctionData(functionFragment: 'symbol', values?: undefined): string; +encodeFunctionData(functionFragment: 'tokenURI', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'transferFrom', values: [AddressLike, AddressLike, BigNumberish]): string; + + decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'getApproved', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'isApprovedForAll', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'ownerOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'setApprovalForAll', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'supportsInterface', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'symbol', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'tokenURI', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'transferFrom', data: BytesLike): Result; + } + + + export namespace ApprovalEvent { + export type InputTuple = [owner: AddressLike, approved: AddressLike, tokenId: BigNumberish]; + export type OutputTuple = [owner: string, approved: string, tokenId: bigint]; + export interface OutputObject {owner: string, approved: string, tokenId: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace ApprovalForAllEvent { + export type InputTuple = [owner: AddressLike, operator: AddressLike, approved: boolean]; + export type OutputTuple = [owner: string, operator: string, approved: boolean]; + export interface OutputObject {owner: string, operator: string, approved: boolean }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace TransferEvent { + export type InputTuple = [from: AddressLike, to: AddressLike, tokenId: BigNumberish]; + export type OutputTuple = [from: string, to: string, tokenId: bigint]; + export interface OutputObject {from: string, to: string, tokenId: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export interface IERC721Metadata extends BaseContract { + + connect(runner?: ContractRunner | null): IERC721Metadata; + waitForDeployment(): Promise; + + interface: IERC721MetadataInterface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + approve: TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + balanceOf: TypedContractMethod< + [owner: AddressLike, ], + [bigint], + 'view' + > + + + + getApproved: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + isApprovedForAll: TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + > + + + + name: TypedContractMethod< + [], + [string], + 'view' + > + + + + ownerOf: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + setApprovalForAll: TypedContractMethod< + [operator: AddressLike, approved: boolean, ], + [void], + 'nonpayable' + > + + + + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike, ], + [boolean], + 'view' + > + + + + symbol: TypedContractMethod< + [], + [string], + 'view' + > + + + + tokenURI: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'approve'): TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'balanceOf'): TypedContractMethod< + [owner: AddressLike, ], + [bigint], + 'view' + >; +getFunction(nameOrSignature: 'getApproved'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'isApprovedForAll'): TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + >; +getFunction(nameOrSignature: 'name'): TypedContractMethod< + [], + [string], + 'view' + >; +getFunction(nameOrSignature: 'ownerOf'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'setApprovalForAll'): TypedContractMethod< + [operator: AddressLike, approved: boolean, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'supportsInterface'): TypedContractMethod< + [interfaceId: BytesLike, ], + [boolean], + 'view' + >; +getFunction(nameOrSignature: 'symbol'): TypedContractMethod< + [], + [string], + 'view' + >; +getFunction(nameOrSignature: 'tokenURI'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'transferFrom'): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; + + getEvent(key: 'Approval'): TypedContractEvent; +getEvent(key: 'ApprovalForAll'): TypedContractEvent; +getEvent(key: 'Transfer'): TypedContractEvent; + + filters: { + + 'Approval(address,address,uint256)': TypedContractEvent; + Approval: TypedContractEvent; + + + 'ApprovalForAll(address,address,bool)': TypedContractEvent; + ApprovalForAll: TypedContractEvent; + + + 'Transfer(address,address,uint256)': TypedContractEvent; + Transfer: TypedContractEvent; + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/ERC721.sol/IERC721Receiver.ts b/erc20/types/ethers-contracts/ERC721.sol/IERC721Receiver.ts new file mode 100644 index 00000000..7286b310 --- /dev/null +++ b/erc20/types/ethers-contracts/ERC721.sol/IERC721Receiver.ts @@ -0,0 +1,75 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener, TypedContractMethod } from "../common.js" + + + export interface IERC721ReceiverInterface extends Interface { + getFunction(nameOrSignature: "onERC721Received"): FunctionFragment; + + + + encodeFunctionData(functionFragment: 'onERC721Received', values: [AddressLike, AddressLike, BigNumberish, BytesLike]): string; + + decodeFunctionResult(functionFragment: 'onERC721Received', data: BytesLike): Result; + } + + + + export interface IERC721Receiver extends BaseContract { + + connect(runner?: ContractRunner | null): IERC721Receiver; + waitForDeployment(): Promise; + + interface: IERC721ReceiverInterface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + onERC721Received: TypedContractMethod< + [operator: AddressLike, from: AddressLike, tokenId: BigNumberish, data: BytesLike, ], + [string], + 'nonpayable' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'onERC721Received'): TypedContractMethod< + [operator: AddressLike, from: AddressLike, tokenId: BigNumberish, data: BytesLike, ], + [string], + 'nonpayable' + >; + + + + filters: { + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/ERC721.sol/index.ts b/erc20/types/ethers-contracts/ERC721.sol/index.ts new file mode 100644 index 00000000..a317201c --- /dev/null +++ b/erc20/types/ethers-contracts/ERC721.sol/index.ts @@ -0,0 +1,8 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ERC721 } from './ERC721.js'; +export type { IERC165 } from './IERC165.js'; +export type { IERC721 } from './IERC721.js'; +export type { IERC721Metadata } from './IERC721Metadata.js'; +export type { IERC721Receiver } from './IERC721Receiver.js'; \ No newline at end of file diff --git a/erc20/types/ethers-contracts/NFTmarketplace.sol/IERC721.ts b/erc20/types/ethers-contracts/NFTmarketplace.sol/IERC721.ts new file mode 100644 index 00000000..a1a074bb --- /dev/null +++ b/erc20/types/ethers-contracts/NFTmarketplace.sol/IERC721.ts @@ -0,0 +1,120 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener, TypedContractMethod } from "../common.js" + + + export interface IERC721Interface extends Interface { + getFunction(nameOrSignature: "getApproved" | "isApprovedForAll" | "ownerOf" | "transferFrom"): FunctionFragment; + + + + encodeFunctionData(functionFragment: 'getApproved', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'isApprovedForAll', values: [AddressLike, AddressLike]): string; +encodeFunctionData(functionFragment: 'ownerOf', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'transferFrom', values: [AddressLike, AddressLike, BigNumberish]): string; + + decodeFunctionResult(functionFragment: 'getApproved', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'isApprovedForAll', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'ownerOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'transferFrom', data: BytesLike): Result; + } + + + + export interface IERC721 extends BaseContract { + + connect(runner?: ContractRunner | null): IERC721; + waitForDeployment(): Promise; + + interface: IERC721Interface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + getApproved: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + isApprovedForAll: TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + > + + + + ownerOf: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'getApproved'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'isApprovedForAll'): TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + >; +getFunction(nameOrSignature: 'ownerOf'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'transferFrom'): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; + + + + filters: { + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/NFTmarketplace.sol/NFTmarketplace.ts b/erc20/types/ethers-contracts/NFTmarketplace.sol/NFTmarketplace.ts new file mode 100644 index 00000000..e20659f8 --- /dev/null +++ b/erc20/types/ethers-contracts/NFTmarketplace.sol/NFTmarketplace.ts @@ -0,0 +1,228 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "../common.js" + + + export interface NFTmarketplaceInterface extends Interface { + getFunction(nameOrSignature: "buyNFT" | "cancelListing" | "feePercentage" | "listNFT" | "listings" | "owner" | "setFeePercentage" | "treasury"): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "ItemBought" | "ItemListed" | "ListingCancelled"): EventFragment; + + encodeFunctionData(functionFragment: 'buyNFT', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'cancelListing', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'feePercentage', values?: undefined): string; +encodeFunctionData(functionFragment: 'listNFT', values: [AddressLike, BigNumberish, BigNumberish]): string; +encodeFunctionData(functionFragment: 'listings', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'owner', values?: undefined): string; +encodeFunctionData(functionFragment: 'setFeePercentage', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'treasury', values?: undefined): string; + + decodeFunctionResult(functionFragment: 'buyNFT', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'cancelListing', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'feePercentage', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'listNFT', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'listings', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'setFeePercentage', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'treasury', data: BytesLike): Result; + } + + + export namespace ItemBoughtEvent { + export type InputTuple = [buyer: AddressLike, nftAddress: AddressLike, tokenId: BigNumberish, price: BigNumberish]; + export type OutputTuple = [buyer: string, nftAddress: string, tokenId: bigint, price: bigint]; + export interface OutputObject {buyer: string, nftAddress: string, tokenId: bigint, price: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace ItemListedEvent { + export type InputTuple = [seller: AddressLike, nftAddress: AddressLike, tokenId: BigNumberish, price: BigNumberish]; + export type OutputTuple = [seller: string, nftAddress: string, tokenId: bigint, price: bigint]; + export interface OutputObject {seller: string, nftAddress: string, tokenId: bigint, price: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace ListingCancelledEvent { + export type InputTuple = [seller: AddressLike, nftAddress: AddressLike, tokenId: BigNumberish]; + export type OutputTuple = [seller: string, nftAddress: string, tokenId: bigint]; + export interface OutputObject {seller: string, nftAddress: string, tokenId: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export interface NFTmarketplace extends BaseContract { + + connect(runner?: ContractRunner | null): NFTmarketplace; + waitForDeployment(): Promise; + + interface: NFTmarketplaceInterface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + buyNFT: TypedContractMethod< + [nftAddress: AddressLike, tokenId: BigNumberish, ], + [void], + 'payable' + > + + + + cancelListing: TypedContractMethod< + [nftAddress: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + feePercentage: TypedContractMethod< + [], + [bigint], + 'view' + > + + + + listNFT: TypedContractMethod< + [nftAddress: AddressLike, tokenId: BigNumberish, price: BigNumberish, ], + [void], + 'nonpayable' + > + + + + listings: TypedContractMethod< + [arg0: AddressLike, arg1: BigNumberish, ], + [[string, bigint] & {seller: string, price: bigint }], + 'view' + > + + + + owner: TypedContractMethod< + [], + [string], + 'view' + > + + + + setFeePercentage: TypedContractMethod< + [_newFee: BigNumberish, ], + [void], + 'nonpayable' + > + + + + treasury: TypedContractMethod< + [], + [string], + 'view' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'buyNFT'): TypedContractMethod< + [nftAddress: AddressLike, tokenId: BigNumberish, ], + [void], + 'payable' + >; +getFunction(nameOrSignature: 'cancelListing'): TypedContractMethod< + [nftAddress: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'feePercentage'): TypedContractMethod< + [], + [bigint], + 'view' + >; +getFunction(nameOrSignature: 'listNFT'): TypedContractMethod< + [nftAddress: AddressLike, tokenId: BigNumberish, price: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'listings'): TypedContractMethod< + [arg0: AddressLike, arg1: BigNumberish, ], + [[string, bigint] & {seller: string, price: bigint }], + 'view' + >; +getFunction(nameOrSignature: 'owner'): TypedContractMethod< + [], + [string], + 'view' + >; +getFunction(nameOrSignature: 'setFeePercentage'): TypedContractMethod< + [_newFee: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'treasury'): TypedContractMethod< + [], + [string], + 'view' + >; + + getEvent(key: 'ItemBought'): TypedContractEvent; +getEvent(key: 'ItemListed'): TypedContractEvent; +getEvent(key: 'ListingCancelled'): TypedContractEvent; + + filters: { + + 'ItemBought(address,address,uint256,uint256)': TypedContractEvent; + ItemBought: TypedContractEvent; + + + 'ItemListed(address,address,uint256,uint256)': TypedContractEvent; + ItemListed: TypedContractEvent; + + + 'ListingCancelled(address,address,uint256)': TypedContractEvent; + ListingCancelled: TypedContractEvent; + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/NFTmarketplace.sol/index.ts b/erc20/types/ethers-contracts/NFTmarketplace.sol/index.ts new file mode 100644 index 00000000..45021d0c --- /dev/null +++ b/erc20/types/ethers-contracts/NFTmarketplace.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IERC721 } from './IERC721.js'; +export type { NFTmarketplace } from './NFTmarketplace.js'; \ No newline at end of file diff --git a/erc20/types/ethers-contracts/common.ts b/erc20/types/ethers-contracts/common.ts new file mode 100644 index 00000000..1b4cfcbe --- /dev/null +++ b/erc20/types/ethers-contracts/common.ts @@ -0,0 +1,92 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + FunctionFragment, + Typed, + EventFragment, + ContractTransaction, + ContractTransactionResponse, + DeferredTopicFilter, + EventLog, + TransactionRequest, + LogDescription, +} from 'ethers' + +export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> extends DeferredTopicFilter {} + +export interface TypedContractEvent< + InputTuple extends Array = any, + OutputTuple extends Array = any, + OutputObject = any, +> { + (...args: Partial): TypedDeferredTopicFilter> + name: string + fragment: EventFragment + getFragment(...args: Partial): EventFragment +} + +type __TypechainAOutputTuple = T extends TypedContractEvent ? W : never +type __TypechainOutputObject = T extends TypedContractEvent ? V : never + +export interface TypedEventLog extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject +} + +export interface TypedLogDescription extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject +} + +export type TypedListener = ( + ...listenerArg: [...__TypechainAOutputTuple, TypedEventLog, ...undefined[]] +) => void + +export type MinEthersFactory = { + deploy(...a: ARGS[]): Promise +} + +export type GetContractTypeFromFactory = F extends MinEthersFactory ? C : never +export type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never + +export type StateMutability = 'nonpayable' | 'payable' | 'view' + +export type BaseOverrides = Omit +export type NonPayableOverrides = Omit +export type PayableOverrides = Omit +export type ViewOverrides = Omit +export type Overrides = S extends 'nonpayable' + ? NonPayableOverrides + : S extends 'payable' + ? PayableOverrides + : ViewOverrides + +export type PostfixOverrides, S extends StateMutability> = A | [...A, Overrides] +export type ContractMethodArgs, S extends StateMutability> = PostfixOverrides< + { [I in keyof A]-?: A[I] | Typed }, + S +> + +export type DefaultReturnType = R extends Array ? R[0] : R + +// export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> { +export interface TypedContractMethod< + A extends Array = Array, + R = any, + S extends StateMutability = 'payable', +> { + (...args: ContractMethodArgs): S extends 'view' + ? Promise> + : Promise + + name: string + + fragment: FunctionFragment + + getFragment(...args: ContractMethodArgs): FunctionFragment + + populateTransaction(...args: ContractMethodArgs): Promise + staticCall(...args: ContractMethodArgs): Promise> + send(...args: ContractMethodArgs): Promise + estimateGas(...args: ContractMethodArgs): Promise + staticCallResult(...args: ContractMethodArgs): Promise +} diff --git a/erc20/types/ethers-contracts/factories/Counter__factory.ts b/erc20/types/ethers-contracts/factories/Counter__factory.ts new file mode 100644 index 00000000..3889832c --- /dev/null +++ b/erc20/types/ethers-contracts/factories/Counter__factory.ts @@ -0,0 +1,107 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { Addressable } from "ethers"; +import { Contract, ContractFactory, ContractTransactionResponse, Interface } from "ethers" +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers" +import type { NonPayableOverrides } from "../common.js" + import type { Counter, CounterInterface } from "../Counter.js"; + + const _abi = [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "by", + "type": "uint256" + } + ], + "name": "Increment", + "type": "event" + }, + { + "inputs": [], + "name": "inc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "by", + "type": "uint256" + } + ], + "name": "incBy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "x", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } +] as const; + + const _bytecode = "0x6080604052348015600e575f5ffd5b506103cf8061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80630c55699c14610043578063371303c01461006157806370119d061461006b575b5f5ffd5b61004b610087565b6040516100589190610187565b60405180910390f35b61006961008c565b005b610085600480360381019061008091906101ce565b6100dc565b005b5f5481565b5f5f81548092919061009d90610226565b91905055507f51af157c2eee40f68107a47a49c32fbbeb0a3c9e5cd37aa56e88e6be92368a8160016040516100d291906102af565b60405180910390a1565b5f811161011e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161011590610348565b60405180910390fd5b805f5f82825461012e9190610366565b925050819055507f51af157c2eee40f68107a47a49c32fbbeb0a3c9e5cd37aa56e88e6be92368a81816040516101649190610187565b60405180910390a150565b5f819050919050565b6101818161016f565b82525050565b5f60208201905061019a5f830184610178565b92915050565b5f5ffd5b6101ad8161016f565b81146101b7575f5ffd5b50565b5f813590506101c8816101a4565b92915050565b5f602082840312156101e3576101e26101a0565b5b5f6101f0848285016101ba565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6102308261016f565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610262576102616101f9565b5b600182019050919050565b5f819050919050565b5f819050919050565b5f61029961029461028f8461026d565b610276565b61016f565b9050919050565b6102a98161027f565b82525050565b5f6020820190506102c25f8301846102a0565b92915050565b5f82825260208201905092915050565b7f696e6342793a20696e6372656d656e742073686f756c6420626520706f7369745f8201527f6976650000000000000000000000000000000000000000000000000000000000602082015250565b5f6103326023836102c8565b915061033d826102d8565b604082019050919050565b5f6020820190508181035f83015261035f81610326565b9050919050565b5f6103708261016f565b915061037b8361016f565b9250828201905080821115610393576103926101f9565b5b9291505056fea264697066735822122005f33be9c4b07ea65923ad2f7924ca32e78dfdd67025551f12b98afd31ea524564736f6c634300081c0033"; + + + type CounterConstructorParams = [signer?: Signer] | ConstructorParameters; + + const isSuperArgs = (xs: CounterConstructorParams): xs is ConstructorParameters => + xs.length > 1 + + + export class Counter__factory extends ContractFactory { + + constructor(...args: CounterConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + + } + + override getDeployTransaction(overrides?: NonPayableOverrides & { from?: string }): Promise { + return super.getDeployTransaction(overrides || {}); + }; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise; + } + override connect(runner: ContractRunner | null): Counter__factory { + return super.connect(runner) as Counter__factory; + } + + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): CounterInterface { + return new Interface(_abi) as CounterInterface; + } + + override attach(address: string | Addressable): Counter { + return super.attach(address) as Counter; + } + static connect(address: string, runner?: ContractRunner | null): Counter { + return new Contract(address, _abi, runner) as unknown as Counter; + } + } + + + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/ERC20__factory.ts b/erc20/types/ethers-contracts/factories/ERC20__factory.ts new file mode 100644 index 00000000..ca3637b4 --- /dev/null +++ b/erc20/types/ethers-contracts/factories/ERC20__factory.ts @@ -0,0 +1,328 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { Addressable } from "ethers"; +import { Contract, ContractFactory, ContractTransactionResponse, Interface } from "ethers" +import type { Signer, BigNumberish, ContractDeployTransaction, ContractRunner } from "ethers" +import type { NonPayableOverrides } from "../common.js" + import type { ERC20, ERC20Interface } from "../ERC20.js"; + + const _abi = [ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_decimals", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialSupply", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; + + const _bytecode = "0x608060405234801561000f575f5ffd5b5060405161182c38038061182c83398181016040528101906100319190610332565b835f908161003f91906105d5565b50826001908161004f91906105d5565b5081600281905550610067338261007060201b60201c565b505050506107a4565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036100de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100d5906106fe565b60405180910390fd5b8060035f8282546100ef9190610749565b925050819055508060045f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546101429190610749565b925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516101a6919061078b565b60405180910390a35050565b5f604051905090565b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610211826101cb565b810181811067ffffffffffffffff821117156102305761022f6101db565b5b80604052505050565b5f6102426101b2565b905061024e8282610208565b919050565b5f67ffffffffffffffff82111561026d5761026c6101db565b5b610276826101cb565b9050602081019050919050565b8281835e5f83830152505050565b5f6102a361029e84610253565b610239565b9050828152602081018484840111156102bf576102be6101c7565b5b6102ca848285610283565b509392505050565b5f82601f8301126102e6576102e56101c3565b5b81516102f6848260208601610291565b91505092915050565b5f819050919050565b610311816102ff565b811461031b575f5ffd5b50565b5f8151905061032c81610308565b92915050565b5f5f5f5f6080858703121561034a576103496101bb565b5b5f85015167ffffffffffffffff811115610367576103666101bf565b5b610373878288016102d2565b945050602085015167ffffffffffffffff811115610394576103936101bf565b5b6103a0878288016102d2565b93505060406103b18782880161031e565b92505060606103c28782880161031e565b91505092959194509250565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061041c57607f821691505b60208210810361042f5761042e6103d8565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026104917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610456565b61049b8683610456565b95508019841693508086168417925050509392505050565b5f819050919050565b5f6104d66104d16104cc846102ff565b6104b3565b6102ff565b9050919050565b5f819050919050565b6104ef836104bc565b6105036104fb826104dd565b848454610462565b825550505050565b5f5f905090565b61051a61050b565b6105258184846104e6565b505050565b5b818110156105485761053d5f82610512565b60018101905061052b565b5050565b601f82111561058d5761055e81610435565b61056784610447565b81016020851015610576578190505b61058a61058285610447565b83018261052a565b50505b505050565b5f82821c905092915050565b5f6105ad5f1984600802610592565b1980831691505092915050565b5f6105c5838361059e565b9150826002028217905092915050565b6105de826103ce565b67ffffffffffffffff8111156105f7576105f66101db565b5b6106018254610405565b61060c82828561054c565b5f60209050601f83116001811461063d575f841561062b578287015190505b61063585826105ba565b86555061069c565b601f19841661064b86610435565b5f5b828110156106725784890151825560018201915060208501945060208101905061064d565b8683101561068f578489015161068b601f89168261059e565b8355505b6001600288020188555050505b505050505050565b5f82825260208201905092915050565b7f43616e6e6f74206d696e7420746f207a65726f206164647265737300000000005f82015250565b5f6106e8601b836106a4565b91506106f3826106b4565b602082019050919050565b5f6020820190508181035f830152610715816106dc565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610753826102ff565b915061075e836102ff565b92508282019050808211156107765761077561071c565b5b92915050565b610785816102ff565b82525050565b5f60208201905061079e5f83018461077c565b92915050565b61107b806107b15f395ff3fe608060405234801561000f575f5ffd5b506004361061009c575f3560e01c806370a082311161006457806370a082311461015a57806395d89b411461018a578063a0712d68146101a8578063a9059cbb146101d8578063dd62ed3e146102085761009c565b806306fdde03146100a0578063095ea7b3146100be57806318160ddd146100ee57806323b872dd1461010c578063313ce5671461013c575b5f5ffd5b6100a8610238565b6040516100b59190610b1f565b60405180910390f35b6100d860048036038101906100d39190610bd0565b6102c3565b6040516100e59190610c28565b60405180910390f35b6100f661041e565b6040516101039190610c50565b60405180910390f35b61012660048036038101906101219190610c69565b610427565b6040516101339190610c28565b60405180910390f35b610144610663565b6040516101519190610c50565b60405180910390f35b610174600480360381019061016f9190610cb9565b610669565b6040516101819190610c50565b60405180910390f35b6101926106af565b60405161019f9190610b1f565b60405180910390f35b6101c260048036038101906101bd9190610ce4565b61073b565b6040516101cf9190610c28565b60405180910390f35b6101f260048036038101906101ed9190610bd0565b61074f565b6040516101ff9190610c28565b60405180910390f35b610222600480360381019061021d9190610d0f565b610765565b60405161022f9190610c50565b60405180910390f35b5f805461024490610d7a565b80601f016020809104026020016040519081016040528092919081815260200182805461027090610d7a565b80156102bb5780601f10610292576101008083540402835291602001916102bb565b820191905f5260205f20905b81548152906001019060200180831161029e57829003601f168201915b505050505081565b5f5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610332576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161032990610df4565b60405180910390fd5b8160055f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161040c9190610c50565b60405180910390a36001905092915050565b5f600354905090565b5f5f60055f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050828110156104e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104de90610e5c565b60405180910390fd5b82816104f39190610ea7565b60055f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055503373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560055f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20546040516106449190610c50565b60405180910390a36106578585856107e7565b60019150509392505050565b60025481565b5f60045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b600180546106bc90610d7a565b80601f01602080910402602001604051908101604052809291908181526020018280546106e890610d7a565b80156107335780601f1061070a57610100808354040283529160200191610733565b820191905f5260205f20905b81548152906001019060200180831161071657829003601f168201915b505050505081565b5f610746338361096d565b60019050919050565b5f61075b3384846107e7565b6001905092915050565b5f60055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610855576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084c90610f24565b60405180910390fd5b5f60045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156108d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d090610f8c565b60405180910390fd5b81810360045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508160045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254019250508190555050505050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036109db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d290610ff4565b60405180910390fd5b8060035f8282546109ec9190611012565b925050819055508060045f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610a3f9190611012565b925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610aa39190610c50565b60405180910390a35050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f610af182610aaf565b610afb8185610ab9565b9350610b0b818560208601610ac9565b610b1481610ad7565b840191505092915050565b5f6020820190508181035f830152610b378184610ae7565b905092915050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610b6c82610b43565b9050919050565b610b7c81610b62565b8114610b86575f5ffd5b50565b5f81359050610b9781610b73565b92915050565b5f819050919050565b610baf81610b9d565b8114610bb9575f5ffd5b50565b5f81359050610bca81610ba6565b92915050565b5f5f60408385031215610be657610be5610b3f565b5b5f610bf385828601610b89565b9250506020610c0485828601610bbc565b9150509250929050565b5f8115159050919050565b610c2281610c0e565b82525050565b5f602082019050610c3b5f830184610c19565b92915050565b610c4a81610b9d565b82525050565b5f602082019050610c635f830184610c41565b92915050565b5f5f5f60608486031215610c8057610c7f610b3f565b5b5f610c8d86828701610b89565b9350506020610c9e86828701610b89565b9250506040610caf86828701610bbc565b9150509250925092565b5f60208284031215610cce57610ccd610b3f565b5b5f610cdb84828501610b89565b91505092915050565b5f60208284031215610cf957610cf8610b3f565b5b5f610d0684828501610bbc565b91505092915050565b5f5f60408385031215610d2557610d24610b3f565b5b5f610d3285828601610b89565b9250506020610d4385828601610b89565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680610d9157607f821691505b602082108103610da457610da3610d4d565b5b50919050565b7f43616e6e6f7420617070726f766520746f207a65726f206164647265737300005f82015250565b5f610dde601e83610ab9565b9150610de982610daa565b602082019050919050565b5f6020820190508181035f830152610e0b81610dd2565b9050919050565b7f496e73756666696369656e7420616c6c6f77616e6365000000000000000000005f82015250565b5f610e46601683610ab9565b9150610e5182610e12565b602082019050919050565b5f6020820190508181035f830152610e7381610e3a565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610eb182610b9d565b9150610ebc83610b9d565b9250828203905081811115610ed457610ed3610e7a565b5b92915050565b7f5472616e7366657220746f207a65726f206164647265737300000000000000005f82015250565b5f610f0e601883610ab9565b9150610f1982610eda565b602082019050919050565b5f6020820190508181035f830152610f3b81610f02565b9050919050565b7f496e73756666696369656e742066756e647300000000000000000000000000005f82015250565b5f610f76601283610ab9565b9150610f8182610f42565b602082019050919050565b5f6020820190508181035f830152610fa381610f6a565b9050919050565b7f43616e6e6f74206d696e7420746f207a65726f206164647265737300000000005f82015250565b5f610fde601b83610ab9565b9150610fe982610faa565b602082019050919050565b5f6020820190508181035f83015261100b81610fd2565b9050919050565b5f61101c82610b9d565b915061102783610b9d565b925082820190508082111561103f5761103e610e7a565b5b9291505056fea264697066735822122040c5b0e5db1c6f6e9b2d371235138ecc8b5b68d4062dfad8b691662a9bf5bbc864736f6c634300081c0033"; + + + type ERC20ConstructorParams = [signer?: Signer] | ConstructorParameters; + + const isSuperArgs = (xs: ERC20ConstructorParams): xs is ConstructorParameters => + xs.length > 1 + + + export class ERC20__factory extends ContractFactory { + + constructor(...args: ERC20ConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + + } + + override getDeployTransaction(_name: string, _symbol: string, _decimals: BigNumberish, initialSupply: BigNumberish, overrides?: NonPayableOverrides & { from?: string }): Promise { + return super.getDeployTransaction(_name, _symbol, _decimals, initialSupply, overrides || {}); + }; + override deploy(_name: string, _symbol: string, _decimals: BigNumberish, initialSupply: BigNumberish, overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(_name, _symbol, _decimals, initialSupply, overrides || {}) as Promise; + } + override connect(runner: ContractRunner | null): ERC20__factory { + return super.connect(runner) as ERC20__factory; + } + + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ERC20Interface { + return new Interface(_abi) as ERC20Interface; + } + + override attach(address: string | Addressable): ERC20 { + return super.attach(address) as ERC20; + } + static connect(address: string, runner?: ContractRunner | null): ERC20 { + return new Contract(address, _abi, runner) as unknown as ERC20; + } + } + + + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/ERC721.sol/ERC721__factory.ts b/erc20/types/ethers-contracts/factories/ERC721.sol/ERC721__factory.ts new file mode 100644 index 00000000..e3da4f29 --- /dev/null +++ b/erc20/types/ethers-contracts/factories/ERC721.sol/ERC721__factory.ts @@ -0,0 +1,405 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { Addressable } from "ethers"; +import { Contract, ContractFactory, ContractTransactionResponse, Interface } from "ethers" +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers" +import type { NonPayableOverrides } from "../../common.js" + import type { ERC721, ERC721Interface } from "../../ERC721.sol/ERC721.js"; + + const _abi = [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "string", + "name": "baseURI_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "newBaseURI", + "type": "string" + } + ], + "name": "setBaseURI", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; + + const _bytecode = "0x608060405234801561000f575f5ffd5b5060405161254e38038061254e833981810160405281019061003191906101b5565b825f908161003f9190610469565b50816001908161004f9190610469565b50806002908161005f9190610469565b50505050610538565b5f604051905090565b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6100c782610081565b810181811067ffffffffffffffff821117156100e6576100e5610091565b5b80604052505050565b5f6100f8610068565b905061010482826100be565b919050565b5f67ffffffffffffffff82111561012357610122610091565b5b61012c82610081565b9050602081019050919050565b8281835e5f83830152505050565b5f61015961015484610109565b6100ef565b9050828152602081018484840111156101755761017461007d565b5b610180848285610139565b509392505050565b5f82601f83011261019c5761019b610079565b5b81516101ac848260208601610147565b91505092915050565b5f5f5f606084860312156101cc576101cb610071565b5b5f84015167ffffffffffffffff8111156101e9576101e8610075565b5b6101f586828701610188565b935050602084015167ffffffffffffffff81111561021657610215610075565b5b61022286828701610188565b925050604084015167ffffffffffffffff81111561024357610242610075565b5b61024f86828701610188565b9150509250925092565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806102a757607f821691505b6020821081036102ba576102b9610263565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830261031c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826102e1565b61032686836102e1565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f61036a6103656103608461033e565b610347565b61033e565b9050919050565b5f819050919050565b61038383610350565b61039761038f82610371565b8484546102ed565b825550505050565b5f5f905090565b6103ae61039f565b6103b981848461037a565b505050565b5b818110156103dc576103d15f826103a6565b6001810190506103bf565b5050565b601f821115610421576103f2816102c0565b6103fb846102d2565b8101602085101561040a578190505b61041e610416856102d2565b8301826103be565b50505b505050565b5f82821c905092915050565b5f6104415f1984600802610426565b1980831691505092915050565b5f6104598383610432565b9150826002028217905092915050565b61047282610259565b67ffffffffffffffff81111561048b5761048a610091565b5b6104958254610290565b6104a08282856103e0565b5f60209050601f8311600181146104d1575f84156104bf578287015190505b6104c9858261044e565b865550610530565b601f1984166104df866102c0565b5f5b82811015610506578489015182556001820191506020850194506020810190506104e1565b86831015610523578489015161051f601f891682610432565b8355505b6001600288020188555050505b505050505050565b612009806105455f395ff3fe608060405234801561000f575f5ffd5b50600436106100e8575f3560e01c806355f804b31161008a57806395d89b411161006457806395d89b4114610256578063a22cb46514610274578063c87b56dd14610290578063e985e9c5146102c0576100e8565b806355f804b3146101da5780636352211e146101f657806370a0823114610226576100e8565b8063095ea7b3116100c6578063095ea7b31461016a57806323b872dd1461018657806340c10f19146101a257806342966c68146101be576100e8565b806301ffc9a7146100ec57806306fdde031461011c578063081812fc1461013a575b5f5ffd5b610106600480360381019061010191906112f5565b6102f0565b604051610113919061133a565b60405180910390f35b610124610381565b60405161013191906113c3565b60405180910390f35b610154600480360381019061014f9190611416565b610410565b6040516101619190611480565b60405180910390f35b610184600480360381019061017f91906114c3565b610491565b005b6101a0600480360381019061019b9190611501565b610628565b005b6101bc60048036038101906101b791906114c3565b61078d565b005b6101d860048036038101906101d39190611416565b61079b565b005b6101f460048036038101906101ef91906115b2565b610964565b005b610210600480360381019061020b9190611416565b61097a565b60405161021d9190611480565b60405180910390f35b610240600480360381019061023b91906115fd565b610a26565b60405161024d9190611637565b60405180910390f35b61025e610ada565b60405161026b91906113c3565b60405180910390f35b61028e6004803603810190610289919061167a565b610b6a565b005b6102aa60048036038101906102a59190611416565b610cd0565b6040516102b791906113c3565b60405180910390f35b6102da60048036038101906102d591906116b8565b610d70565b6040516102e7919061133a565b60405180910390f35b5f6301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061034a57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061037a5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60605f805461038f90611723565b80601f01602080910402602001604051908101604052809291908181526020018280546103bb90611723565b80156104065780601f106103dd57610100808354040283529160200191610406565b820191905f5260205f20905b8154815290600101906020018083116103e957829003601f168201915b5050505050905090565b5f61041a82610dfe565b610459576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104509061179d565b60405180910390fd5b60055f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f61049b8261097a565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361050b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050290611805565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610579576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105709061186d565b60405180910390fd5b8260055f8481526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b6106323382610e66565b610671576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610668906118d5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1660035f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461070f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107069061193d565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361077d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610774906119a5565b60405180910390fd5b610788838383610efa565b505050565b61079782826110df565b5050565b5f6107a58261097a565b90506107b13383610e66565b6107f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e79061186d565b60405180910390fd5b60055f8381526020019081526020015f205f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055815f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4600160045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546108cb91906119f0565b9250508190555060035f8381526020019081526020015f205f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055815f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b818160029182610975929190611bfa565b505050565b5f5f60035f8481526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610a1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1490611d11565b60405180910390fd5b80915050919050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610a95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8c90611d79565b60405180910390fd5b60045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b606060018054610ae990611723565b80601f0160208091040260200160405190810160405280929190818152602001828054610b1590611723565b8015610b605780601f10610b3757610100808354040283529160200191610b60565b820191905f5260205f20905b815481529060010190602001808311610b4357829003601f168201915b5050505050905090565b3373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610bd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bcf90611de1565b60405180910390fd5b8060065f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051610cc4919061133a565b60405180910390a35050565b6060610cdb82610dfe565b610d1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1190611d11565b60405180910390fd5b5f60028054610d2890611723565b905003610d455760405180602001604052805f8152509050610d6b565b600282604051602001610d59929190611ea9565b60405160208183030381529060405290505b919050565b5f60065f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f5f73ffffffffffffffffffffffffffffffffffffffff1660035f8481526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b5f5f610e718361097a565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610ee057508373ffffffffffffffffffffffffffffffffffffffff16610ec884610410565b73ffffffffffffffffffffffffffffffffffffffff16145b80610ef15750610ef08185610d70565b5b91505092915050565b60055f8281526020019081526020015f205f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055805f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4600160045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610fd591906119f0565b92505081905550600160045f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546110299190611ed0565b925050819055508160035f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361114d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114490611f4d565b60405180910390fd5b61115681610dfe565b15611196576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118d90611fb5565b60405180910390fd5b600160045f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546111e39190611ed0565b925050819055508160035f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b5f5ffd5b5f5ffd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6112d4816112a0565b81146112de575f5ffd5b50565b5f813590506112ef816112cb565b92915050565b5f6020828403121561130a57611309611298565b5b5f611317848285016112e1565b91505092915050565b5f8115159050919050565b61133481611320565b82525050565b5f60208201905061134d5f83018461132b565b92915050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61139582611353565b61139f818561135d565b93506113af81856020860161136d565b6113b88161137b565b840191505092915050565b5f6020820190508181035f8301526113db818461138b565b905092915050565b5f819050919050565b6113f5816113e3565b81146113ff575f5ffd5b50565b5f81359050611410816113ec565b92915050565b5f6020828403121561142b5761142a611298565b5b5f61143884828501611402565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61146a82611441565b9050919050565b61147a81611460565b82525050565b5f6020820190506114935f830184611471565b92915050565b6114a281611460565b81146114ac575f5ffd5b50565b5f813590506114bd81611499565b92915050565b5f5f604083850312156114d9576114d8611298565b5b5f6114e6858286016114af565b92505060206114f785828601611402565b9150509250929050565b5f5f5f6060848603121561151857611517611298565b5b5f611525868287016114af565b9350506020611536868287016114af565b925050604061154786828701611402565b9150509250925092565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f84011261157257611571611551565b5b8235905067ffffffffffffffff81111561158f5761158e611555565b5b6020830191508360018202830111156115ab576115aa611559565b5b9250929050565b5f5f602083850312156115c8576115c7611298565b5b5f83013567ffffffffffffffff8111156115e5576115e461129c565b5b6115f18582860161155d565b92509250509250929050565b5f6020828403121561161257611611611298565b5b5f61161f848285016114af565b91505092915050565b611631816113e3565b82525050565b5f60208201905061164a5f830184611628565b92915050565b61165981611320565b8114611663575f5ffd5b50565b5f8135905061167481611650565b92915050565b5f5f604083850312156116905761168f611298565b5b5f61169d858286016114af565b92505060206116ae85828601611666565b9150509250929050565b5f5f604083850312156116ce576116cd611298565b5b5f6116db858286016114af565b92505060206116ec858286016114af565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061173a57607f821691505b60208210810361174d5761174c6116f6565b5b50919050565b7f746f6b656e20646f6573206e6f742065786973740000000000000000000000005f82015250565b5f61178760148361135d565b915061179282611753565b602082019050919050565b5f6020820190508181035f8301526117b48161177b565b9050919050565b7f63616e6e6f7420617070726f766520746f2063757272656e74206f776e6572005f82015250565b5f6117ef601f8361135d565b91506117fa826117bb565b602082019050919050565b5f6020820190508181035f83015261181c816117e3565b9050919050565b7f756e617574686f726973656400000000000000000000000000000000000000005f82015250565b5f611857600c8361135d565b915061186282611823565b602082019050919050565b5f6020820190508181035f8301526118848161184b565b9050919050565b7f756e6175686f72697365640000000000000000000000000000000000000000005f82015250565b5f6118bf600b8361135d565b91506118ca8261188b565b602082019050919050565b5f6020820190508181035f8301526118ec816118b3565b9050919050565b7f77726f6e672066726f6d000000000000000000000000000000000000000000005f82015250565b5f611927600a8361135d565b9150611932826118f3565b602082019050919050565b5f6020820190508181035f8301526119548161191b565b9050919050565b7f7472616e7366657220746f207a65726f206164647265737300000000000000005f82015250565b5f61198f60188361135d565b915061199a8261195b565b602082019050919050565b5f6020820190508181035f8301526119bc81611983565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6119fa826113e3565b9150611a05836113e3565b9250828203905081811115611a1d57611a1c6119c3565b5b92915050565b5f82905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302611ab67fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611a7b565b611ac08683611a7b565b95508019841693508086168417925050509392505050565b5f819050919050565b5f611afb611af6611af1846113e3565b611ad8565b6113e3565b9050919050565b5f819050919050565b611b1483611ae1565b611b28611b2082611b02565b848454611a87565b825550505050565b5f5f905090565b611b3f611b30565b611b4a818484611b0b565b505050565b5b81811015611b6d57611b625f82611b37565b600181019050611b50565b5050565b601f821115611bb257611b8381611a5a565b611b8c84611a6c565b81016020851015611b9b578190505b611baf611ba785611a6c565b830182611b4f565b50505b505050565b5f82821c905092915050565b5f611bd25f1984600802611bb7565b1980831691505092915050565b5f611bea8383611bc3565b9150826002028217905092915050565b611c048383611a23565b67ffffffffffffffff811115611c1d57611c1c611a2d565b5b611c278254611723565b611c32828285611b71565b5f601f831160018114611c5f575f8415611c4d578287013590505b611c578582611bdf565b865550611cbe565b601f198416611c6d86611a5a565b5f5b82811015611c9457848901358255600182019150602085019450602081019050611c6f565b86831015611cb15784890135611cad601f891682611bc3565b8355505b6001600288020188555050505b50505050505050565b7f696e76616c696420746f6b656e000000000000000000000000000000000000005f82015250565b5f611cfb600d8361135d565b9150611d0682611cc7565b602082019050919050565b5f6020820190508181035f830152611d2881611cef565b9050919050565b7f7a65726f206164647265737300000000000000000000000000000000000000005f82015250565b5f611d63600c8361135d565b9150611d6e82611d2f565b602082019050919050565b5f6020820190508181035f830152611d9081611d57565b9050919050565b7f63616e6e6f7420617070726f766520746f2073656c66000000000000000000005f82015250565b5f611dcb60168361135d565b9150611dd682611d97565b602082019050919050565b5f6020820190508181035f830152611df881611dbf565b9050919050565b5f81905092915050565b5f8154611e1581611723565b611e1f8186611dff565b9450600182165f8114611e395760018114611e4e57611e80565b60ff1983168652811515820286019350611e80565b611e5785611a5a565b5f5b83811015611e7857815481890152600182019150602081019050611e59565b838801955050505b50505092915050565b5f819050919050565b611ea3611e9e826113e3565b611e89565b82525050565b5f611eb48285611e09565b9150611ec08284611e92565b6020820191508190509392505050565b5f611eda826113e3565b9150611ee5836113e3565b9250828201905080821115611efd57611efc6119c3565b5b92915050565b7f6d696e7420746f207a65726f20616464726573730000000000000000000000005f82015250565b5f611f3760148361135d565b9150611f4282611f03565b602082019050919050565b5f6020820190508181035f830152611f6481611f2b565b9050919050565b7f746f6b656e20616c7265616479206d696e7465640000000000000000000000005f82015250565b5f611f9f60148361135d565b9150611faa82611f6b565b602082019050919050565b5f6020820190508181035f830152611fcc81611f93565b905091905056fea2646970667358221220bc24a226658fd12779f189ac9bb263d2e67c95a879f9573ed5df85e1f047af3164736f6c634300081c0033"; + + + type ERC721ConstructorParams = [signer?: Signer] | ConstructorParameters; + + const isSuperArgs = (xs: ERC721ConstructorParams): xs is ConstructorParameters => + xs.length > 1 + + + export class ERC721__factory extends ContractFactory { + + constructor(...args: ERC721ConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + + } + + override getDeployTransaction(name_: string, symbol_: string, baseURI_: string, overrides?: NonPayableOverrides & { from?: string }): Promise { + return super.getDeployTransaction(name_, symbol_, baseURI_, overrides || {}); + }; + override deploy(name_: string, symbol_: string, baseURI_: string, overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(name_, symbol_, baseURI_, overrides || {}) as Promise; + } + override connect(runner: ContractRunner | null): ERC721__factory { + return super.connect(runner) as ERC721__factory; + } + + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ERC721Interface { + return new Interface(_abi) as ERC721Interface; + } + + override attach(address: string | Addressable): ERC721 { + return super.attach(address) as ERC721; + } + static connect(address: string, runner?: ContractRunner | null): ERC721 { + return new Contract(address, _abi, runner) as unknown as ERC721; + } + } + + + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/ERC721.sol/IER721Metadata__factory.ts b/erc20/types/ethers-contracts/factories/ERC721.sol/IER721Metadata__factory.ts new file mode 100644 index 00000000..dab0c858 --- /dev/null +++ b/erc20/types/ethers-contracts/factories/ERC721.sol/IER721Metadata__factory.ts @@ -0,0 +1,350 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + + import { Contract, Interface, type ContractRunner } from "ethers"; + import type { IER721Metadata, IER721MetadataInterface } from "../../ERC721.sol/IER721Metadata.js"; + + const _abi = [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenID", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getAproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; + + export class IER721Metadata__factory { + static readonly abi = _abi; + static createInterface(): IER721MetadataInterface { + return new Interface(_abi) as IER721MetadataInterface; + } + static connect(address: string, runner?: ContractRunner | null): IER721Metadata { + return new Contract(address, _abi, runner) as unknown as IER721Metadata; + } + } + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/ERC721.sol/IERC165__factory.ts b/erc20/types/ethers-contracts/factories/ERC721.sol/IERC165__factory.ts new file mode 100644 index 00000000..bbb74317 --- /dev/null +++ b/erc20/types/ethers-contracts/factories/ERC721.sol/IERC165__factory.ts @@ -0,0 +1,39 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + + import { Contract, Interface, type ContractRunner } from "ethers"; + import type { IERC165, IERC165Interface } from "../../ERC721.sol/IERC165.js"; + + const _abi = [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] as const; + + export class IERC165__factory { + static readonly abi = _abi; + static createInterface(): IERC165Interface { + return new Interface(_abi) as IERC165Interface; + } + static connect(address: string, runner?: ContractRunner | null): IERC165 { + return new Contract(address, _abi, runner) as unknown as IERC165; + } + } + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/ERC721.sol/IERC721Metadata__factory.ts b/erc20/types/ethers-contracts/factories/ERC721.sol/IERC721Metadata__factory.ts new file mode 100644 index 00000000..a855e18d --- /dev/null +++ b/erc20/types/ethers-contracts/factories/ERC721.sol/IERC721Metadata__factory.ts @@ -0,0 +1,299 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + + import { Contract, Interface, type ContractRunner } from "ethers"; + import type { IERC721Metadata, IERC721MetadataInterface } from "../../ERC721.sol/IERC721Metadata.js"; + + const _abi = [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; + + export class IERC721Metadata__factory { + static readonly abi = _abi; + static createInterface(): IERC721MetadataInterface { + return new Interface(_abi) as IERC721MetadataInterface; + } + static connect(address: string, runner?: ContractRunner | null): IERC721Metadata { + return new Contract(address, _abi, runner) as unknown as IERC721Metadata; + } + } + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/ERC721.sol/IERC721Receiver__factory.ts b/erc20/types/ethers-contracts/factories/ERC721.sol/IERC721Receiver__factory.ts new file mode 100644 index 00000000..148b9147 --- /dev/null +++ b/erc20/types/ethers-contracts/factories/ERC721.sol/IERC721Receiver__factory.ts @@ -0,0 +1,54 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + + import { Contract, Interface, type ContractRunner } from "ethers"; + import type { IERC721Receiver, IERC721ReceiverInterface } from "../../ERC721.sol/IERC721Receiver.js"; + + const _abi = [ + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; + + export class IERC721Receiver__factory { + static readonly abi = _abi; + static createInterface(): IERC721ReceiverInterface { + return new Interface(_abi) as IERC721ReceiverInterface; + } + static connect(address: string, runner?: ContractRunner | null): IERC721Receiver { + return new Contract(address, _abi, runner) as unknown as IERC721Receiver; + } + } + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/ERC721.sol/IERC721__factory.ts b/erc20/types/ethers-contracts/factories/ERC721.sol/IERC721__factory.ts new file mode 100644 index 00000000..550c6215 --- /dev/null +++ b/erc20/types/ethers-contracts/factories/ERC721.sol/IERC721__factory.ts @@ -0,0 +1,254 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + + import { Contract, Interface, type ContractRunner } from "ethers"; + import type { IERC721, IERC721Interface } from "../../ERC721.sol/IERC721.js"; + + const _abi = [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; + + export class IERC721__factory { + static readonly abi = _abi; + static createInterface(): IERC721Interface { + return new Interface(_abi) as IERC721Interface; + } + static connect(address: string, runner?: ContractRunner | null): IERC721 { + return new Contract(address, _abi, runner) as unknown as IERC721; + } + } + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/ERC721.sol/index.ts b/erc20/types/ethers-contracts/factories/ERC721.sol/index.ts new file mode 100644 index 00000000..9c210a63 --- /dev/null +++ b/erc20/types/ethers-contracts/factories/ERC721.sol/index.ts @@ -0,0 +1,8 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ERC721__factory } from './ERC721__factory.js'; +export { IERC165__factory } from './IERC165__factory.js'; +export { IERC721__factory } from './IERC721__factory.js'; +export { IERC721Metadata__factory } from './IERC721Metadata__factory.js'; +export { IERC721Receiver__factory } from './IERC721Receiver__factory.js'; \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/NFTmarketplace.sol/IERC721__factory.ts b/erc20/types/ethers-contracts/factories/NFTmarketplace.sol/IERC721__factory.ts new file mode 100644 index 00000000..d1f811a3 --- /dev/null +++ b/erc20/types/ethers-contracts/factories/NFTmarketplace.sol/IERC721__factory.ts @@ -0,0 +1,105 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + + import { Contract, Interface, type ContractRunner } from "ethers"; + import type { IERC721, IERC721Interface } from "../../NFTmarketplace.sol/IERC721.js"; + + const _abi = [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; + + export class IERC721__factory { + static readonly abi = _abi; + static createInterface(): IERC721Interface { + return new Interface(_abi) as IERC721Interface; + } + static connect(address: string, runner?: ContractRunner | null): IERC721 { + return new Contract(address, _abi, runner) as unknown as IERC721; + } + } + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/NFTmarketplace.sol/NFTmarketplace__factory.ts b/erc20/types/ethers-contracts/factories/NFTmarketplace.sol/NFTmarketplace__factory.ts new file mode 100644 index 00000000..b5d40eff --- /dev/null +++ b/erc20/types/ethers-contracts/factories/NFTmarketplace.sol/NFTmarketplace__factory.ts @@ -0,0 +1,299 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { Addressable } from "ethers"; +import { Contract, ContractFactory, ContractTransactionResponse, Interface } from "ethers" +import type { Signer, AddressLike, ContractDeployTransaction, ContractRunner } from "ethers" +import type { NonPayableOverrides } from "../../common.js" + import type { NFTmarketplace, NFTmarketplaceInterface } from "../../NFTmarketplace.sol/NFTmarketplace.js"; + + const _abi = [ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_treasury", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "nftAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "name": "ItemBought", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "nftAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "name": "ItemListed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "nftAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ListingCancelled", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "nftAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "buyNFT", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "nftAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "cancelListing", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "feePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "nftAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "name": "listNFT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "listings", + "outputs": [ + { + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newFee", + "type": "uint256" + } + ], + "name": "setFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] as const; + + const _bytecode = "0x608060405234801561000f575f5ffd5b506040516118aa3803806118aa83398181016040528101906100319190610124565b3360015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601960038190555060015f819055505061014f565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100f3826100ca565b9050919050565b610103816100e9565b811461010d575f5ffd5b50565b5f8151905061011e816100fa565b92915050565b5f60208284031215610139576101386100c6565b5b5f61014684828501610110565b91505092915050565b61174e8061015c5f395ff3fe608060405260043610610079575f3560e01c8063a82ba76f1161004d578063a82ba76f14610138578063ad05f1b414610154578063ae06c1b71461017c578063b2ddee06146101a457610079565b806207df301461007d57806361d027b3146100ba5780638da5cb5b146100e4578063a001ecdd1461010e575b5f5ffd5b348015610088575f5ffd5b506100a3600480360381019061009e9190610f55565b6101cc565b6040516100b1929190610fb1565b60405180910390f35b3480156100c5575f5ffd5b506100ce610216565b6040516100db9190610ff8565b60405180910390f35b3480156100ef575f5ffd5b506100f861023b565b6040516101059190611011565b60405180910390f35b348015610119575f5ffd5b50610122610260565b60405161012f919061102a565b60405180910390f35b610152600480360381019061014d9190610f55565b610266565b005b34801561015f575f5ffd5b5061017a60048036038101906101759190611043565b6106f6565b005b348015610187575f5ffd5b506101a2600480360381019061019d9190611093565b610b25565b005b3480156101af575f5ffd5b506101ca60048036038101906101c59190610f55565b610bbe565b005b6004602052815f5260405f20602052805f5260405f205f9150915050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60025f54036102aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102a190611118565b60405180910390fd5b60025f819055505f60045f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8381526020019081526020015f206040518060400160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201548152505090505f8160200151116103af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103a690611180565b60405180910390fd5b80602001513410156103f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ed906111e8565b60405180910390fd5b5f6103e8600354346104089190611233565b61041291906112a1565b90505f813461042191906112d1565b905060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8581526020019081526020015f205f5f82015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182015f905550508473ffffffffffffffffffffffffffffffffffffffff166323b872dd3033876040518463ffffffff1660e01b81526004016104db93929190611304565b5f604051808303815f87803b1580156104f2575f5ffd5b505af1158015610504573d5f5f3e3d5ffd5b505050505f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168360405161054e90611366565b5f6040518083038185875af1925050503d805f8114610588576040519150601f19603f3d011682016040523d82523d5f602084013e61058d565b606091505b50509050806105d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105c8906113c4565b60405180910390fd5b5f845f015173ffffffffffffffffffffffffffffffffffffffff16836040516105f990611366565b5f6040518083038185875af1925050503d805f8114610633576040519150601f19603f3d011682016040523d82523d5f602084013e610638565b606091505b505090508061067c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106739061142c565b60405180910390fd5b858773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f263223b1dd81e51054a4e6f791d45a4a1ddb4aadcd93a2dfd892615c3fdac18788602001516040516106de919061102a565b60405180910390a4505050505060015f819055505050565b5f8111610738576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072f90611494565b60405180910390fd5b5f8390503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16636352211e856040518263ffffffff1660e01b815260040161078c919061102a565b602060405180830381865afa1580156107a7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107cb91906114c6565b73ffffffffffffffffffffffffffffffffffffffff1614610821576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108189061153b565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1663081812fc856040518263ffffffff1660e01b8152600401610871919061102a565b602060405180830381865afa15801561088c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108b091906114c6565b73ffffffffffffffffffffffffffffffffffffffff16148061094857508073ffffffffffffffffffffffffffffffffffffffff1663e985e9c533306040518363ffffffff1660e01b8152600401610908929190611559565b602060405180830381865afa158015610923573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061094791906115b5565b5b610987576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e9061162a565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b81526004016109c493929190611304565b5f604051808303815f87803b1580156109db575f5ffd5b505af11580156109ed573d5f5f3e3d5ffd5b5050505060405180604001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018381525060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8581526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155905050828473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd547e933094f12a9159076970143ebe73234e64480317844b0dcb36117116de485604051610b17919061102a565b60405180910390a450505050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bb4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bab90611692565b60405180910390fd5b8060038190555050565b60025f5403610c02576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bf990611118565b60405180910390fd5b60025f819055505f60045f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8381526020019081526020015f206040518060400160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201548152505090505f816020015111610d07576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cfe90611180565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16815f015173ffffffffffffffffffffffffffffffffffffffff1614610d78576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6f906116fa565b60405180910390fd5b60045f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8381526020019081526020015f205f5f82015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182015f905550508273ffffffffffffffffffffffffffffffffffffffff166323b872dd3033856040518463ffffffff1660e01b8152600401610e3093929190611304565b5f604051808303815f87803b158015610e47575f5ffd5b505af1158015610e59573d5f5f3e3d5ffd5b50505050818373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fe1bfe61cb157e0896411ccf9a5c40e4c346f7bb6e1d2a44de4a724f0cb5c6fb060405160405180910390a45060015f819055505050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610ef182610ec8565b9050919050565b610f0181610ee7565b8114610f0b575f5ffd5b50565b5f81359050610f1c81610ef8565b92915050565b5f819050919050565b610f3481610f22565b8114610f3e575f5ffd5b50565b5f81359050610f4f81610f2b565b92915050565b5f5f60408385031215610f6b57610f6a610ec4565b5b5f610f7885828601610f0e565b9250506020610f8985828601610f41565b9150509250929050565b610f9c81610ee7565b82525050565b610fab81610f22565b82525050565b5f604082019050610fc45f830185610f93565b610fd16020830184610fa2565b9392505050565b5f610fe282610ec8565b9050919050565b610ff281610fd8565b82525050565b5f60208201905061100b5f830184610fe9565b92915050565b5f6020820190506110245f830184610f93565b92915050565b5f60208201905061103d5f830184610fa2565b92915050565b5f5f5f6060848603121561105a57611059610ec4565b5b5f61106786828701610f0e565b935050602061107886828701610f41565b925050604061108986828701610f41565b9150509250925092565b5f602082840312156110a8576110a7610ec4565b5b5f6110b584828501610f41565b91505092915050565b5f82825260208201905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c005f82015250565b5f611102601f836110be565b915061110d826110ce565b602082019050919050565b5f6020820190508181035f83015261112f816110f6565b9050919050565b7f4e6f74204c6973746564000000000000000000000000000000000000000000005f82015250565b5f61116a600a836110be565b915061117582611136565b602082019050919050565b5f6020820190508181035f8301526111978161115e565b9050919050565b7f496e73756666696369656e74207061796d656e740000000000000000000000005f82015250565b5f6111d26014836110be565b91506111dd8261119e565b602082019050919050565b5f6020820190508181035f8301526111ff816111c6565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61123d82610f22565b915061124883610f22565b925082820261125681610f22565b9150828204841483151761126d5761126c611206565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6112ab82610f22565b91506112b683610f22565b9250826112c6576112c5611274565b5b828204905092915050565b5f6112db82610f22565b91506112e683610f22565b92508282039050818111156112fe576112fd611206565b5b92915050565b5f6060820190506113175f830186610f93565b6113246020830185610f93565b6113316040830184610fa2565b949350505050565b5f81905092915050565b50565b5f6113515f83611339565b915061135c82611343565b5f82019050919050565b5f61137082611346565b9150819050919050565b7f5472656173757279207472616e73666572206661696c656400000000000000005f82015250565b5f6113ae6018836110be565b91506113b98261137a565b602082019050919050565b5f6020820190508181035f8301526113db816113a2565b9050919050565b7f53656c6c6572207472616e73666572206661696c6564000000000000000000005f82015250565b5f6114166016836110be565b9150611421826113e2565b602082019050919050565b5f6020820190508181035f8301526114438161140a565b9050919050565b7f5072696365206d757374206265203e20300000000000000000000000000000005f82015250565b5f61147e6011836110be565b91506114898261144a565b602082019050919050565b5f6020820190508181035f8301526114ab81611472565b9050919050565b5f815190506114c081610ef8565b92915050565b5f602082840312156114db576114da610ec4565b5b5f6114e8848285016114b2565b91505092915050565b7f4e6f7420746865206f776e6572000000000000000000000000000000000000005f82015250565b5f611525600d836110be565b9150611530826114f1565b602082019050919050565b5f6020820190508181035f83015261155281611519565b9050919050565b5f60408201905061156c5f830185610f93565b6115796020830184610f93565b9392505050565b5f8115159050919050565b61159481611580565b811461159e575f5ffd5b50565b5f815190506115af8161158b565b92915050565b5f602082840312156115ca576115c9610ec4565b5b5f6115d7848285016115a1565b91505092915050565b7f4d61726b6574706c616365206e6f7420617070726f76656400000000000000005f82015250565b5f6116146018836110be565b915061161f826115e0565b602082019050919050565b5f6020820190508181035f83015261164181611608565b9050919050565b7f4f6e6c79206f776e65722063616e2063616c6c207468697300000000000000005f82015250565b5f61167c6018836110be565b915061168782611648565b602082019050919050565b5f6020820190508181035f8301526116a981611670565b9050919050565b7f4e6f74207468652073656c6c65657200000000000000000000000000000000005f82015250565b5f6116e4600f836110be565b91506116ef826116b0565b602082019050919050565b5f6020820190508181035f830152611711816116d8565b905091905056fea2646970667358221220bb3dd23105af54b1747502a86e650b06f226a8c33ec2054d5176e2dd1c99f2bb64736f6c634300081c0033"; + + + type NFTmarketplaceConstructorParams = [signer?: Signer] | ConstructorParameters; + + const isSuperArgs = (xs: NFTmarketplaceConstructorParams): xs is ConstructorParameters => + xs.length > 1 + + + export class NFTmarketplace__factory extends ContractFactory { + + constructor(...args: NFTmarketplaceConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + + } + + override getDeployTransaction(_treasury: AddressLike, overrides?: NonPayableOverrides & { from?: string }): Promise { + return super.getDeployTransaction(_treasury, overrides || {}); + }; + override deploy(_treasury: AddressLike, overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(_treasury, overrides || {}) as Promise; + } + override connect(runner: ContractRunner | null): NFTmarketplace__factory { + return super.connect(runner) as NFTmarketplace__factory; + } + + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): NFTmarketplaceInterface { + return new Interface(_abi) as NFTmarketplaceInterface; + } + + override attach(address: string | Addressable): NFTmarketplace { + return super.attach(address) as NFTmarketplace; + } + static connect(address: string, runner?: ContractRunner | null): NFTmarketplace { + return new Contract(address, _abi, runner) as unknown as NFTmarketplace; + } + } + + + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/NFTmarketplace.sol/index.ts b/erc20/types/ethers-contracts/factories/NFTmarketplace.sol/index.ts new file mode 100644 index 00000000..b26f978d --- /dev/null +++ b/erc20/types/ethers-contracts/factories/NFTmarketplace.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IERC721__factory } from './IERC721__factory.js'; +export { NFTmarketplace__factory } from './NFTmarketplace__factory.js'; \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/index.ts b/erc20/types/ethers-contracts/factories/index.ts new file mode 100644 index 00000000..08a67c4d --- /dev/null +++ b/erc20/types/ethers-contracts/factories/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as erc721Sol from './ERC721.sol/index.js'; +export * as nfTmarketplaceSol from './NFTmarketplace.sol/index.js'; +export { Counter__factory } from './Counter__factory.js'; +export { ERC20__factory } from './ERC20__factory.js'; \ No newline at end of file diff --git a/erc20/types/ethers-contracts/hardhat.d.ts b/erc20/types/ethers-contracts/hardhat.d.ts new file mode 100644 index 00000000..d3101fa3 --- /dev/null +++ b/erc20/types/ethers-contracts/hardhat.d.ts @@ -0,0 +1,79 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + + +import { ethers } from 'ethers' +import { DeployContractOptions, FactoryOptions, HardhatEthersHelpers as HardhatEthersHelpersBase} from "@nomicfoundation/hardhat-ethers/types"; + +import * as Contracts from "./index.js"; + +declare module "@nomicfoundation/hardhat-ethers/types" { + interface HardhatEthersHelpers extends HardhatEthersHelpersBase { + getContractFactory(name: 'Counter', signerOrOptions?: ethers.Signer | FactoryOptions): Promise +getContractFactory(name: 'ERC20', signerOrOptions?: ethers.Signer | FactoryOptions): Promise +getContractFactory(name: 'ERC721', signerOrOptions?: ethers.Signer | FactoryOptions): Promise +getContractFactory(name: 'IERC165', signerOrOptions?: ethers.Signer | FactoryOptions): Promise +getContractFactory(name: 'IERC721', signerOrOptions?: ethers.Signer | FactoryOptions): Promise +getContractFactory(name: 'IERC721Metadata', signerOrOptions?: ethers.Signer | FactoryOptions): Promise +getContractFactory(name: 'IERC721Receiver', signerOrOptions?: ethers.Signer | FactoryOptions): Promise +getContractFactory(name: 'IERC721', signerOrOptions?: ethers.Signer | FactoryOptions): Promise +getContractFactory(name: 'NFTmarketplace', signerOrOptions?: ethers.Signer | FactoryOptions): Promise + + getContractAt(name: 'Counter', address: string | ethers.Addressable, signer?: ethers.Signer): Promise +getContractAt(name: 'ERC20', address: string | ethers.Addressable, signer?: ethers.Signer): Promise +getContractAt(name: 'ERC721', address: string | ethers.Addressable, signer?: ethers.Signer): Promise +getContractAt(name: 'IERC165', address: string | ethers.Addressable, signer?: ethers.Signer): Promise +getContractAt(name: 'IERC721', address: string | ethers.Addressable, signer?: ethers.Signer): Promise +getContractAt(name: 'IERC721Metadata', address: string | ethers.Addressable, signer?: ethers.Signer): Promise +getContractAt(name: 'IERC721Receiver', address: string | ethers.Addressable, signer?: ethers.Signer): Promise +getContractAt(name: 'IERC721', address: string | ethers.Addressable, signer?: ethers.Signer): Promise +getContractAt(name: 'NFTmarketplace', address: string | ethers.Addressable, signer?: ethers.Signer): Promise + + deployContract(name: 'Counter', signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'ERC20', signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'ERC721', signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC165', signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC721', signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC721Metadata', signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC721Receiver', signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC721', signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'NFTmarketplace', signerOrOptions?: ethers.Signer | DeployContractOptions): Promise + + deployContract(name: 'Counter', args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'ERC20', args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'ERC721', args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC165', args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC721', args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC721Metadata', args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC721Receiver', args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC721', args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'NFTmarketplace', args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions): Promise + + // default types + getContractFactory( + name: string, + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + abi: any[], + bytecode: ethers.BytesLike, + signer?: ethers.Signer + ): Promise; + getContractAt( + nameOrAbi: string | any[], + address: string | ethers.Addressable, + signer?: ethers.Signer + ): Promise; + deployContract( + name: string, + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: string, + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + } +} + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/index.ts b/erc20/types/ethers-contracts/index.ts new file mode 100644 index 00000000..13ee0a6a --- /dev/null +++ b/erc20/types/ethers-contracts/index.ts @@ -0,0 +1,24 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as erc721Sol from './ERC721.sol/index.js'; +export type { erc721Sol }; +import type * as nfTmarketplaceSol from './NFTmarketplace.sol/index.js'; +export type { nfTmarketplaceSol }; +export type { Counter } from './Counter.js'; +export type { ERC20 } from './ERC20.js'; +export * as factories from './factories/index.js'; +export { Counter__factory } from './factories/Counter__factory.js'; +export { ERC20__factory } from './factories/ERC20__factory.js'; +export type { ERC721 } from './ERC721.sol/ERC721.js'; +export { ERC721__factory } from './factories/ERC721.sol/ERC721__factory.js'; +export type { IERC165 } from './ERC721.sol/IERC165.js'; +export { IERC165__factory } from './factories/ERC721.sol/IERC165__factory.js'; +export type { IERC721 } from './ERC721.sol/IERC721.js'; +export { IERC721__factory } from './factories/ERC721.sol/IERC721__factory.js'; +export type { IERC721Metadata } from './ERC721.sol/IERC721Metadata.js'; +export { IERC721Metadata__factory } from './factories/ERC721.sol/IERC721Metadata__factory.js'; +export type { IERC721Receiver } from './ERC721.sol/IERC721Receiver.js'; +export { IERC721Receiver__factory } from './factories/ERC721.sol/IERC721Receiver__factory.js'; +export type { NFTmarketplace } from './NFTmarketplace.sol/NFTmarketplace.js'; +export { NFTmarketplace__factory } from './factories/NFTmarketplace.sol/NFTmarketplace__factory.js'; \ No newline at end of file