diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..b915cdf --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,4 @@ +[target.'cfg(target_os = "macos")'] +# when using osx, we need to link against some golang libraries, it did just work with this missing flags +# from: https://github.com/golang/go/issues/42459 +rustflags = ["-C", "link-args=-framework CoreFoundation -framework Security -framework CoreServices -lresolv"] \ No newline at end of file diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..6f811b8 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.env/ +.idea/ +target/ +frontend/ \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ad1bde..39977c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,3 @@ -name: "CI" - -env: - FOUNDRY_PROFILE: "ci" - on: workflow_dispatch: pull_request: @@ -10,122 +5,61 @@ on: branches: - "main" -concurrency: - cancel-in-progress: true - group: ${{github.workflow}}-${{github.ref}} +name: "CI" jobs: + # ds_test: + # runs-on: ubuntu-latest + # steps: + # - name: Checkout code + # uses: actions/checkout@v3 + # - name: Install stable toolchain + # uses: actions-rs/toolchain@v1 + # with: + # profile: minimal + # toolchain: stable + # override: true + # - uses: Swatinem/rust-cache@v2 + # - name: cargo test + # run: | + # cargo test --release + # working-directory: ds + user_test: + runs-on: ubuntu-latest + steps: + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: '1.20.x' + - name: Checkout code + uses: actions/checkout@v3 + - name: cargo test + run: | + cargo test --release + working-directory: tests + lint: - runs-on: "ubuntu-latest" + runs-on: ubuntu-latest + timeout-minutes: 60 steps: - - name: "Check out the repo" - uses: "actions/checkout@v3" + - name: Setup Go + uses: actions/setup-go@v4 with: - submodules: "recursive" - - - name: "Install Foundry" - uses: "foundry-rs/foundry-toolchain@v1" - - - name: "Install Pnpm" - uses: "pnpm/action-setup@v4" + go-version: '1.20.x' + - name: Checkout sources + uses: actions/checkout@v3 + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 with: - version: "8" - - - name: "Install Node.js" - uses: "actions/setup-node@v3" - with: - node-version: "lts/*" - - - name: "Install the Node.js dependencies" - run: "pnpm install" - working-directory: "contracts" - - - name: "Lint the contracts" - run: "pnpm lint" - working-directory: "contracts" - - - name: "Add lint summary" + profile: minimal + toolchain: stable + override: true + components: rustfmt, clippy + - uses: Swatinem/rust-cache@v2 + - name: cargo fmt + if: success() || failure() + run: cargo fmt -- --check + - name: cargo clippy + if: success() || failure() run: | - echo "## Lint result" >> $GITHUB_STEP_SUMMARY - echo "✅ Passed" >> $GITHUB_STEP_SUMMARY - - build: - runs-on: "ubuntu-latest" - steps: - - name: "Check out the repo" - uses: "actions/checkout@v3" - with: - submodules: "recursive" - - - name: "Install Foundry" - uses: "foundry-rs/foundry-toolchain@v1" - - - name: "Build the contracts and print their size" - run: "forge build --sizes" - working-directory: "contracts" - - - name: "Add build summary" - run: | - echo "## Build result" >> $GITHUB_STEP_SUMMARY - echo "✅ Passed" >> $GITHUB_STEP_SUMMARY - - test: - needs: ["lint", "build"] - runs-on: "ubuntu-latest" - steps: - - name: "Check out the repo" - uses: "actions/checkout@v3" - with: - submodules: "recursive" - - - name: "Install Foundry" - uses: "foundry-rs/foundry-toolchain@v1" - - - name: "Show the Foundry config" - run: "forge config" - working-directory: "contracts" - - - name: "Generate a fuzz seed that changes weekly to avoid burning through RPC allowance" - run: > - echo "FOUNDRY_FUZZ_SEED=$( - echo $(($EPOCHSECONDS - $EPOCHSECONDS % 604800)) - )" >> $GITHUB_ENV - - - name: "Run the tests" - run: "forge test" - working-directory: "contracts" - - - name: "Add test summary" - run: | - echo "## Tests result" >> $GITHUB_STEP_SUMMARY - echo "✅ Passed" >> $GITHUB_STEP_SUMMARY - - coverage: - needs: ["lint", "build"] - runs-on: "ubuntu-latest" - steps: - - name: "Check out the repo" - uses: "actions/checkout@v3" - with: - submodules: "recursive" - - - name: "Install Foundry" - uses: "foundry-rs/foundry-toolchain@v1" - - - name: "Generate the coverage report using the unit and the integration tests" - run: 'forge coverage --match-path "test/**/*.sol" --report lcov' - working-directory: "contracts" - - - name: "Upload coverage report to Codecov" - uses: "codecov/codecov-action@v3" - with: - files: "./contracts/lcov.info" - - - name: "Add coverage summary" - run: | - echo "## Coverage result" >> $GITHUB_STEP_SUMMARY - echo "✅ Uploaded to Codecov" >> $GITHUB_STEP_SUMMARY - - strategy: - fail-fast: false - max-parallel: 16 + cargo clippy --release -- -D warnings \ No newline at end of file diff --git a/.gitignore b/.gitignore index 93d7042..04a5f79 100644 --- a/.gitignore +++ b/.gitignore @@ -15,12 +15,7 @@ Cargo.lock .DS_Store src/.DS_Store - -## contracts -# directories -contracts/cache/** -contracts/node_modules/** -contracts/out/** +.idea # files *.env @@ -30,9 +25,4 @@ contracts/out/** lcov.info yarn.lock -# broadcasts -contracts/!broadcast -contracts/broadcast/* -contracts/broadcast/*/31337/ - .certora_internal diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 27735a3..0000000 --- a/.gitmodules +++ /dev/null @@ -1,7 +0,0 @@ -[submodule "contracts/lib/forge-std"] - branch = "v1" - path = contracts/lib/forge-std - url = https://github.com/foundry-rs/forge-std -[submodule "contracts/lib/openzeppelin-contracts"] - path = contracts/lib/openzeppelin-contracts - url = https://github.com/OpenZeppelin/openzeppelin-contracts diff --git a/Cargo.toml b/Cargo.toml index 23025fa..a0d6ea0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,58 +1,70 @@ [workspace] -members = ["sc_key_store", "ds", "crates/bindings", "mls_crypto"] -[workspace.dependencies] -foundry-contracts = { path = "crates/bindings" } +members = ["ds", "mls_crypto"] +# [workspace.dependencies] +# foundry-contracts = { path = "crates/bindings" } [package] name = "de-mls" -version = "0.1.0" +version = "1.0.0" edition = "2021" +[[bin]] +name = "de-mls" +path = "src/main.rs" + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -foundry-contracts.workspace = true +# foundry-contracts.workspace = true openmls = { version = "=0.5.0", features = ["test-utils"] } openmls_basic_credential = "=0.2.0" openmls_rust_crypto = "=0.2.0" openmls_traits = "=0.2.0" -# waku-bindings = "0.6.0" +axum = { version = "0.6.10", features = ["ws"] } +futures = "0.3.26" +tower-http = { version = "0.4.0", features = ["cors"] } tokio = { version = "=1.38.0", features = [ "macros", "rt-multi-thread", "full", ] } -tokio-util = "=0.7.11" -tokio-tungstenite = "0.15" -tungstenite = "0.14" +tokio-util = "0.7.13" alloy = { git = "https://github.com/alloy-rs/alloy", features = [ "providers", "node-bindings", "network", "transports", "k256", + "signer-local", ] } -fred = { version = "=9.0.3", features = ["subscriber-client"] } -console-subscriber = "0.1.5" +kameo = "0.13.0" + +waku-bindings = { git = "https://github.com/waku-org/waku-rust-bindings.git", branch = "force-cluster-15", subdir = "waku-bindings" } +waku-sys = { git = "https://github.com/waku-org/waku-rust-bindings.git", branch = "force-cluster-15", subdir = "waku-sys" } rand = "=0.8.5" serde_json = "=1.0" -serde = "=1.0.204" -url = "=2.5.2" +serde = { version = "=1.0.204", features = ["derive"] } tls_codec = "=0.3.0" -hex = "=0.4.3" +chrono = "=0.4.38" -shlex = "=1.3.0" -clap = { version = "=4.5.8", features = ["derive"] } +secp256k1 = { version = "0.30.0", features = [ + "rand", + "std", + "hashes", + "global-context", +] } +ecies = "0.2.7" +libsecp256k1 = "0.7.1" anyhow = "=1.0.81" thiserror = "=1.0.61" +uuid = "1.11.0" +bounded-vec-deque = "0.1.1" -crossterm = "=0.27.0" -ratatui = "=0.27.0" -textwrap = "=0.16.1" +env_logger = "0.11.5" +log = "0.4.22" ds = { path = "ds" } -sc_key_store = { path = "sc_key_store" } mls_crypto = { path = "mls_crypto" } diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4fb7840 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +#################################################################################################### +## Build image +#################################################################################################### +FROM rust:latest as builder + +WORKDIR /app +RUN apt-get update && apt-get install -y libssl-dev pkg-config gcc clang + +ENV PATH="/usr/local/go/bin:${PATH}" +COPY --from=golang:1.20 /usr/local/go/ /usr/local/go/ + +# Cache build dependencies +RUN echo "fn main() {}" > dummy.rs +COPY ["Cargo.toml", "./Cargo.toml"] +COPY ["ds/", "./ds/"] +COPY ["mls_crypto/", "./mls_crypto/"] +RUN sed -i 's#src/main.rs#dummy.rs#' Cargo.toml +RUN cargo build --release +RUN sed -i 's#dummy.rs#src/main.rs#' Cargo.toml + +# Build the actual app +COPY ["src/", "./src/"] +RUN cargo build --release + +CMD ["/app/target/release/de-mls"] diff --git a/Makefile b/Makefile deleted file mode 100644 index 363d5ee..0000000 --- a/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -## ref: https://gist.github.com/enil/e4af160c745057809053329df4ba1dc2 - -GIT=git -GIT_SUBMODULES=$(shell sed -nE 's/path = +(.+)/\1\/.git/ p' .gitmodules | paste -s -) - -.PHONY: deps -deps: $(GIT_SUBMODULES) - -$(GIT_SUBMODULES): %/.git: .gitmodules - $(GIT) submodule init - $(GIT) submodule update $* - @touch $@ - -.EXPORT_ALL_VARIABLES: - -REDIS_PORT=6379 -ANVIL_PORT=8545 - -start: - docker compose up -d - until cast chain-id --rpc-url "http://localhost:${ANVIL_PORT}" 2> /dev/null; do sleep 1; done - cd contracts && forge script --broadcast --rpc-url "http://localhost:${ANVIL_PORT}" script/Deploy.s.sol:Deploy 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --sig 'run(address)' --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 - -stop: - docker compose down - -example: stop start - cargo run --release diff --git a/README.md b/README.md index 5a5eed9..60614c9 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,30 @@ # de-mls + Decentralized MLS PoC using a smart contract for group coordination -## Run Redis Server +> Note: The frontend implementation is based on [chatr](https://github.com/0xLaurens/chatr), a real-time chat application built with Rust and SvelteKit -`docker-compose up` +## Run Test Waku Node -## Install deps +```bash +docker run -p 8645:8645 -p 60000:60000 wakuorg/nwaku:v0.33.1 --cluster-id=15 --rest --relay --rln-relay=false --pubsub-topic=/waku/2/rs/15/0 +``` -1. `Foundry` -2. `make deps` +## Run User Instance -## Scaffold Environment +Create a `.env` file in the `.env` folder for each client containing the following variables: -1. `make start`: This command will start the docker compose instance, and deploy the smart contract to the local network. +```text +NAME=client1 +BACKEND_PORT=3000 +FRONTEND_PORT=4000 +NODE_NAME= +``` -2. `make stop`: This command will stop the docker compose instance. +Run docker compose up for the user instance + +```bash +docker-compose --env-file ./.env/client1.env up --build +``` + +For each client, run the following command to start the frontend on the local host with the port specified in the `.env` file diff --git a/contracts/.editorconfig b/contracts/.editorconfig deleted file mode 100644 index 746ae31..0000000 --- a/contracts/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig http://EditorConfig.org - -# top-most EditorConfig file -root = true - -# All files -[*] -charset = utf-8 -end_of_line = lf -indent_size = 2 -indent_style = space -insert_final_newline = true -trim_trailing_whitespace = true - -[*.sol] -indent_size = 4 - -[*.tree] -indent_size = 1 diff --git a/contracts/.env.example b/contracts/.env.example deleted file mode 100644 index 67bfff4..0000000 --- a/contracts/.env.example +++ /dev/null @@ -1,4 +0,0 @@ -export API_KEY_INFURA="YOUR_API_KEY_INFURA" -export API_KEY_ETHERSCAN="YOUR_API_KEY_ETHERSCAN" -export MNEMONIC="YOUR_MNEMONIC" -export FOUNDRY_PROFILE="default" diff --git a/contracts/.gas-report b/contracts/.gas-report deleted file mode 100644 index e69de29..0000000 diff --git a/contracts/.gas-snapshot b/contracts/.gas-snapshot deleted file mode 100644 index 931651e..0000000 --- a/contracts/.gas-snapshot +++ /dev/null @@ -1,6 +0,0 @@ -ScKeystoreTest:test__addUser__addsUser__whenUserInfoIsValid() (gas: 106200) -ScKeystoreTest:test__addUser__reverts__whenUserAlreadyExists() (gas: 110242) -ScKeystoreTest:test__addUser__reverts__whenUserInfoIsMalformed() (gas: 8989) -ScKeystoreTest:test__getAllKeyPackagesForUser__returnsKeyPackages__whenUserExists() (gas: 111031) -ScKeystoreTest:test__getUser__returnsUserInfo__whenUserExists() (gas: 108923) -ScKeystoreTest:test__userExists__returnsFalse__whenUserDoesNotExist() (gas: 7863) \ No newline at end of file diff --git a/contracts/.gitmodules b/contracts/.gitmodules deleted file mode 100644 index 53e2060..0000000 --- a/contracts/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "lib/forge-std"] - branch = "v1" - path = lib/forge-std - url = https://github.com/foundry-rs/forge-std diff --git a/contracts/.prettierignore b/contracts/.prettierignore deleted file mode 100644 index 1f4d2f6..0000000 --- a/contracts/.prettierignore +++ /dev/null @@ -1,18 +0,0 @@ -# directories -broadcast -cache -lib -node_modules -out - -# files -*.env -*.log -.DS_Store -.pnp.* -lcov.info -package-lock.json -pnpm-lock.yaml -yarn.lock - -slither.config.json diff --git a/contracts/.prettierrc.yml b/contracts/.prettierrc.yml deleted file mode 100644 index a1ecdbb..0000000 --- a/contracts/.prettierrc.yml +++ /dev/null @@ -1,7 +0,0 @@ -bracketSpacing: true -printWidth: 120 -proseWrap: "always" -singleQuote: false -tabWidth: 2 -trailingComma: "all" -useTabs: false diff --git a/contracts/.solhint.json b/contracts/.solhint.json deleted file mode 100644 index ac7469e..0000000 --- a/contracts/.solhint.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "solhint:recommended", - "rules": { - "code-complexity": ["error", 8], - "compiler-version": ["error", ">=0.8.19"], - "func-name-mixedcase": "off", - "func-visibility": ["error", { "ignoreConstructors": true }], - "max-line-length": ["error", 120], - "named-parameters-mapping": "warn", - "no-console": "off", - "not-rely-on-time": "off" - } -} diff --git a/contracts/CHANGELOG.md b/contracts/CHANGELOG.md deleted file mode 100644 index e69de29..0000000 diff --git a/contracts/README.md b/contracts/README.md deleted file mode 100644 index 23cb0f2..0000000 --- a/contracts/README.md +++ /dev/null @@ -1,122 +0,0 @@ -# de-mls contracts - -[gha]: https://github.com/vacp2p/de-mls/actions -[gha-badge]: https://github.com/vacp2p/de-mls/actions/workflows/ci.yml/badge.svg -[foundry]: https://getfoundry.sh/ -[foundry-badge]: https://img.shields.io/badge/Built%20with-Foundry-FFDB1C.svg -[license]: https://opensource.org/licenses/MIT -[license-badge]: https://img.shields.io/badge/License-MIT-blue.svg - -## What's Inside - -- [Forge](https://github.com/foundry-rs/foundry/blob/master/forge): compile, test, fuzz, format, and deploy smart - contracts -- [Forge Std](https://github.com/foundry-rs/forge-std): collection of helpful contracts and cheatcodes for testing -- [Solhint Community](https://github.com/solhint-community/solhint-community): linter for Solidity code - -## Features - -This template builds upon the frameworks and libraries mentioned above, so for details about their specific features, -please consult their respective documentation. - -For example, if you're interested in exploring Foundry in more detail, you should look at the -[Foundry Book](https://book.getfoundry.sh/). In particular, you may be interested in reading the -[Writing Tests](https://book.getfoundry.sh/forge/writing-tests.html) tutorial. - -## Usage - -This is a list of the most frequently needed commands. - -### Build - -Build the contracts: - -```sh -$ forge build -``` - -### Clean - -Delete the build artifacts and cache directories: - -```sh -$ forge clean -``` - -### Compile - -Compile the contracts: - -```sh -$ forge build -``` - -### Coverage - -Get a test coverage report: - -```sh -$ forge coverage -``` - -### Deploy - -Deploy to Anvil: - -```sh -$ forge script script/Deploy.s.sol --broadcast --fork-url http://localhost:8545 -``` - -For this script to work, you need to have a `MNEMONIC` environment variable set to a valid -[BIP39 mnemonic](https://iancoleman.io/bip39/). - -For instructions on how to deploy to a testnet or mainnet, check out the -[Solidity Scripting](https://book.getfoundry.sh/tutorials/solidity-scripting.html) tutorial. - -### Format - -Format the contracts: - -```sh -$ forge fmt -``` - -### Gas Usage - -Get a gas report: - -```sh -$ forge test --gas-report -``` - -### Lint - -Lint the contracts: - -```sh -$ pnpm lint -``` - -#### Fixing linting issues - -For any errors in solidity files, run `forge fmt`. For errors in any other file type, run `pnpm prettier:write`. - -### Test - -Run the tests: - -```sh -$ forge test -``` - -## Notes - -1. Foundry uses [git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) to manage dependencies. For - detailed instructions on working with dependencies, please refer to the - [guide](https://book.getfoundry.sh/projects/dependencies.html) in the book -2. You don't have to create a `.env` file, but filling in the environment variables may be useful when debugging and - testing against a fork. - -## License - -This project is licensed under MIT. diff --git a/contracts/codecov.yml b/contracts/codecov.yml deleted file mode 100644 index 5666091..0000000 --- a/contracts/codecov.yml +++ /dev/null @@ -1,28 +0,0 @@ -codecov: - require_ci_to_pass: false -comment: false -ignore: - - "script" - - "test" -coverage: - status: - project: - default: - # advanced settings - - # Prevents PR from being blocked with a reduction in coverage. - # Note, if we want to re-enable this, a `threshold` value can be used - # allow coverage to drop by x% while still posting a success status. - # `informational`: https://docs.codecov.com/docs/commit-status#informational - # `threshold`: https://docs.codecov.com/docs/commit-status#threshold - informational: true - patch: - default: - # advanced settings - - # Prevents PR from being blocked with a reduction in coverage. - # Note, if we want to re-enable this, a `threshold` value can be used - # allow coverage to drop by x% while still posting a success status. - # `informational`: https://docs.codecov.com/docs/commit-status#informational - # `threshold`: https://docs.codecov.com/docs/commit-status#threshold - informational: true diff --git a/contracts/foundry.toml b/contracts/foundry.toml deleted file mode 100644 index 47f112c..0000000 --- a/contracts/foundry.toml +++ /dev/null @@ -1,38 +0,0 @@ -# Full reference https://github.com/foundry-rs/foundry/tree/master/config - -[profile.default] - auto_detect_solc = false - block_timestamp = 1_680_220_800 # March 31, 2023 at 00:00 GMT - bytecode_hash = "none" - cbor_metadata = false - evm_version = "paris" - fuzz = { runs = 1_000 } - gas_reports = ["*"] - libs = ["lib"] - optimizer = true - optimizer_runs = 10_000 - out = "out" - script = "script" - solc = "0.8.24" - src = "src" - test = "test" - -[profile.ci] - fuzz = { runs = 10_000 } - verbosity = 4 - -[etherscan] - sepolia = { key = "${API_KEY_ETHERSCAN}" } - -[fmt] - bracket_spacing = true - int_types = "long" - line_length = 120 - multiline_func_header = "all" - number_underscore = "thousands" - quote_style = "double" - tab_width = 4 - wrap_comments = true - -[rpc_endpoints] - sepolia = "https://sepolia.infura.io/v3/${API_KEY_INFURA}" diff --git a/contracts/lib/forge-std b/contracts/lib/forge-std deleted file mode 160000 index 07263d1..0000000 --- a/contracts/lib/forge-std +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 07263d193d621c4b2b0ce8b4d54af58f6957d97d diff --git a/contracts/lib/openzeppelin-contracts b/contracts/lib/openzeppelin-contracts deleted file mode 160000 index e3786e6..0000000 --- a/contracts/lib/openzeppelin-contracts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e3786e63e6def6f3b71ce7b4b30906123bffe67c diff --git a/contracts/package.json b/contracts/package.json deleted file mode 100644 index 086490d..0000000 --- a/contracts/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "@vacp2p/de-mls-contracts", - "description": "Foundry-based contracts for de-mls", - "version": "1.0.0", - "devDependencies": { - "prettier": "^3.0.0", - "solhint-community": "^3.6.0", - "commit-and-tag-version": "^12.2.0" - }, - "keywords": [ - "blockchain", - "ethereum", - "forge", - "foundry", - "smart-contracts", - "solidity", - "template" - ], - "private": true, - "scripts": { - "clean": "rm -rf cache out", - "lint": "pnpm lint:sol && pnpm prettier:check", - "verify": "certoraRun certora/certora.conf", - "lint:sol": "forge fmt --check && pnpm solhint {script,src,test,certora}/**/*.sol", - "prettier:check": "prettier --check **/*.{json,md,yml} --ignore-path=.prettierignore", - "prettier:write": "prettier --write **/*.{json,md,yml} --ignore-path=.prettierignore", - "gas-report": "forge test --gas-report 2>&1 | (tee /dev/tty | awk '/Test result:/ {found=1; buffer=\"\"; next} found && !/Ran/ {buffer=buffer $0 ORS} /Ran/ {found=0} END {printf \"%s\", buffer}' > .gas-report)", - "release": "commit-and-tag-version", - "adorno": "pnpm prettier:write && forge fmt && forge snapshot && pnpm gas-report" - } -} diff --git a/contracts/pnpm-lock.yaml b/contracts/pnpm-lock.yaml deleted file mode 100644 index 8ab9e75..0000000 --- a/contracts/pnpm-lock.yaml +++ /dev/null @@ -1,1894 +0,0 @@ -lockfileVersion: '6.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -devDependencies: - commit-and-tag-version: - specifier: ^12.2.0 - version: 12.2.0 - prettier: - specifier: ^3.0.0 - version: 3.0.0 - solhint-community: - specifier: ^3.6.0 - version: 3.6.0 - -packages: - - /@asamuzakjp/dom-selector@2.0.2: - resolution: {integrity: sha512-x1KXOatwofR6ZAYzXRBL5wrdV0vwNxlTCK9NCuLqAzQYARqGcvFwiJA6A1ERuh+dgeA4Dxm3JBYictIes+SqUQ==} - dependencies: - bidi-js: 1.0.3 - css-tree: 2.3.1 - is-potential-custom-element-name: 1.0.1 - dev: true - - /@babel/code-frame@7.22.5: - resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.22.5 - dev: true - - /@babel/helper-validator-identifier@7.22.5: - resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/highlight@7.22.5: - resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.22.5 - chalk: 2.4.2 - js-tokens: 4.0.0 - dev: true - - /@hutson/parse-repository-url@3.0.2: - resolution: {integrity: sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==} - engines: {node: '>=6.9.0'} - dev: true - - /@solidity-parser/parser@0.16.1: - resolution: {integrity: sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==} - dependencies: - antlr4ts: 0.5.0-alpha.4 - dev: true - - /@types/minimist@1.2.5: - resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} - dev: true - - /@types/normalize-package-data@2.4.4: - resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} - dev: true - - /JSONStream@1.3.5: - resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} - hasBin: true - dependencies: - jsonparse: 1.3.1 - through: 2.3.8 - dev: true - - /add-stream@1.0.0: - resolution: {integrity: sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==} - dev: true - - /agent-base@7.1.0: - resolution: {integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==} - engines: {node: '>= 14'} - dependencies: - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - dev: true - - /ajv@6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - dependencies: - fast-deep-equal: 3.1.3 - fast-json-stable-stringify: 2.1.0 - json-schema-traverse: 0.4.1 - uri-js: 4.4.1 - dev: true - - /ajv@8.12.0: - resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} - dependencies: - fast-deep-equal: 3.1.3 - json-schema-traverse: 1.0.0 - require-from-string: 2.0.2 - uri-js: 4.4.1 - dev: true - - /ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - dev: true - - /ansi-styles@3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} - dependencies: - color-convert: 1.9.3 - dev: true - - /ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - dependencies: - color-convert: 2.0.1 - dev: true - - /antlr4@4.13.0: - resolution: {integrity: sha512-zooUbt+UscjnWyOrsuY/tVFL4rwrAGwOivpQmvmUDE22hy/lUA467Rc1rcixyRwcRUIXFYBwv7+dClDSHdmmew==} - engines: {node: '>=16'} - dev: true - - /antlr4ts@0.5.0-alpha.4: - resolution: {integrity: sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==} - dev: true - - /argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - dev: true - - /array-ify@1.0.0: - resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==} - dev: true - - /arrify@1.0.1: - resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} - engines: {node: '>=0.10.0'} - dev: true - - /ast-parents@0.0.1: - resolution: {integrity: sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA==} - dev: true - - /astral-regex@2.0.0: - resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} - engines: {node: '>=8'} - dev: true - - /asynckit@0.4.0: - resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - dev: true - - /balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - dev: true - - /bidi-js@1.0.3: - resolution: {integrity: sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==} - dependencies: - require-from-string: 2.0.2 - dev: true - - /brace-expansion@1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - dev: true - - /brace-expansion@2.0.1: - resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - dependencies: - balanced-match: 1.0.2 - dev: true - - /buffer-from@1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - dev: true - - /callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - dev: true - - /camelcase-keys@6.2.2: - resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} - engines: {node: '>=8'} - dependencies: - camelcase: 5.3.1 - map-obj: 4.3.0 - quick-lru: 4.0.1 - dev: true - - /camelcase@5.3.1: - resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} - engines: {node: '>=6'} - dev: true - - /chalk@2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - dev: true - - /chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - dev: true - - /cliui@7.0.4: - resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true - - /cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true - - /color-convert@1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - dependencies: - color-name: 1.1.3 - dev: true - - /color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - dependencies: - color-name: 1.1.4 - dev: true - - /color-name@1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - dev: true - - /color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - dev: true - - /combined-stream@1.0.8: - resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} - engines: {node: '>= 0.8'} - dependencies: - delayed-stream: 1.0.0 - dev: true - - /commander@10.0.1: - resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} - engines: {node: '>=14'} - dev: true - - /commit-and-tag-version@12.2.0: - resolution: {integrity: sha512-t8kvDy8dVTCF/j2u7Elt/J3tzCPyh16ssK8ECpj44R6jJiCUJMhWwZ36L652iChvqz4BAem9XU7WyuMYHlmSvA==} - engines: {node: '>=18'} - hasBin: true - dependencies: - chalk: 2.4.2 - conventional-changelog: 3.1.25 - conventional-changelog-config-spec: 2.1.0 - conventional-changelog-conventionalcommits: 6.1.0 - conventional-recommended-bump: 7.0.1 - detect-indent: 6.1.0 - detect-newline: 3.1.0 - dotgitignore: 2.1.0 - figures: 3.2.0 - find-up: 5.0.0 - git-semver-tags: 5.0.1 - jsdom: 23.2.0 - semver: 7.6.0 - w3c-xmlserializer: 5.0.0 - yargs: 17.7.2 - transitivePeerDependencies: - - bufferutil - - canvas - - supports-color - - utf-8-validate - dev: true - - /compare-func@2.0.0: - resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} - dependencies: - array-ify: 1.0.0 - dot-prop: 5.3.0 - dev: true - - /concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - dev: true - - /concat-stream@2.0.0: - resolution: {integrity: sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==} - engines: {'0': node >= 6.0} - dependencies: - buffer-from: 1.1.2 - inherits: 2.0.4 - readable-stream: 3.6.2 - typedarray: 0.0.6 - dev: true - - /conventional-changelog-angular@5.0.13: - resolution: {integrity: sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==} - engines: {node: '>=10'} - dependencies: - compare-func: 2.0.0 - q: 1.5.1 - dev: true - - /conventional-changelog-atom@2.0.8: - resolution: {integrity: sha512-xo6v46icsFTK3bb7dY/8m2qvc8sZemRgdqLb/bjpBsH2UyOS8rKNTgcb5025Hri6IpANPApbXMg15QLb1LJpBw==} - engines: {node: '>=10'} - dependencies: - q: 1.5.1 - dev: true - - /conventional-changelog-codemirror@2.0.8: - resolution: {integrity: sha512-z5DAsn3uj1Vfp7po3gpt2Boc+Bdwmw2++ZHa5Ak9k0UKsYAO5mH1UBTN0qSCuJZREIhX6WU4E1p3IW2oRCNzQw==} - engines: {node: '>=10'} - dependencies: - q: 1.5.1 - dev: true - - /conventional-changelog-config-spec@2.1.0: - resolution: {integrity: sha512-IpVePh16EbbB02V+UA+HQnnPIohgXvJRxHcS5+Uwk4AT5LjzCZJm5sp/yqs5C6KZJ1jMsV4paEV13BN1pvDuxQ==} - dev: true - - /conventional-changelog-conventionalcommits@4.6.3: - resolution: {integrity: sha512-LTTQV4fwOM4oLPad317V/QNQ1FY4Hju5qeBIM1uTHbrnCE+Eg4CdRZ3gO2pUeR+tzWdp80M2j3qFFEDWVqOV4g==} - engines: {node: '>=10'} - dependencies: - compare-func: 2.0.0 - lodash: 4.17.21 - q: 1.5.1 - dev: true - - /conventional-changelog-conventionalcommits@6.1.0: - resolution: {integrity: sha512-3cS3GEtR78zTfMzk0AizXKKIdN4OvSh7ibNz6/DPbhWWQu7LqE/8+/GqSodV+sywUR2gpJAdP/1JFf4XtN7Zpw==} - engines: {node: '>=14'} - dependencies: - compare-func: 2.0.0 - dev: true - - /conventional-changelog-core@4.2.4: - resolution: {integrity: sha512-gDVS+zVJHE2v4SLc6B0sLsPiloR0ygU7HaDW14aNJE1v4SlqJPILPl/aJC7YdtRE4CybBf8gDwObBvKha8Xlyg==} - engines: {node: '>=10'} - dependencies: - add-stream: 1.0.0 - conventional-changelog-writer: 5.0.1 - conventional-commits-parser: 3.2.4 - dateformat: 3.0.3 - get-pkg-repo: 4.2.1 - git-raw-commits: 2.0.11 - git-remote-origin-url: 2.0.0 - git-semver-tags: 4.1.1 - lodash: 4.17.21 - normalize-package-data: 3.0.3 - q: 1.5.1 - read-pkg: 3.0.0 - read-pkg-up: 3.0.0 - through2: 4.0.2 - dev: true - - /conventional-changelog-ember@2.0.9: - resolution: {integrity: sha512-ulzIReoZEvZCBDhcNYfDIsLTHzYHc7awh+eI44ZtV5cx6LVxLlVtEmcO+2/kGIHGtw+qVabJYjdI5cJOQgXh1A==} - engines: {node: '>=10'} - dependencies: - q: 1.5.1 - dev: true - - /conventional-changelog-eslint@3.0.9: - resolution: {integrity: sha512-6NpUCMgU8qmWmyAMSZO5NrRd7rTgErjrm4VASam2u5jrZS0n38V7Y9CzTtLT2qwz5xEChDR4BduoWIr8TfwvXA==} - engines: {node: '>=10'} - dependencies: - q: 1.5.1 - dev: true - - /conventional-changelog-express@2.0.6: - resolution: {integrity: sha512-SDez2f3iVJw6V563O3pRtNwXtQaSmEfTCaTBPCqn0oG0mfkq0rX4hHBq5P7De2MncoRixrALj3u3oQsNK+Q0pQ==} - engines: {node: '>=10'} - dependencies: - q: 1.5.1 - dev: true - - /conventional-changelog-jquery@3.0.11: - resolution: {integrity: sha512-x8AWz5/Td55F7+o/9LQ6cQIPwrCjfJQ5Zmfqi8thwUEKHstEn4kTIofXub7plf1xvFA2TqhZlq7fy5OmV6BOMw==} - engines: {node: '>=10'} - dependencies: - q: 1.5.1 - dev: true - - /conventional-changelog-jshint@2.0.9: - resolution: {integrity: sha512-wMLdaIzq6TNnMHMy31hql02OEQ8nCQfExw1SE0hYL5KvU+JCTuPaDO+7JiogGT2gJAxiUGATdtYYfh+nT+6riA==} - engines: {node: '>=10'} - dependencies: - compare-func: 2.0.0 - q: 1.5.1 - dev: true - - /conventional-changelog-preset-loader@2.3.4: - resolution: {integrity: sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g==} - engines: {node: '>=10'} - dev: true - - /conventional-changelog-preset-loader@3.0.0: - resolution: {integrity: sha512-qy9XbdSLmVnwnvzEisjxdDiLA4OmV3o8db+Zdg4WiFw14fP3B6XNz98X0swPPpkTd/pc1K7+adKgEDM1JCUMiA==} - engines: {node: '>=14'} - dev: true - - /conventional-changelog-writer@5.0.1: - resolution: {integrity: sha512-5WsuKUfxW7suLblAbFnxAcrvf6r+0b7GvNaWUwUIk0bXMnENP/PEieGKVUQrjPqwPT4o3EPAASBXiY6iHooLOQ==} - engines: {node: '>=10'} - hasBin: true - dependencies: - conventional-commits-filter: 2.0.7 - dateformat: 3.0.3 - handlebars: 4.7.8 - json-stringify-safe: 5.0.1 - lodash: 4.17.21 - meow: 8.1.2 - semver: 6.3.1 - split: 1.0.1 - through2: 4.0.2 - dev: true - - /conventional-changelog@3.1.25: - resolution: {integrity: sha512-ryhi3fd1mKf3fSjbLXOfK2D06YwKNic1nC9mWqybBHdObPd8KJ2vjaXZfYj1U23t+V8T8n0d7gwnc9XbIdFbyQ==} - engines: {node: '>=10'} - dependencies: - conventional-changelog-angular: 5.0.13 - conventional-changelog-atom: 2.0.8 - conventional-changelog-codemirror: 2.0.8 - conventional-changelog-conventionalcommits: 4.6.3 - conventional-changelog-core: 4.2.4 - conventional-changelog-ember: 2.0.9 - conventional-changelog-eslint: 3.0.9 - conventional-changelog-express: 2.0.6 - conventional-changelog-jquery: 3.0.11 - conventional-changelog-jshint: 2.0.9 - conventional-changelog-preset-loader: 2.3.4 - dev: true - - /conventional-commits-filter@2.0.7: - resolution: {integrity: sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA==} - engines: {node: '>=10'} - dependencies: - lodash.ismatch: 4.4.0 - modify-values: 1.0.1 - dev: true - - /conventional-commits-filter@3.0.0: - resolution: {integrity: sha512-1ymej8b5LouPx9Ox0Dw/qAO2dVdfpRFq28e5Y0jJEU8ZrLdy0vOSkkIInwmxErFGhg6SALro60ZrwYFVTUDo4Q==} - engines: {node: '>=14'} - dependencies: - lodash.ismatch: 4.4.0 - modify-values: 1.0.1 - dev: true - - /conventional-commits-parser@3.2.4: - resolution: {integrity: sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q==} - engines: {node: '>=10'} - hasBin: true - dependencies: - JSONStream: 1.3.5 - is-text-path: 1.0.1 - lodash: 4.17.21 - meow: 8.1.2 - split2: 3.2.2 - through2: 4.0.2 - dev: true - - /conventional-commits-parser@4.0.0: - resolution: {integrity: sha512-WRv5j1FsVM5FISJkoYMR6tPk07fkKT0UodruX4je86V4owk451yjXAKzKAPOs9l7y59E2viHUS9eQ+dfUA9NSg==} - engines: {node: '>=14'} - hasBin: true - dependencies: - JSONStream: 1.3.5 - is-text-path: 1.0.1 - meow: 8.1.2 - split2: 3.2.2 - dev: true - - /conventional-recommended-bump@7.0.1: - resolution: {integrity: sha512-Ft79FF4SlOFvX4PkwFDRnaNiIVX7YbmqGU0RwccUaiGvgp3S0a8ipR2/Qxk31vclDNM+GSdJOVs2KrsUCjblVA==} - engines: {node: '>=14'} - hasBin: true - dependencies: - concat-stream: 2.0.0 - conventional-changelog-preset-loader: 3.0.0 - conventional-commits-filter: 3.0.0 - conventional-commits-parser: 4.0.0 - git-raw-commits: 3.0.0 - git-semver-tags: 5.0.1 - meow: 8.1.2 - dev: true - - /core-util-is@1.0.3: - resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} - dev: true - - /cosmiconfig@8.2.0: - resolution: {integrity: sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ==} - engines: {node: '>=14'} - dependencies: - import-fresh: 3.3.0 - js-yaml: 4.1.0 - parse-json: 5.2.0 - path-type: 4.0.0 - dev: true - - /css-tree@2.3.1: - resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} - engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} - dependencies: - mdn-data: 2.0.30 - source-map-js: 1.0.2 - dev: true - - /cssstyle@4.0.1: - resolution: {integrity: sha512-8ZYiJ3A/3OkDd093CBT/0UKDWry7ak4BdPTFP2+QEP7cmhouyq/Up709ASSj2cK02BbZiMgk7kYjZNS4QP5qrQ==} - engines: {node: '>=18'} - dependencies: - rrweb-cssom: 0.6.0 - dev: true - - /dargs@7.0.0: - resolution: {integrity: sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==} - engines: {node: '>=8'} - dev: true - - /data-urls@5.0.0: - resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} - engines: {node: '>=18'} - dependencies: - whatwg-mimetype: 4.0.0 - whatwg-url: 14.0.0 - dev: true - - /dateformat@3.0.3: - resolution: {integrity: sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==} - dev: true - - /debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - dev: true - - /decamelize-keys@1.1.1: - resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} - engines: {node: '>=0.10.0'} - dependencies: - decamelize: 1.2.0 - map-obj: 1.0.1 - dev: true - - /decamelize@1.2.0: - resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} - engines: {node: '>=0.10.0'} - dev: true - - /decimal.js@10.4.3: - resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} - dev: true - - /delayed-stream@1.0.0: - resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} - engines: {node: '>=0.4.0'} - dev: true - - /detect-indent@6.1.0: - resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} - engines: {node: '>=8'} - dev: true - - /detect-newline@3.1.0: - resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} - engines: {node: '>=8'} - dev: true - - /dot-prop@5.3.0: - resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} - engines: {node: '>=8'} - dependencies: - is-obj: 2.0.0 - dev: true - - /dotgitignore@2.1.0: - resolution: {integrity: sha512-sCm11ak2oY6DglEPpCB8TixLjWAxd3kJTs6UIcSasNYxXdFPV+YKlye92c8H4kKFqV5qYMIh7d+cYecEg0dIkA==} - engines: {node: '>=6'} - dependencies: - find-up: 3.0.0 - minimatch: 3.1.2 - dev: true - - /emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - dev: true - - /entities@4.5.0: - resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} - engines: {node: '>=0.12'} - dev: true - - /error-ex@1.3.2: - resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - dependencies: - is-arrayish: 0.2.1 - dev: true - - /escalade@3.1.2: - resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} - engines: {node: '>=6'} - dev: true - - /escape-string-regexp@1.0.5: - resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} - engines: {node: '>=0.8.0'} - dev: true - - /fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - dev: true - - /fast-diff@1.3.0: - resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - dev: true - - /fast-json-stable-stringify@2.1.0: - resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - dev: true - - /figures@3.2.0: - resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} - engines: {node: '>=8'} - dependencies: - escape-string-regexp: 1.0.5 - dev: true - - /find-up@2.1.0: - resolution: {integrity: sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==} - engines: {node: '>=4'} - dependencies: - locate-path: 2.0.0 - dev: true - - /find-up@3.0.0: - resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} - engines: {node: '>=6'} - dependencies: - locate-path: 3.0.0 - dev: true - - /find-up@4.1.0: - resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} - engines: {node: '>=8'} - dependencies: - locate-path: 5.0.0 - path-exists: 4.0.0 - dev: true - - /find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - dev: true - - /form-data@4.0.0: - resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} - engines: {node: '>= 6'} - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - mime-types: 2.1.35 - dev: true - - /fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - dev: true - - /function-bind@1.1.2: - resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - dev: true - - /get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - dev: true - - /get-pkg-repo@4.2.1: - resolution: {integrity: sha512-2+QbHjFRfGB74v/pYWjd5OhU3TDIC2Gv/YKUTk/tCvAz0pkn/Mz6P3uByuBimLOcPvN2jYdScl3xGFSrx0jEcA==} - engines: {node: '>=6.9.0'} - hasBin: true - dependencies: - '@hutson/parse-repository-url': 3.0.2 - hosted-git-info: 4.1.0 - through2: 2.0.5 - yargs: 16.2.0 - dev: true - - /git-raw-commits@2.0.11: - resolution: {integrity: sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==} - engines: {node: '>=10'} - hasBin: true - dependencies: - dargs: 7.0.0 - lodash: 4.17.21 - meow: 8.1.2 - split2: 3.2.2 - through2: 4.0.2 - dev: true - - /git-raw-commits@3.0.0: - resolution: {integrity: sha512-b5OHmZ3vAgGrDn/X0kS+9qCfNKWe4K/jFnhwzVWWg0/k5eLa3060tZShrRg8Dja5kPc+YjS0Gc6y7cRr44Lpjw==} - engines: {node: '>=14'} - hasBin: true - dependencies: - dargs: 7.0.0 - meow: 8.1.2 - split2: 3.2.2 - dev: true - - /git-remote-origin-url@2.0.0: - resolution: {integrity: sha512-eU+GGrZgccNJcsDH5LkXR3PB9M958hxc7sbA8DFJjrv9j4L2P/eZfKhM+QD6wyzpiv+b1BpK0XrYCxkovtjSLw==} - engines: {node: '>=4'} - dependencies: - gitconfiglocal: 1.0.0 - pify: 2.3.0 - dev: true - - /git-semver-tags@4.1.1: - resolution: {integrity: sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA==} - engines: {node: '>=10'} - hasBin: true - dependencies: - meow: 8.1.2 - semver: 6.3.1 - dev: true - - /git-semver-tags@5.0.1: - resolution: {integrity: sha512-hIvOeZwRbQ+7YEUmCkHqo8FOLQZCEn18yevLHADlFPZY02KJGsu5FZt9YW/lybfK2uhWFI7Qg/07LekJiTv7iA==} - engines: {node: '>=14'} - hasBin: true - dependencies: - meow: 8.1.2 - semver: 7.6.0 - dev: true - - /gitconfiglocal@1.0.0: - resolution: {integrity: sha512-spLUXeTAVHxDtKsJc8FkFVgFtMdEN9qPGpL23VfSHx4fP4+Ds097IXLvymbnDH8FnmxX5Nr9bPw3A+AQ6mWEaQ==} - dependencies: - ini: 1.3.8 - dev: true - - /glob@8.1.0: - resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} - engines: {node: '>=12'} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 5.1.6 - once: 1.4.0 - dev: true - - /graceful-fs@4.2.11: - resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - dev: true - - /handlebars@4.7.8: - resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} - engines: {node: '>=0.4.7'} - hasBin: true - dependencies: - minimist: 1.2.8 - neo-async: 2.6.2 - source-map: 0.6.1 - wordwrap: 1.0.0 - optionalDependencies: - uglify-js: 3.17.4 - dev: true - - /hard-rejection@2.1.0: - resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} - engines: {node: '>=6'} - dev: true - - /has-flag@3.0.0: - resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} - engines: {node: '>=4'} - dev: true - - /has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - dev: true - - /hasown@2.0.1: - resolution: {integrity: sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==} - engines: {node: '>= 0.4'} - dependencies: - function-bind: 1.1.2 - dev: true - - /hosted-git-info@2.8.9: - resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} - dev: true - - /hosted-git-info@4.1.0: - resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==} - engines: {node: '>=10'} - dependencies: - lru-cache: 6.0.0 - dev: true - - /html-encoding-sniffer@4.0.0: - resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==} - engines: {node: '>=18'} - dependencies: - whatwg-encoding: 3.1.1 - dev: true - - /http-proxy-agent@7.0.2: - resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} - engines: {node: '>= 14'} - dependencies: - agent-base: 7.1.0 - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - dev: true - - /https-proxy-agent@7.0.4: - resolution: {integrity: sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==} - engines: {node: '>= 14'} - dependencies: - agent-base: 7.1.0 - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - dev: true - - /iconv-lite@0.6.3: - resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} - engines: {node: '>=0.10.0'} - dependencies: - safer-buffer: 2.1.2 - dev: true - - /ignore@5.2.4: - resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} - engines: {node: '>= 4'} - dev: true - - /import-fresh@3.3.0: - resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} - engines: {node: '>=6'} - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 - dev: true - - /indent-string@4.0.0: - resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} - engines: {node: '>=8'} - dev: true - - /inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - dev: true - - /inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true - - /ini@1.3.8: - resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} - dev: true - - /is-arrayish@0.2.1: - resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - dev: true - - /is-core-module@2.13.1: - resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} - dependencies: - hasown: 2.0.1 - dev: true - - /is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - dev: true - - /is-obj@2.0.0: - resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} - engines: {node: '>=8'} - dev: true - - /is-plain-obj@1.1.0: - resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} - engines: {node: '>=0.10.0'} - dev: true - - /is-potential-custom-element-name@1.0.1: - resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} - dev: true - - /is-text-path@1.0.1: - resolution: {integrity: sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==} - engines: {node: '>=0.10.0'} - dependencies: - text-extensions: 1.9.0 - dev: true - - /isarray@1.0.0: - resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} - dev: true - - /js-tokens@4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - dev: true - - /js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true - dependencies: - argparse: 2.0.1 - dev: true - - /jsdom@23.2.0: - resolution: {integrity: sha512-L88oL7D/8ufIES+Zjz7v0aes+oBMh2Xnh3ygWvL0OaICOomKEPKuPnIfBJekiXr+BHbbMjrWn/xqrDQuxFTeyA==} - engines: {node: '>=18'} - peerDependencies: - canvas: ^2.11.2 - peerDependenciesMeta: - canvas: - optional: true - dependencies: - '@asamuzakjp/dom-selector': 2.0.2 - cssstyle: 4.0.1 - data-urls: 5.0.0 - decimal.js: 10.4.3 - form-data: 4.0.0 - html-encoding-sniffer: 4.0.0 - http-proxy-agent: 7.0.2 - https-proxy-agent: 7.0.4 - is-potential-custom-element-name: 1.0.1 - parse5: 7.1.2 - rrweb-cssom: 0.6.0 - saxes: 6.0.0 - symbol-tree: 3.2.4 - tough-cookie: 4.1.3 - w3c-xmlserializer: 5.0.0 - webidl-conversions: 7.0.0 - whatwg-encoding: 3.1.1 - whatwg-mimetype: 4.0.0 - whatwg-url: 14.0.0 - ws: 8.16.0 - xml-name-validator: 5.0.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - dev: true - - /json-parse-better-errors@1.0.2: - resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} - dev: true - - /json-parse-even-better-errors@2.3.1: - resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - dev: true - - /json-schema-traverse@0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - dev: true - - /json-schema-traverse@1.0.0: - resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} - dev: true - - /json-stringify-safe@5.0.1: - resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} - dev: true - - /jsonparse@1.3.1: - resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} - engines: {'0': node >= 0.2.0} - dev: true - - /kind-of@6.0.3: - resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} - engines: {node: '>=0.10.0'} - dev: true - - /lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - dev: true - - /load-json-file@4.0.0: - resolution: {integrity: sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==} - engines: {node: '>=4'} - dependencies: - graceful-fs: 4.2.11 - parse-json: 4.0.0 - pify: 3.0.0 - strip-bom: 3.0.0 - dev: true - - /locate-path@2.0.0: - resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==} - engines: {node: '>=4'} - dependencies: - p-locate: 2.0.0 - path-exists: 3.0.0 - dev: true - - /locate-path@3.0.0: - resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} - engines: {node: '>=6'} - dependencies: - p-locate: 3.0.0 - path-exists: 3.0.0 - dev: true - - /locate-path@5.0.0: - resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} - engines: {node: '>=8'} - dependencies: - p-locate: 4.1.0 - dev: true - - /locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - dependencies: - p-locate: 5.0.0 - dev: true - - /lodash.ismatch@4.4.0: - resolution: {integrity: sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==} - dev: true - - /lodash.truncate@4.4.2: - resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} - dev: true - - /lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - dev: true - - /lru-cache@6.0.0: - resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} - engines: {node: '>=10'} - dependencies: - yallist: 4.0.0 - dev: true - - /map-obj@1.0.1: - resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} - engines: {node: '>=0.10.0'} - dev: true - - /map-obj@4.3.0: - resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} - engines: {node: '>=8'} - dev: true - - /mdn-data@2.0.30: - resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} - dev: true - - /meow@8.1.2: - resolution: {integrity: sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==} - engines: {node: '>=10'} - dependencies: - '@types/minimist': 1.2.5 - camelcase-keys: 6.2.2 - decamelize-keys: 1.1.1 - hard-rejection: 2.1.0 - minimist-options: 4.1.0 - normalize-package-data: 3.0.3 - read-pkg-up: 7.0.1 - redent: 3.0.0 - trim-newlines: 3.0.1 - type-fest: 0.18.1 - yargs-parser: 20.2.9 - dev: true - - /mime-db@1.52.0: - resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} - engines: {node: '>= 0.6'} - dev: true - - /mime-types@2.1.35: - resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} - engines: {node: '>= 0.6'} - dependencies: - mime-db: 1.52.0 - dev: true - - /min-indent@1.0.1: - resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} - engines: {node: '>=4'} - dev: true - - /minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - dependencies: - brace-expansion: 1.1.11 - dev: true - - /minimatch@5.1.6: - resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} - engines: {node: '>=10'} - dependencies: - brace-expansion: 2.0.1 - dev: true - - /minimist-options@4.1.0: - resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} - engines: {node: '>= 6'} - dependencies: - arrify: 1.0.1 - is-plain-obj: 1.1.0 - kind-of: 6.0.3 - dev: true - - /minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - dev: true - - /modify-values@1.0.1: - resolution: {integrity: sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==} - engines: {node: '>=0.10.0'} - dev: true - - /ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - dev: true - - /neo-async@2.6.2: - resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} - dev: true - - /normalize-package-data@2.5.0: - resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} - dependencies: - hosted-git-info: 2.8.9 - resolve: 1.22.8 - semver: 5.7.2 - validate-npm-package-license: 3.0.4 - dev: true - - /normalize-package-data@3.0.3: - resolution: {integrity: sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==} - engines: {node: '>=10'} - dependencies: - hosted-git-info: 4.1.0 - is-core-module: 2.13.1 - semver: 7.6.0 - validate-npm-package-license: 3.0.4 - dev: true - - /once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - dependencies: - wrappy: 1.0.2 - dev: true - - /p-limit@1.3.0: - resolution: {integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==} - engines: {node: '>=4'} - dependencies: - p-try: 1.0.0 - dev: true - - /p-limit@2.3.0: - resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} - engines: {node: '>=6'} - dependencies: - p-try: 2.2.0 - dev: true - - /p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - dependencies: - yocto-queue: 0.1.0 - dev: true - - /p-locate@2.0.0: - resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} - engines: {node: '>=4'} - dependencies: - p-limit: 1.3.0 - dev: true - - /p-locate@3.0.0: - resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} - engines: {node: '>=6'} - dependencies: - p-limit: 2.3.0 - dev: true - - /p-locate@4.1.0: - resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} - engines: {node: '>=8'} - dependencies: - p-limit: 2.3.0 - dev: true - - /p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - dependencies: - p-limit: 3.1.0 - dev: true - - /p-try@1.0.0: - resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==} - engines: {node: '>=4'} - dev: true - - /p-try@2.2.0: - resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} - engines: {node: '>=6'} - dev: true - - /parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} - dependencies: - callsites: 3.1.0 - dev: true - - /parse-json@4.0.0: - resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} - engines: {node: '>=4'} - dependencies: - error-ex: 1.3.2 - json-parse-better-errors: 1.0.2 - dev: true - - /parse-json@5.2.0: - resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} - engines: {node: '>=8'} - dependencies: - '@babel/code-frame': 7.22.5 - error-ex: 1.3.2 - json-parse-even-better-errors: 2.3.1 - lines-and-columns: 1.2.4 - dev: true - - /parse5@7.1.2: - resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} - dependencies: - entities: 4.5.0 - dev: true - - /path-exists@3.0.0: - resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} - engines: {node: '>=4'} - dev: true - - /path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - dev: true - - /path-parse@1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - dev: true - - /path-type@3.0.0: - resolution: {integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==} - engines: {node: '>=4'} - dependencies: - pify: 3.0.0 - dev: true - - /path-type@4.0.0: - resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} - engines: {node: '>=8'} - dev: true - - /pify@2.3.0: - resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} - engines: {node: '>=0.10.0'} - dev: true - - /pify@3.0.0: - resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} - engines: {node: '>=4'} - dev: true - - /pluralize@8.0.0: - resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} - engines: {node: '>=4'} - dev: true - - /prettier@2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} - hasBin: true - requiresBuild: true - dev: true - optional: true - - /prettier@3.0.0: - resolution: {integrity: sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==} - engines: {node: '>=14'} - hasBin: true - dev: true - - /process-nextick-args@2.0.1: - resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} - dev: true - - /psl@1.9.0: - resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} - dev: true - - /punycode@2.3.0: - resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} - engines: {node: '>=6'} - dev: true - - /punycode@2.3.1: - resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} - engines: {node: '>=6'} - dev: true - - /q@1.5.1: - resolution: {integrity: sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==} - engines: {node: '>=0.6.0', teleport: '>=0.2.0'} - dev: true - - /querystringify@2.2.0: - resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} - dev: true - - /quick-lru@4.0.1: - resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} - engines: {node: '>=8'} - dev: true - - /read-pkg-up@3.0.0: - resolution: {integrity: sha512-YFzFrVvpC6frF1sz8psoHDBGF7fLPc+llq/8NB43oagqWkx8ar5zYtsTORtOjw9W2RHLpWP+zTWwBvf1bCmcSw==} - engines: {node: '>=4'} - dependencies: - find-up: 2.1.0 - read-pkg: 3.0.0 - dev: true - - /read-pkg-up@7.0.1: - resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} - engines: {node: '>=8'} - dependencies: - find-up: 4.1.0 - read-pkg: 5.2.0 - type-fest: 0.8.1 - dev: true - - /read-pkg@3.0.0: - resolution: {integrity: sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==} - engines: {node: '>=4'} - dependencies: - load-json-file: 4.0.0 - normalize-package-data: 2.5.0 - path-type: 3.0.0 - dev: true - - /read-pkg@5.2.0: - resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} - engines: {node: '>=8'} - dependencies: - '@types/normalize-package-data': 2.4.4 - normalize-package-data: 2.5.0 - parse-json: 5.2.0 - type-fest: 0.6.0 - dev: true - - /readable-stream@2.3.8: - resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} - dependencies: - core-util-is: 1.0.3 - inherits: 2.0.4 - isarray: 1.0.0 - process-nextick-args: 2.0.1 - safe-buffer: 5.1.2 - string_decoder: 1.1.1 - util-deprecate: 1.0.2 - dev: true - - /readable-stream@3.6.2: - resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} - engines: {node: '>= 6'} - dependencies: - inherits: 2.0.4 - string_decoder: 1.3.0 - util-deprecate: 1.0.2 - dev: true - - /redent@3.0.0: - resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} - engines: {node: '>=8'} - dependencies: - indent-string: 4.0.0 - strip-indent: 3.0.0 - dev: true - - /require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - dev: true - - /require-from-string@2.0.2: - resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} - engines: {node: '>=0.10.0'} - dev: true - - /requires-port@1.0.0: - resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} - dev: true - - /resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - dev: true - - /resolve@1.22.8: - resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} - hasBin: true - dependencies: - is-core-module: 2.13.1 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - dev: true - - /rrweb-cssom@0.6.0: - resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} - dev: true - - /safe-buffer@5.1.2: - resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} - dev: true - - /safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - dev: true - - /safer-buffer@2.1.2: - resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - dev: true - - /saxes@6.0.0: - resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} - engines: {node: '>=v12.22.7'} - dependencies: - xmlchars: 2.2.0 - dev: true - - /semver@5.7.2: - resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} - hasBin: true - dev: true - - /semver@6.3.1: - resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} - hasBin: true - dev: true - - /semver@7.6.0: - resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} - engines: {node: '>=10'} - hasBin: true - dependencies: - lru-cache: 6.0.0 - dev: true - - /slice-ansi@4.0.0: - resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - astral-regex: 2.0.0 - is-fullwidth-code-point: 3.0.0 - dev: true - - /solhint-community@3.6.0: - resolution: {integrity: sha512-3WGi8nB9VSdC7B3xawktFoQkJEgX6rsUe7jWZJteDBdix+tAOGN+2ZhRr7Cyv1s+h5BRLSsNOXoh7Vg9KEeQbg==} - hasBin: true - dependencies: - '@solidity-parser/parser': 0.16.1 - ajv: 6.12.6 - antlr4: 4.13.0 - ast-parents: 0.0.1 - chalk: 4.1.2 - commander: 10.0.1 - cosmiconfig: 8.2.0 - fast-diff: 1.3.0 - glob: 8.1.0 - ignore: 5.2.4 - js-yaml: 4.1.0 - lodash: 4.17.21 - pluralize: 8.0.0 - semver: 6.3.1 - strip-ansi: 6.0.1 - table: 6.8.1 - text-table: 0.2.0 - optionalDependencies: - prettier: 2.8.8 - dev: true - - /source-map-js@1.0.2: - resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} - engines: {node: '>=0.10.0'} - dev: true - - /source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - dev: true - - /spdx-correct@3.2.0: - resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} - dependencies: - spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.17 - dev: true - - /spdx-exceptions@2.5.0: - resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} - dev: true - - /spdx-expression-parse@3.0.1: - resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} - dependencies: - spdx-exceptions: 2.5.0 - spdx-license-ids: 3.0.17 - dev: true - - /spdx-license-ids@3.0.17: - resolution: {integrity: sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==} - dev: true - - /split2@3.2.2: - resolution: {integrity: sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==} - dependencies: - readable-stream: 3.6.2 - dev: true - - /split@1.0.1: - resolution: {integrity: sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==} - dependencies: - through: 2.3.8 - dev: true - - /string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - dev: true - - /string_decoder@1.1.1: - resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} - dependencies: - safe-buffer: 5.1.2 - dev: true - - /string_decoder@1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} - dependencies: - safe-buffer: 5.2.1 - dev: true - - /strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - dependencies: - ansi-regex: 5.0.1 - dev: true - - /strip-bom@3.0.0: - resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} - engines: {node: '>=4'} - dev: true - - /strip-indent@3.0.0: - resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} - engines: {node: '>=8'} - dependencies: - min-indent: 1.0.1 - dev: true - - /supports-color@5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} - dependencies: - has-flag: 3.0.0 - dev: true - - /supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - dependencies: - has-flag: 4.0.0 - dev: true - - /supports-preserve-symlinks-flag@1.0.0: - resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} - engines: {node: '>= 0.4'} - dev: true - - /symbol-tree@3.2.4: - resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} - dev: true - - /table@6.8.1: - resolution: {integrity: sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==} - engines: {node: '>=10.0.0'} - dependencies: - ajv: 8.12.0 - lodash.truncate: 4.4.2 - slice-ansi: 4.0.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - dev: true - - /text-extensions@1.9.0: - resolution: {integrity: sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==} - engines: {node: '>=0.10'} - dev: true - - /text-table@0.2.0: - resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - dev: true - - /through2@2.0.5: - resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} - dependencies: - readable-stream: 2.3.8 - xtend: 4.0.2 - dev: true - - /through2@4.0.2: - resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==} - dependencies: - readable-stream: 3.6.2 - dev: true - - /through@2.3.8: - resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - dev: true - - /tough-cookie@4.1.3: - resolution: {integrity: sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==} - engines: {node: '>=6'} - dependencies: - psl: 1.9.0 - punycode: 2.3.0 - universalify: 0.2.0 - url-parse: 1.5.10 - dev: true - - /tr46@5.0.0: - resolution: {integrity: sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==} - engines: {node: '>=18'} - dependencies: - punycode: 2.3.1 - dev: true - - /trim-newlines@3.0.1: - resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} - engines: {node: '>=8'} - dev: true - - /type-fest@0.18.1: - resolution: {integrity: sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==} - engines: {node: '>=10'} - dev: true - - /type-fest@0.6.0: - resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} - engines: {node: '>=8'} - dev: true - - /type-fest@0.8.1: - resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} - engines: {node: '>=8'} - dev: true - - /typedarray@0.0.6: - resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - dev: true - - /uglify-js@3.17.4: - resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} - engines: {node: '>=0.8.0'} - hasBin: true - requiresBuild: true - dev: true - optional: true - - /universalify@0.2.0: - resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} - engines: {node: '>= 4.0.0'} - dev: true - - /uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - dependencies: - punycode: 2.3.0 - dev: true - - /url-parse@1.5.10: - resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} - dependencies: - querystringify: 2.2.0 - requires-port: 1.0.0 - dev: true - - /util-deprecate@1.0.2: - resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - dev: true - - /validate-npm-package-license@3.0.4: - resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} - dependencies: - spdx-correct: 3.2.0 - spdx-expression-parse: 3.0.1 - dev: true - - /w3c-xmlserializer@5.0.0: - resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} - engines: {node: '>=18'} - dependencies: - xml-name-validator: 5.0.0 - dev: true - - /webidl-conversions@7.0.0: - resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} - engines: {node: '>=12'} - dev: true - - /whatwg-encoding@3.1.1: - resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} - engines: {node: '>=18'} - dependencies: - iconv-lite: 0.6.3 - dev: true - - /whatwg-mimetype@4.0.0: - resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} - engines: {node: '>=18'} - dev: true - - /whatwg-url@14.0.0: - resolution: {integrity: sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==} - engines: {node: '>=18'} - dependencies: - tr46: 5.0.0 - webidl-conversions: 7.0.0 - dev: true - - /wordwrap@1.0.0: - resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} - dev: true - - /wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - dev: true - - /wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - dev: true - - /ws@8.16.0: - resolution: {integrity: sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: '>=5.0.2' - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - dev: true - - /xml-name-validator@5.0.0: - resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} - engines: {node: '>=18'} - dev: true - - /xmlchars@2.2.0: - resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} - dev: true - - /xtend@4.0.2: - resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} - engines: {node: '>=0.4'} - dev: true - - /y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - dev: true - - /yallist@4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - dev: true - - /yargs-parser@20.2.9: - resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} - engines: {node: '>=10'} - dev: true - - /yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - dev: true - - /yargs@16.2.0: - resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} - engines: {node: '>=10'} - dependencies: - cliui: 7.0.4 - escalade: 3.1.2 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 20.2.9 - dev: true - - /yargs@17.7.2: - resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} - engines: {node: '>=12'} - dependencies: - cliui: 8.0.1 - escalade: 3.1.2 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.1.1 - dev: true - - /yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - dev: true diff --git a/contracts/remappings.txt b/contracts/remappings.txt deleted file mode 100644 index b46e1bf..0000000 --- a/contracts/remappings.txt +++ /dev/null @@ -1,2 +0,0 @@ -forge-std/=lib/forge-std/src/ -Openzeppelin/=lib/openzeppelin-contracts/contracts diff --git a/contracts/script/Base.s.sol b/contracts/script/Base.s.sol deleted file mode 100644 index 2a106d7..0000000 --- a/contracts/script/Base.s.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.19 <=0.9.0; - -import { Script } from "forge-std/Script.sol"; - -abstract contract BaseScript is Script { - /// @dev Included to enable compilation of the script without a $MNEMONIC environment variable. - string internal constant TEST_MNEMONIC = "test test test test test test test test test test test junk"; - - /// @dev Needed for the deterministic deployments. - bytes32 internal constant ZERO_SALT = bytes32(0); - - /// @dev The address of the transaction broadcaster. - address internal broadcaster; - - /// @dev Used to derive the broadcaster's address if $ETH_FROM is not defined. - string internal mnemonic; - - /// @dev Initializes the transaction broadcaster like this: - /// - /// - If $ETH_FROM is defined, use it. - /// - Otherwise, derive the broadcaster address from $MNEMONIC. - /// - If $MNEMONIC is not defined, default to a test mnemonic. - /// - /// The use case for $ETH_FROM is to specify the broadcaster key and its address via the command line. - constructor() { - address from = vm.envOr({ name: "ETH_FROM", defaultValue: address(0) }); - if (from != address(0)) { - broadcaster = from; - } else { - mnemonic = vm.envOr({ name: "MNEMONIC", defaultValue: TEST_MNEMONIC }); - (broadcaster,) = deriveRememberKey({ mnemonic: mnemonic, index: 0 }); - } - } - - modifier broadcast() { - vm.startBroadcast(broadcaster); - _; - vm.stopBroadcast(); - } -} diff --git a/contracts/script/Deploy.s.sol b/contracts/script/Deploy.s.sol deleted file mode 100644 index dc74e7c..0000000 --- a/contracts/script/Deploy.s.sol +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <=0.9.0; - -import { ScKeystore } from "../src/ScKeystore.sol"; -import { BaseScript } from "./Base.s.sol"; -import { DeploymentConfig } from "./DeploymentConfig.s.sol"; - -contract Deploy is BaseScript { - function run( - address initialOwner - ) - public - broadcast - returns (ScKeystore scKeystore, DeploymentConfig deploymentConfig) - { - deploymentConfig = new DeploymentConfig(broadcaster); - scKeystore = new ScKeystore(initialOwner); - } -} diff --git a/contracts/script/DeploymentConfig.s.sol b/contracts/script/DeploymentConfig.s.sol deleted file mode 100644 index 371b7d8..0000000 --- a/contracts/script/DeploymentConfig.s.sol +++ /dev/null @@ -1,39 +0,0 @@ -//// SPDX-License-Identifier: UNLICENSED - -pragma solidity >=0.8.19 <=0.9.0; - -import { Script } from "forge-std/Script.sol"; - -contract DeploymentConfig is Script { - error DeploymentConfig_InvalidDeployerAddress(); - error DeploymentConfig_NoConfigForChain(uint256); - - struct NetworkConfig { - address deployer; - } - - NetworkConfig public activeNetworkConfig; - - address private deployer; - - constructor(address _broadcaster) { - if (_broadcaster == address(0)) revert DeploymentConfig_InvalidDeployerAddress(); - deployer = _broadcaster; - if (block.chainid == 31_337) { - activeNetworkConfig = getOrCreateAnvilEthConfig(); - } else { - revert DeploymentConfig_NoConfigForChain(block.chainid); - } - } - - function getOrCreateAnvilEthConfig() public view returns (NetworkConfig memory) { - return NetworkConfig({ deployer: deployer }); - } - - // This function is a hack to have it excluded by `forge coverage` until - // https://github.com/foundry-rs/foundry/issues/2988 is fixed. - // See: https://github.com/foundry-rs/foundry/issues/2988#issuecomment-1437784542 - // for more info. - // solhint-disable-next-line - function test() public { } -} diff --git a/contracts/slither.config.json b/contracts/slither.config.json deleted file mode 100644 index 9a2fba9..0000000 --- a/contracts/slither.config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "detectors_to_exclude": "naming-convention,reentrancy-events,solc-version,timestamp", - "filter_paths": "(lib|test)", - "solc_remaps": [ - "@openzeppelin/contracts=lib/openzeppelin-contracts/contracts/", - "forge-std/=lib/forge-std/src/" - ] -} diff --git a/contracts/src/IScKeystore.sol b/contracts/src/IScKeystore.sol deleted file mode 100644 index ef64527..0000000 --- a/contracts/src/IScKeystore.sol +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.24; - -interface IScKeystore { - function userExists(address user) external view returns (bool); - - function addUser(address user) external; - - function removeUser(address user) external; -} diff --git a/contracts/src/ScKeystore.sol b/contracts/src/ScKeystore.sol deleted file mode 100644 index fa0a492..0000000 --- a/contracts/src/ScKeystore.sol +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.24; - -import { Ownable } from "Openzeppelin/access/Ownable.sol"; -import { IScKeystore } from "./IScKeystore.sol"; - -error UserAlreadyExists(); -error UserDoesNotExist(); - -contract ScKeystore is Ownable, IScKeystore { - event UserAdded(address user); - event UserRemoved(address user); - - mapping(address user => bool exists) private users; - - constructor(address initialOwner) Ownable(initialOwner) { } - - function userExists(address user) public view returns (bool) { - return users[user]; - } - - function addUser(address user) external onlyOwner { - if (userExists(user)) revert UserAlreadyExists(); - - users[user] = true; - - emit UserAdded(user); - } - - function removeUser(address user) external onlyOwner { - if (!userExists(user)) revert UserDoesNotExist(); - users[user] == false; - emit UserRemoved(user); - } -} diff --git a/contracts/test/ScKeystore.t.sol b/contracts/test/ScKeystore.t.sol deleted file mode 100644 index 6849314..0000000 --- a/contracts/test/ScKeystore.t.sol +++ /dev/null @@ -1,59 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; - -import { Test } from "forge-std/Test.sol"; -import { Deploy } from "../script/Deploy.s.sol"; -import { DeploymentConfig } from "../script/DeploymentConfig.s.sol"; -import "forge-std/console.sol"; -import "../src/ScKeystore.sol"; // solhint-disable-line - -contract ScKeystoreTest is Test { - ScKeystore internal s; - DeploymentConfig internal deploymentConfig; - address internal deployer; - - function setUp() public virtual { - Deploy deployment = new Deploy(); - (s, deploymentConfig) = deployment.run(address(this)); - } - - function addUser() internal { - s.addUser(address(this)); - } - - function test__owner() public view { - assert(s.owner() == address(this)); - } - - function test__userExists__returnsFalse__whenUserDoesNotExist() public view { - assert(!s.userExists(address(this))); - } - - function test__addUser__reverts__whenUserAlreadyExists() public { - addUser(); - vm.expectRevert(UserAlreadyExists.selector); - addUser(); - } - - function test__addUser__addsUser__whenUserInfoIsValid() public { - addUser(); - assert(s.userExists(address(this))); - } - - function test__addUser__reverts__whenSenderIsNotOwner() public { - vm.prank(address(0)); - vm.expectRevert(); - addUser(); - vm.stopPrank(); - } - - function test__removeUser__reverts__whenUserDoesNotExist() public { - vm.expectRevert(); - s.removeUser(address(0)); - } - - function test__removeUser() public { - addUser(); - s.removeUser(address(this)); - } -} diff --git a/crates/bindings/Cargo.toml b/crates/bindings/Cargo.toml deleted file mode 100644 index 8589a10..0000000 --- a/crates/bindings/Cargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "foundry-contracts" -version = "0.1.0" -edition = "2021" - -[dependencies] -alloy = { git = "https://github.com/alloy-rs/alloy", features = ["sol-types", "contract"] } \ No newline at end of file diff --git a/crates/bindings/src/context.rs b/crates/bindings/src/context.rs deleted file mode 100644 index 1079b6d..0000000 --- a/crates/bindings/src/context.rs +++ /dev/null @@ -1,219 +0,0 @@ -/** - -Generated by the following Solidity interface... -```solidity -interface Context {} -``` - -...which was generated by the following JSON ABI: -```json -[] -```*/ -#[allow(non_camel_case_types, non_snake_case, clippy::style)] -pub mod Context { - use super::*; - use alloy::sol_types as alloy_sol_types; - /// The creation / init bytecode of the contract. - /// - /// ```text - ///0x - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"", - ); - /// The runtime bytecode of the contract, as deployed on the network. - /// - /// ```text - ///0x - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"", - ); - use alloy::contract as alloy_contract; - /**Creates a new wrapper around an on-chain [`Context`](self) contract instance. - - See the [wrapper's documentation](`ContextInstance`) for more details.*/ - #[inline] - pub const fn new< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - address: alloy_sol_types::private::Address, - provider: P, - ) -> ContextInstance { - ContextInstance::::new(address, provider) - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub fn deploy< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> impl ::core::future::Future>> - { - ContextInstance::::deploy(provider) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> alloy_contract::RawCallBuilder { - ContextInstance::::deploy_builder(provider) - } - /**A [`Context`](self) instance. - - Contains type-safe methods for interacting with an on-chain instance of the - [`Context`](self) contract located at a given `address`, using a given - provider `P`. - - If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) - documentation on how to provide it), the `deploy` and `deploy_builder` methods can - be used to deploy a new instance of the contract. - - See the [module-level documentation](self) for all the available methods.*/ - #[derive(Clone)] - pub struct ContextInstance { - address: alloy_sol_types::private::Address, - provider: P, - _network_transport: ::core::marker::PhantomData<(N, T)>, - } - #[automatically_derived] - impl ::core::fmt::Debug for ContextInstance { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("ContextInstance") - .field(&self.address) - .finish() - } - } - /// Instantiation and getters/setters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ContextInstance - { - /**Creates a new wrapper around an on-chain [`Context`](self) contract instance. - - See the [wrapper's documentation](`ContextInstance`) for more details.*/ - #[inline] - pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { - Self { - address, - provider, - _network_transport: ::core::marker::PhantomData, - } - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub async fn deploy(provider: P) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder(provider); - let contract_address = call_builder.deploy().await?; - Ok(Self::new(contract_address, call_builder.provider)) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { - alloy_contract::RawCallBuilder::new_raw_deploy( - provider, - ::core::clone::Clone::clone(&BYTECODE), - ) - } - /// Returns a reference to the address. - #[inline] - pub const fn address(&self) -> &alloy_sol_types::private::Address { - &self.address - } - /// Sets the address. - #[inline] - pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { - self.address = address; - } - /// Sets the address and returns `self`. - pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { - self.set_address(address); - self - } - /// Returns a reference to the provider. - #[inline] - pub const fn provider(&self) -> &P { - &self.provider - } - } - impl ContextInstance { - /// Clones the provider and returns a new instance with the cloned provider. - #[inline] - pub fn with_cloned_provider(self) -> ContextInstance { - ContextInstance { - address: self.address, - provider: ::core::clone::Clone::clone(&self.provider), - _network_transport: ::core::marker::PhantomData, - } - } - } - /// Function calls. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ContextInstance - { - /// Creates a new call builder using this contract instance's provider and address. - /// - /// Note that the call can be any function call, not just those defined in this - /// contract. Prefer using the other methods for building type-safe contract calls. - pub fn call_builder( - &self, - call: &C, - ) -> alloy_contract::SolCallBuilder { - alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) - } - } - /// Event filters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ContextInstance - { - /// Creates a new event filter using this contract instance's provider and address. - /// - /// Note that the type can be any event, not just those defined in this contract. - /// Prefer using the other methods for building type-safe event filters. - pub fn event_filter( - &self, - ) -> alloy_contract::Event { - alloy_contract::Event::new_sol(&self.provider, &self.address) - } - } -} diff --git a/crates/bindings/src/deploy.rs b/crates/bindings/src/deploy.rs deleted file mode 100644 index 57c4d87..0000000 --- a/crates/bindings/src/deploy.rs +++ /dev/null @@ -1,592 +0,0 @@ -/** - -Generated by the following Solidity interface... -```solidity -interface Deploy { - function IS_SCRIPT() external view returns (bool); - function run(address initialOwner) external returns (address scKeystore, address deploymentConfig); -} -``` - -...which was generated by the following JSON ABI: -```json -[ - { - "type": "function", - "name": "IS_SCRIPT", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "run", - "inputs": [ - { - "name": "initialOwner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "scKeystore", - "type": "address", - "internalType": "contract ScKeystore" - }, - { - "name": "deploymentConfig", - "type": "address", - "internalType": "contract DeploymentConfig" - } - ], - "stateMutability": "nonpayable" - } -] -```*/ -#[allow(non_camel_case_types, non_snake_case, clippy::style)] -pub mod Deploy { - use super::*; - use alloy::sol_types as alloy_sol_types; - /// The creation / init bytecode of the contract. - /// - /// ```text - ///0x6080604052600c805462ff00ff19166201000117905534801561002157600080fd5b50604080516301587f9560e61b8152600481019190915260086044820152674554485f46524f4d60c01b606482015260006024820181905290737109709ecfa91a80626ff3989d68f67f5b1dd12d9063561fe54090608401602060405180830381865afa158015610096573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100ba9190610365565b90506001600160a01b038116156100f457600c80546301000000600160b81b03191663010000006001600160a01b0384160217905561025e565b6040805160608101909152603b808252737109709ecfa91a80626ff3989d68f67f5b1dd12d9163d145736c916110c560208301396040518263ffffffff1660e01b815260040161014491906103e5565b600060405180830381865afa158015610161573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610189919081019061042d565b600d906101969082610564565b50610232600d80546101a7906104d9565b80601f01602080910402602001604051908101604052809291908181526020018280546101d3906104d9565b80156102205780601f106101f557610100808354040283529160200191610220565b820191906000526020600020905b81548152906001019060200180831161020357829003601f168201915b5050505050600061026460201b60201c565b50600c80546001600160a01b039092166301000000026301000000600160b81b03199092169190911790555b50610664565b604051636229498b60e01b81526000908190737109709ecfa91a80626ff3989d68f67f5b1dd12d90636229498b906102a29087908790600401610623565b602060405180830381865afa1580156102bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e3919061064b565b604051630884001960e21b815260048101829052909150737109709ecfa91a80626ff3989d68f67f5b1dd12d906322100064906024016020604051808303816000875af1158015610338573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035c9190610365565b91509250929050565b60006020828403121561037757600080fd5b81516001600160a01b038116811461038e57600080fd5b9392505050565b60005b838110156103b0578181015183820152602001610398565b50506000910152565b600081518084526103d1816020860160208601610395565b601f01601f19169290920160200192915050565b6040815260086040820152674d4e454d4f4e494360c01b606082015260806020820152600061038e60808301846103b9565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561043f57600080fd5b81516001600160401b038082111561045657600080fd5b818401915084601f83011261046a57600080fd5b81518181111561047c5761047c610417565b604051601f8201601f19908116603f011681019083821181831017156104a4576104a4610417565b816040528281528760208487010111156104bd57600080fd5b6104ce836020830160208801610395565b979650505050505050565b600181811c908216806104ed57607f821691505b60208210810361050d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561055f576000816000526020600020601f850160051c8101602086101561053c5750805b601f850160051c820191505b8181101561055b57828155600101610548565b5050505b505050565b81516001600160401b0381111561057d5761057d610417565b6105918161058b84546104d9565b84610513565b602080601f8311600181146105c657600084156105ae5750858301515b600019600386901b1c1916600185901b17855561055b565b600085815260208120601f198616915b828110156105f5578886015182559484019460019091019084016105d6565b50858210156106135787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60408152600061063660408301856103b9565b905063ffffffff831660208301529392505050565b60006020828403121561065d57600080fd5b5051919050565b610a52806106736000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063522bb7041461003b578063f8ccbf4714610080575b600080fd5b61004e61004936600461029b565b6100a3565b6040805173ffffffffffffffffffffffffffffffffffffffff9384168152929091166020830152015b60405180910390f35b600c546100939062010000900460ff1681565b6040519015158152602001610077565b600c546040517f7fec2a8d000000000000000000000000000000000000000000000000000000008152630100000090910473ffffffffffffffffffffffffffffffffffffffff1660048201526000908190737109709ecfa91a80626ff3989d68f67f5b1dd12d90637fec2a8d90602401600060405180830381600087803b15801561012d57600080fd5b505af1158015610141573d6000803e3d6000fd5b50505050600c60039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161017490610281565b73ffffffffffffffffffffffffffffffffffffffff9091168152602001604051809103906000f0801580156101ad573d6000803e3d6000fd5b509050826040516101bd9061028e565b73ffffffffffffffffffffffffffffffffffffffff9091168152602001604051809103906000f0801580156101f6573d6000803e3d6000fd5b5091507f885cb69240a935d632d79c317109709ecfa91a80626ff3989d68f67f5b1dd12d60001c73ffffffffffffffffffffffffffffffffffffffff166376eadd366040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561026457600080fd5b505af1158015610278573d6000803e3d6000fd5b50505050915091565b610223806102d983390190565b610556806104fc83390190565b6000602082840312156102ad57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146102d157600080fd5b939250505056fe6080604052600c805462ff00ff19166201000117905534801561002157600080fd5b50604051610223380380610223833981016040819052610040916100f0565b6001600160a01b0381166100675760405163201616d160e21b815260040160405180910390fd5b600e80546001600160a01b0319166001600160a01b03831617905546617a69036100cb57604080516020808201835260009091528151908101909152600e546001600160a01b031690819052600d80546001600160a01b03191690911790556100ea565b604051630b13dbff60e01b815246600482015260240160405180910390fd5b50610120565b60006020828403121561010257600080fd5b81516001600160a01b038116811461011957600080fd5b9392505050565b60f58061012e6000396000f3fe6080604052348015600f57600080fd5b506004361060465760003560e01c806312900da814604b578063d7b6574514608f578063f8a8fd6d1460d2578063f8ccbf471460d4575b600080fd5b6040805160208082018352600090915281518082018352600e5473ffffffffffffffffffffffffffffffffffffffff16908190529151918252015b60405180910390f35b600d5460ae9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016086565b005b600c5460e69062010000900460ff1681565b6040519015158152602001608656608060405234801561001057600080fd5b5060405161055638038061055683398101604081905261002f916100be565b806001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161006e565b50506100ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100d057600080fd5b81516001600160a01b03811681146100e757600080fd5b9392505050565b610459806100fd6000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c80638da5cb5b116100505780638da5cb5b146100e2578063985751881461010a578063f2fde38b1461011d57600080fd5b80630e666e4914610077578063421b2d8b146100c5578063715018a6146100da575b600080fd5b6100b061008536600461041c565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205460ff1690565b60405190151581526020015b60405180910390f35b6100d86100d336600461041c565b610130565b005b6100d861021f565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100bc565b6100d861011836600461041c565b610233565b6100d861012b36600461041c565b6102eb565b610138610354565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1615610198576040517fc344397e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660008181526001602081815260409283902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690921790915590519182527f19ef9a4877199f89440a26acb26895ec02ed86f2df1aeaa90dc18041b892f71f91015b60405180910390a150565b610227610354565b61023160006103a7565b565b61023b610354565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1661029a576040517f907b361f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000819052600160209081526040519182527fe9dce8c992623ce791725b21e857e33248d1f190a25b5168313420eebdaae99d9101610214565b6102f3610354565b73ffffffffffffffffffffffffffffffffffffffff8116610348576040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600060048201526024015b60405180910390fd5b610351816103a7565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610231576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161033f565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561042e57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461045257600080fd5b939250505056746573742074657374207465737420746573742074657374207465737420746573742074657374207465737420746573742074657374206a756e6b - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"`\x80`@R`\x0C\x80Tb\xFF\0\xFF\x19\x16b\x01\0\x01\x17\x90U4\x80\x15a\0!W`\0\x80\xFD[P`@\x80Qc\x01X\x7F\x95`\xE6\x1B\x81R`\x04\x81\x01\x91\x90\x91R`\x08`D\x82\x01RgETH_FROM`\xC0\x1B`d\x82\x01R`\0`$\x82\x01\x81\x90R\x90sq\tp\x9E\xCF\xA9\x1A\x80bo\xF3\x98\x9Dh\xF6\x7F[\x1D\xD1-\x90cV\x1F\xE5@\x90`\x84\x01` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\0\x96W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\0\xBA\x91\x90a\x03eV[\x90P`\x01`\x01`\xA0\x1B\x03\x81\x16\x15a\0\xF4W`\x0C\x80Tc\x01\0\0\0`\x01`\xB8\x1B\x03\x19\x16c\x01\0\0\0`\x01`\x01`\xA0\x1B\x03\x84\x16\x02\x17\x90Ua\x02^V[`@\x80Q``\x81\x01\x90\x91R`;\x80\x82Rsq\tp\x9E\xCF\xA9\x1A\x80bo\xF3\x98\x9Dh\xF6\x7F[\x1D\xD1-\x91c\xD1Esl\x91a\x10\xC5` \x83\x019`@Q\x82c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01a\x01D\x91\x90a\x03\xE5V[`\0`@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x01aW=`\0\x80>=`\0\xFD[PPPP`@Q=`\0\x82>`\x1F=\x90\x81\x01`\x1F\x19\x16\x82\x01`@Ra\x01\x89\x91\x90\x81\x01\x90a\x04-V[`\r\x90a\x01\x96\x90\x82a\x05dV[Pa\x022`\r\x80Ta\x01\xA7\x90a\x04\xD9V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x01\xD3\x90a\x04\xD9V[\x80\x15a\x02 W\x80`\x1F\x10a\x01\xF5Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x02 V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x02\x03W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP`\0a\x02d` \x1B` \x1CV[P`\x0C\x80T`\x01`\x01`\xA0\x1B\x03\x90\x92\x16c\x01\0\0\0\x02c\x01\0\0\0`\x01`\xB8\x1B\x03\x19\x90\x92\x16\x91\x90\x91\x17\x90U[Pa\x06dV[`@Qcb)I\x8B`\xE0\x1B\x81R`\0\x90\x81\x90sq\tp\x9E\xCF\xA9\x1A\x80bo\xF3\x98\x9Dh\xF6\x7F[\x1D\xD1-\x90cb)I\x8B\x90a\x02\xA2\x90\x87\x90\x87\x90`\x04\x01a\x06#V[` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x02\xBFW=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x02\xE3\x91\x90a\x06KV[`@Qc\x08\x84\0\x19`\xE2\x1B\x81R`\x04\x81\x01\x82\x90R\x90\x91Psq\tp\x9E\xCF\xA9\x1A\x80bo\xF3\x98\x9Dh\xF6\x7F[\x1D\xD1-\x90c\"\x10\0d\x90`$\x01` `@Q\x80\x83\x03\x81`\0\x87Z\xF1\x15\x80\x15a\x038W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x03\\\x91\x90a\x03eV[\x91P\x92P\x92\x90PV[`\0` \x82\x84\x03\x12\x15a\x03wW`\0\x80\xFD[\x81Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x03\x8EW`\0\x80\xFD[\x93\x92PPPV[`\0[\x83\x81\x10\x15a\x03\xB0W\x81\x81\x01Q\x83\x82\x01R` \x01a\x03\x98V[PP`\0\x91\x01RV[`\0\x81Q\x80\x84Ra\x03\xD1\x81` \x86\x01` \x86\x01a\x03\x95V[`\x1F\x01`\x1F\x19\x16\x92\x90\x92\x01` \x01\x92\x91PPV[`@\x81R`\x08`@\x82\x01RgMNEMONIC`\xC0\x1B``\x82\x01R`\x80` \x82\x01R`\0a\x03\x8E`\x80\x83\x01\x84a\x03\xB9V[cNH{q`\xE0\x1B`\0R`A`\x04R`$`\0\xFD[`\0` \x82\x84\x03\x12\x15a\x04?W`\0\x80\xFD[\x81Q`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\x04VW`\0\x80\xFD[\x81\x84\x01\x91P\x84`\x1F\x83\x01\x12a\x04jW`\0\x80\xFD[\x81Q\x81\x81\x11\x15a\x04|Wa\x04|a\x04\x17V[`@Q`\x1F\x82\x01`\x1F\x19\x90\x81\x16`?\x01\x16\x81\x01\x90\x83\x82\x11\x81\x83\x10\x17\x15a\x04\xA4Wa\x04\xA4a\x04\x17V[\x81`@R\x82\x81R\x87` \x84\x87\x01\x01\x11\x15a\x04\xBDW`\0\x80\xFD[a\x04\xCE\x83` \x83\x01` \x88\x01a\x03\x95V[\x97\x96PPPPPPPV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x04\xEDW`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x05\rWcNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[`\x1F\x82\x11\x15a\x05_W`\0\x81`\0R` `\0 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15a\x05=`\0\xFD[PPPP`\x0C`\x03\x90T\x90a\x01\0\n\x90\x04s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`@Qa\x01t\x90a\x02\x81V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`@Q\x80\x91\x03\x90`\0\xF0\x80\x15\x80\x15a\x01\xADW=`\0\x80>=`\0\xFD[P\x90P\x82`@Qa\x01\xBD\x90a\x02\x8EV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`@Q\x80\x91\x03\x90`\0\xF0\x80\x15\x80\x15a\x01\xF6W=`\0\x80>=`\0\xFD[P\x91P\x7F\x88\\\xB6\x92@\xA95\xD62\xD7\x9C1q\tp\x9E\xCF\xA9\x1A\x80bo\xF3\x98\x9Dh\xF6\x7F[\x1D\xD1-`\0\x1Cs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16cv\xEA\xDD6`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01`\0`@Q\x80\x83\x03\x81`\0\x87\x80;\x15\x80\x15a\x02dW`\0\x80\xFD[PZ\xF1\x15\x80\x15a\x02xW=`\0\x80>=`\0\xFD[PPPP\x91P\x91V[a\x02#\x80a\x02\xD9\x839\x01\x90V[a\x05V\x80a\x04\xFC\x839\x01\x90V[`\0` \x82\x84\x03\x12\x15a\x02\xADW`\0\x80\xFD[\x815s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x02\xD1W`\0\x80\xFD[\x93\x92PPPV\xFE`\x80`@R`\x0C\x80Tb\xFF\0\xFF\x19\x16b\x01\0\x01\x17\x90U4\x80\x15a\0!W`\0\x80\xFD[P`@Qa\x02#8\x03\x80a\x02#\x839\x81\x01`@\x81\x90Ra\0@\x91a\0\xF0V[`\x01`\x01`\xA0\x1B\x03\x81\x16a\0gW`@Qc \x16\x16\xD1`\xE2\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[`\x0E\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x83\x16\x17\x90UFazi\x03a\0\xCBW`@\x80Q` \x80\x82\x01\x83R`\0\x90\x91R\x81Q\x90\x81\x01\x90\x91R`\x0ET`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x90R`\r\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16\x90\x91\x17\x90Ua\0\xEAV[`@Qc\x0B\x13\xDB\xFF`\xE0\x1B\x81RF`\x04\x82\x01R`$\x01`@Q\x80\x91\x03\x90\xFD[Pa\x01 V[`\0` \x82\x84\x03\x12\x15a\x01\x02W`\0\x80\xFD[\x81Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x01\x19W`\0\x80\xFD[\x93\x92PPPV[`\xF5\x80a\x01.`\09`\0\xF3\xFE`\x80`@R4\x80\x15`\x0FW`\0\x80\xFD[P`\x046\x10`FW`\x005`\xE0\x1C\x80c\x12\x90\r\xA8\x14`KW\x80c\xD7\xB6WE\x14`\x8FW\x80c\xF8\xA8\xFDm\x14`\xD2W\x80c\xF8\xCC\xBFG\x14`\xD4W[`\0\x80\xFD[`@\x80Q` \x80\x82\x01\x83R`\0\x90\x91R\x81Q\x80\x82\x01\x83R`\x0ETs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90\x81\x90R\x91Q\x91\x82R\x01[`@Q\x80\x91\x03\x90\xF3[`\rT`\xAE\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`\x86V[\0[`\x0CT`\xE6\x90b\x01\0\0\x90\x04`\xFF\x16\x81V[`@Q\x90\x15\x15\x81R` \x01`\x86V`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`@Qa\x05V8\x03\x80a\x05V\x839\x81\x01`@\x81\x90Ra\0/\x91a\0\xBEV[\x80`\x01`\x01`\xA0\x1B\x03\x81\x16a\0^W`@Qc\x1EO\xBD\xF7`\xE0\x1B\x81R`\0`\x04\x82\x01R`$\x01`@Q\x80\x91\x03\x90\xFD[a\0g\x81a\0nV[PPa\0\xEEV[`\0\x80T`\x01`\x01`\xA0\x1B\x03\x83\x81\x16`\x01`\x01`\xA0\x1B\x03\x19\x83\x16\x81\x17\x84U`@Q\x91\x90\x92\x16\x92\x83\x91\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x91\x90\xA3PPV[`\0` \x82\x84\x03\x12\x15a\0\xD0W`\0\x80\xFD[\x81Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\0\xE7W`\0\x80\xFD[\x93\x92PPPV[a\x04Y\x80a\0\xFD`\09`\0\xF3\xFE`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0rW`\x005`\xE0\x1C\x80c\x8D\xA5\xCB[\x11a\0PW\x80c\x8D\xA5\xCB[\x14a\0\xE2W\x80c\x98WQ\x88\x14a\x01\nW\x80c\xF2\xFD\xE3\x8B\x14a\x01\x1DW`\0\x80\xFD[\x80c\x0EfnI\x14a\0wW\x80cB\x1B-\x8B\x14a\0\xC5W\x80cqP\x18\xA6\x14a\0\xDAW[`\0\x80\xFD[a\0\xB0a\0\x856`\x04a\x04\x1CV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16\x90V[`@Q\x90\x15\x15\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\0\xD8a\0\xD36`\x04a\x04\x1CV[a\x010V[\0[a\0\xD8a\x02\x1FV[`\0T`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\0\xBCV[a\0\xD8a\x01\x186`\x04a\x04\x1CV[a\x023V[a\0\xD8a\x01+6`\x04a\x04\x1CV[a\x02\xEBV[a\x018a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16\x15a\x01\x98W`@Q\x7F\xC3D9~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x81\x81R`\x01` \x81\x81R`@\x92\x83\x90 \x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16\x90\x92\x17\x90\x91U\x90Q\x91\x82R\x7F\x19\xEF\x9AHw\x19\x9F\x89D\n&\xAC\xB2h\x95\xEC\x02\xED\x86\xF2\xDF\x1A\xEA\xA9\r\xC1\x80A\xB8\x92\xF7\x1F\x91\x01[`@Q\x80\x91\x03\x90\xA1PV[a\x02'a\x03TV[a\x021`\0a\x03\xA7V[V[a\x02;a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16a\x02\x9AW`@Q\x7F\x90{6\x1F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x81\x90R`\x01` \x90\x81R`@Q\x91\x82R\x7F\xE9\xDC\xE8\xC9\x92b<\xE7\x91r[!\xE8W\xE32H\xD1\xF1\x90\xA2[Qh14 \xEE\xBD\xAA\xE9\x9D\x91\x01a\x02\x14V[a\x02\xF3a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16a\x03HW`@Q\x7F\x1EO\xBD\xF7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\0`\x04\x82\x01R`$\x01[`@Q\x80\x91\x03\x90\xFD[a\x03Q\x81a\x03\xA7V[PV[`\0Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x163\x14a\x021W`@Q\x7F\x11\x8C\xDA\xA7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R3`\x04\x82\x01R`$\x01a\x03?V[`\0\x80Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x81\x16\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83\x16\x81\x17\x84U`@Q\x91\x90\x92\x16\x92\x83\x91\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x91\x90\xA3PPV[`\0` \x82\x84\x03\x12\x15a\x04.W`\0\x80\xFD[\x815s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x04RW`\0\x80\xFD[\x93\x92PPPVtest test test test test test test test test test test junk", - ); - /// The runtime bytecode of the contract, as deployed on the network. - /// - /// ```text - ///0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063522bb7041461003b578063f8ccbf4714610080575b600080fd5b61004e61004936600461029b565b6100a3565b6040805173ffffffffffffffffffffffffffffffffffffffff9384168152929091166020830152015b60405180910390f35b600c546100939062010000900460ff1681565b6040519015158152602001610077565b600c546040517f7fec2a8d000000000000000000000000000000000000000000000000000000008152630100000090910473ffffffffffffffffffffffffffffffffffffffff1660048201526000908190737109709ecfa91a80626ff3989d68f67f5b1dd12d90637fec2a8d90602401600060405180830381600087803b15801561012d57600080fd5b505af1158015610141573d6000803e3d6000fd5b50505050600c60039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161017490610281565b73ffffffffffffffffffffffffffffffffffffffff9091168152602001604051809103906000f0801580156101ad573d6000803e3d6000fd5b509050826040516101bd9061028e565b73ffffffffffffffffffffffffffffffffffffffff9091168152602001604051809103906000f0801580156101f6573d6000803e3d6000fd5b5091507f885cb69240a935d632d79c317109709ecfa91a80626ff3989d68f67f5b1dd12d60001c73ffffffffffffffffffffffffffffffffffffffff166376eadd366040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561026457600080fd5b505af1158015610278573d6000803e3d6000fd5b50505050915091565b610223806102d983390190565b610556806104fc83390190565b6000602082840312156102ad57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146102d157600080fd5b939250505056fe6080604052600c805462ff00ff19166201000117905534801561002157600080fd5b50604051610223380380610223833981016040819052610040916100f0565b6001600160a01b0381166100675760405163201616d160e21b815260040160405180910390fd5b600e80546001600160a01b0319166001600160a01b03831617905546617a69036100cb57604080516020808201835260009091528151908101909152600e546001600160a01b031690819052600d80546001600160a01b03191690911790556100ea565b604051630b13dbff60e01b815246600482015260240160405180910390fd5b50610120565b60006020828403121561010257600080fd5b81516001600160a01b038116811461011957600080fd5b9392505050565b60f58061012e6000396000f3fe6080604052348015600f57600080fd5b506004361060465760003560e01c806312900da814604b578063d7b6574514608f578063f8a8fd6d1460d2578063f8ccbf471460d4575b600080fd5b6040805160208082018352600090915281518082018352600e5473ffffffffffffffffffffffffffffffffffffffff16908190529151918252015b60405180910390f35b600d5460ae9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016086565b005b600c5460e69062010000900460ff1681565b6040519015158152602001608656608060405234801561001057600080fd5b5060405161055638038061055683398101604081905261002f916100be565b806001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161006e565b50506100ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100d057600080fd5b81516001600160a01b03811681146100e757600080fd5b9392505050565b610459806100fd6000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c80638da5cb5b116100505780638da5cb5b146100e2578063985751881461010a578063f2fde38b1461011d57600080fd5b80630e666e4914610077578063421b2d8b146100c5578063715018a6146100da575b600080fd5b6100b061008536600461041c565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205460ff1690565b60405190151581526020015b60405180910390f35b6100d86100d336600461041c565b610130565b005b6100d861021f565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100bc565b6100d861011836600461041c565b610233565b6100d861012b36600461041c565b6102eb565b610138610354565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1615610198576040517fc344397e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660008181526001602081815260409283902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690921790915590519182527f19ef9a4877199f89440a26acb26895ec02ed86f2df1aeaa90dc18041b892f71f91015b60405180910390a150565b610227610354565b61023160006103a7565b565b61023b610354565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1661029a576040517f907b361f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000819052600160209081526040519182527fe9dce8c992623ce791725b21e857e33248d1f190a25b5168313420eebdaae99d9101610214565b6102f3610354565b73ffffffffffffffffffffffffffffffffffffffff8116610348576040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600060048201526024015b60405180910390fd5b610351816103a7565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610231576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161033f565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561042e57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461045257600080fd5b939250505056 - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\x006W`\x005`\xE0\x1C\x80cR+\xB7\x04\x14a\0;W\x80c\xF8\xCC\xBFG\x14a\0\x80W[`\0\x80\xFD[a\0Na\0I6`\x04a\x02\x9BV[a\0\xA3V[`@\x80Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x93\x84\x16\x81R\x92\x90\x91\x16` \x83\x01R\x01[`@Q\x80\x91\x03\x90\xF3[`\x0CTa\0\x93\x90b\x01\0\0\x90\x04`\xFF\x16\x81V[`@Q\x90\x15\x15\x81R` \x01a\0wV[`\x0CT`@Q\x7F\x7F\xEC*\x8D\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81Rc\x01\0\0\0\x90\x91\x04s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\x04\x82\x01R`\0\x90\x81\x90sq\tp\x9E\xCF\xA9\x1A\x80bo\xF3\x98\x9Dh\xF6\x7F[\x1D\xD1-\x90c\x7F\xEC*\x8D\x90`$\x01`\0`@Q\x80\x83\x03\x81`\0\x87\x80;\x15\x80\x15a\x01-W`\0\x80\xFD[PZ\xF1\x15\x80\x15a\x01AW=`\0\x80>=`\0\xFD[PPPP`\x0C`\x03\x90T\x90a\x01\0\n\x90\x04s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`@Qa\x01t\x90a\x02\x81V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`@Q\x80\x91\x03\x90`\0\xF0\x80\x15\x80\x15a\x01\xADW=`\0\x80>=`\0\xFD[P\x90P\x82`@Qa\x01\xBD\x90a\x02\x8EV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`@Q\x80\x91\x03\x90`\0\xF0\x80\x15\x80\x15a\x01\xF6W=`\0\x80>=`\0\xFD[P\x91P\x7F\x88\\\xB6\x92@\xA95\xD62\xD7\x9C1q\tp\x9E\xCF\xA9\x1A\x80bo\xF3\x98\x9Dh\xF6\x7F[\x1D\xD1-`\0\x1Cs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16cv\xEA\xDD6`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01`\0`@Q\x80\x83\x03\x81`\0\x87\x80;\x15\x80\x15a\x02dW`\0\x80\xFD[PZ\xF1\x15\x80\x15a\x02xW=`\0\x80>=`\0\xFD[PPPP\x91P\x91V[a\x02#\x80a\x02\xD9\x839\x01\x90V[a\x05V\x80a\x04\xFC\x839\x01\x90V[`\0` \x82\x84\x03\x12\x15a\x02\xADW`\0\x80\xFD[\x815s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x02\xD1W`\0\x80\xFD[\x93\x92PPPV\xFE`\x80`@R`\x0C\x80Tb\xFF\0\xFF\x19\x16b\x01\0\x01\x17\x90U4\x80\x15a\0!W`\0\x80\xFD[P`@Qa\x02#8\x03\x80a\x02#\x839\x81\x01`@\x81\x90Ra\0@\x91a\0\xF0V[`\x01`\x01`\xA0\x1B\x03\x81\x16a\0gW`@Qc \x16\x16\xD1`\xE2\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[`\x0E\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x83\x16\x17\x90UFazi\x03a\0\xCBW`@\x80Q` \x80\x82\x01\x83R`\0\x90\x91R\x81Q\x90\x81\x01\x90\x91R`\x0ET`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x90R`\r\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16\x90\x91\x17\x90Ua\0\xEAV[`@Qc\x0B\x13\xDB\xFF`\xE0\x1B\x81RF`\x04\x82\x01R`$\x01`@Q\x80\x91\x03\x90\xFD[Pa\x01 V[`\0` \x82\x84\x03\x12\x15a\x01\x02W`\0\x80\xFD[\x81Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x01\x19W`\0\x80\xFD[\x93\x92PPPV[`\xF5\x80a\x01.`\09`\0\xF3\xFE`\x80`@R4\x80\x15`\x0FW`\0\x80\xFD[P`\x046\x10`FW`\x005`\xE0\x1C\x80c\x12\x90\r\xA8\x14`KW\x80c\xD7\xB6WE\x14`\x8FW\x80c\xF8\xA8\xFDm\x14`\xD2W\x80c\xF8\xCC\xBFG\x14`\xD4W[`\0\x80\xFD[`@\x80Q` \x80\x82\x01\x83R`\0\x90\x91R\x81Q\x80\x82\x01\x83R`\x0ETs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90\x81\x90R\x91Q\x91\x82R\x01[`@Q\x80\x91\x03\x90\xF3[`\rT`\xAE\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`\x86V[\0[`\x0CT`\xE6\x90b\x01\0\0\x90\x04`\xFF\x16\x81V[`@Q\x90\x15\x15\x81R` \x01`\x86V`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`@Qa\x05V8\x03\x80a\x05V\x839\x81\x01`@\x81\x90Ra\0/\x91a\0\xBEV[\x80`\x01`\x01`\xA0\x1B\x03\x81\x16a\0^W`@Qc\x1EO\xBD\xF7`\xE0\x1B\x81R`\0`\x04\x82\x01R`$\x01`@Q\x80\x91\x03\x90\xFD[a\0g\x81a\0nV[PPa\0\xEEV[`\0\x80T`\x01`\x01`\xA0\x1B\x03\x83\x81\x16`\x01`\x01`\xA0\x1B\x03\x19\x83\x16\x81\x17\x84U`@Q\x91\x90\x92\x16\x92\x83\x91\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x91\x90\xA3PPV[`\0` \x82\x84\x03\x12\x15a\0\xD0W`\0\x80\xFD[\x81Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\0\xE7W`\0\x80\xFD[\x93\x92PPPV[a\x04Y\x80a\0\xFD`\09`\0\xF3\xFE`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0rW`\x005`\xE0\x1C\x80c\x8D\xA5\xCB[\x11a\0PW\x80c\x8D\xA5\xCB[\x14a\0\xE2W\x80c\x98WQ\x88\x14a\x01\nW\x80c\xF2\xFD\xE3\x8B\x14a\x01\x1DW`\0\x80\xFD[\x80c\x0EfnI\x14a\0wW\x80cB\x1B-\x8B\x14a\0\xC5W\x80cqP\x18\xA6\x14a\0\xDAW[`\0\x80\xFD[a\0\xB0a\0\x856`\x04a\x04\x1CV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16\x90V[`@Q\x90\x15\x15\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\0\xD8a\0\xD36`\x04a\x04\x1CV[a\x010V[\0[a\0\xD8a\x02\x1FV[`\0T`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\0\xBCV[a\0\xD8a\x01\x186`\x04a\x04\x1CV[a\x023V[a\0\xD8a\x01+6`\x04a\x04\x1CV[a\x02\xEBV[a\x018a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16\x15a\x01\x98W`@Q\x7F\xC3D9~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x81\x81R`\x01` \x81\x81R`@\x92\x83\x90 \x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16\x90\x92\x17\x90\x91U\x90Q\x91\x82R\x7F\x19\xEF\x9AHw\x19\x9F\x89D\n&\xAC\xB2h\x95\xEC\x02\xED\x86\xF2\xDF\x1A\xEA\xA9\r\xC1\x80A\xB8\x92\xF7\x1F\x91\x01[`@Q\x80\x91\x03\x90\xA1PV[a\x02'a\x03TV[a\x021`\0a\x03\xA7V[V[a\x02;a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16a\x02\x9AW`@Q\x7F\x90{6\x1F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x81\x90R`\x01` \x90\x81R`@Q\x91\x82R\x7F\xE9\xDC\xE8\xC9\x92b<\xE7\x91r[!\xE8W\xE32H\xD1\xF1\x90\xA2[Qh14 \xEE\xBD\xAA\xE9\x9D\x91\x01a\x02\x14V[a\x02\xF3a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16a\x03HW`@Q\x7F\x1EO\xBD\xF7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\0`\x04\x82\x01R`$\x01[`@Q\x80\x91\x03\x90\xFD[a\x03Q\x81a\x03\xA7V[PV[`\0Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x163\x14a\x021W`@Q\x7F\x11\x8C\xDA\xA7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R3`\x04\x82\x01R`$\x01a\x03?V[`\0\x80Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x81\x16\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83\x16\x81\x17\x84U`@Q\x91\x90\x92\x16\x92\x83\x91\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x91\x90\xA3PPV[`\0` \x82\x84\x03\x12\x15a\x04.W`\0\x80\xFD[\x815s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x04RW`\0\x80\xFD[\x93\x92PPPV", - ); - /**Function with signature `IS_SCRIPT()` and selector `0xf8ccbf47`. - ```solidity - function IS_SCRIPT() external view returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct IS_SCRIPTCall {} - ///Container type for the return parameters of the [`IS_SCRIPT()`](IS_SCRIPTCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct IS_SCRIPTReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: IS_SCRIPTCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for IS_SCRIPTCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: IS_SCRIPTReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for IS_SCRIPTReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for IS_SCRIPTCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = IS_SCRIPTReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "IS_SCRIPT()"; - const SELECTOR: [u8; 4] = [248u8, 204u8, 191u8, 71u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `run(address)` and selector `0x522bb704`. - ```solidity - function run(address initialOwner) external returns (address scKeystore, address deploymentConfig); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct runCall { - pub initialOwner: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`run(address)`](runCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct runReturn { - pub scKeystore: alloy::sol_types::private::Address, - pub deploymentConfig: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: runCall) -> Self { - (value.initialOwner,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for runCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - initialOwner: tuple.0, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: runReturn) -> Self { - (value.scKeystore, value.deploymentConfig) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for runReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - scKeystore: tuple.0, - deploymentConfig: tuple.1, - } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for runCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = runReturn; - type ReturnTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "run(address)"; - const SELECTOR: [u8; 4] = [82u8, 43u8, 183u8, 4u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.initialOwner, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - ///Container for all the [`Deploy`](self) function calls. - pub enum DeployCalls { - IS_SCRIPT(IS_SCRIPTCall), - run(runCall), - } - #[automatically_derived] - impl DeployCalls { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = - &[[82u8, 43u8, 183u8, 4u8], [248u8, 204u8, 191u8, 71u8]]; - } - #[automatically_derived] - impl alloy_sol_types::SolInterface for DeployCalls { - const NAME: &'static str = "DeployCalls"; - const MIN_DATA_LENGTH: usize = 0usize; - const COUNT: usize = 2usize; - #[inline] - fn selector(&self) -> [u8; 4] { - match self { - Self::IS_SCRIPT(_) => ::SELECTOR, - Self::run(_) => ::SELECTOR, - } - } - #[inline] - fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { - Self::SELECTORS.get(i).copied() - } - #[inline] - fn valid_selector(selector: [u8; 4]) -> bool { - Self::SELECTORS.binary_search(&selector).is_ok() - } - #[inline] - #[allow(unsafe_code, non_snake_case)] - fn abi_decode_raw( - selector: [u8; 4], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = &[ - { - fn run(data: &[u8], validate: bool) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(DeployCalls::run) - } - run - }, - { - fn IS_SCRIPT( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(DeployCalls::IS_SCRIPT) - } - IS_SCRIPT - }, - ]; - let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err(alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - )); - }; - (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) - } - #[inline] - fn abi_encoded_size(&self) -> usize { - match self { - Self::IS_SCRIPT(inner) => { - ::abi_encoded_size(inner) - } - Self::run(inner) => ::abi_encoded_size(inner), - } - } - #[inline] - fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { - match self { - Self::IS_SCRIPT(inner) => { - ::abi_encode_raw(inner, out) - } - Self::run(inner) => { - ::abi_encode_raw(inner, out) - } - } - } - } - use alloy::contract as alloy_contract; - /**Creates a new wrapper around an on-chain [`Deploy`](self) contract instance. - - See the [wrapper's documentation](`DeployInstance`) for more details.*/ - #[inline] - pub const fn new< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - address: alloy_sol_types::private::Address, - provider: P, - ) -> DeployInstance { - DeployInstance::::new(address, provider) - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub fn deploy< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> impl ::core::future::Future>> { - DeployInstance::::deploy(provider) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> alloy_contract::RawCallBuilder { - DeployInstance::::deploy_builder(provider) - } - /**A [`Deploy`](self) instance. - - Contains type-safe methods for interacting with an on-chain instance of the - [`Deploy`](self) contract located at a given `address`, using a given - provider `P`. - - If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) - documentation on how to provide it), the `deploy` and `deploy_builder` methods can - be used to deploy a new instance of the contract. - - See the [module-level documentation](self) for all the available methods.*/ - #[derive(Clone)] - pub struct DeployInstance { - address: alloy_sol_types::private::Address, - provider: P, - _network_transport: ::core::marker::PhantomData<(N, T)>, - } - #[automatically_derived] - impl ::core::fmt::Debug for DeployInstance { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("DeployInstance") - .field(&self.address) - .finish() - } - } - /// Instantiation and getters/setters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > DeployInstance - { - /**Creates a new wrapper around an on-chain [`Deploy`](self) contract instance. - - See the [wrapper's documentation](`DeployInstance`) for more details.*/ - #[inline] - pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { - Self { - address, - provider, - _network_transport: ::core::marker::PhantomData, - } - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub async fn deploy(provider: P) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder(provider); - let contract_address = call_builder.deploy().await?; - Ok(Self::new(contract_address, call_builder.provider)) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { - alloy_contract::RawCallBuilder::new_raw_deploy( - provider, - ::core::clone::Clone::clone(&BYTECODE), - ) - } - /// Returns a reference to the address. - #[inline] - pub const fn address(&self) -> &alloy_sol_types::private::Address { - &self.address - } - /// Sets the address. - #[inline] - pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { - self.address = address; - } - /// Sets the address and returns `self`. - pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { - self.set_address(address); - self - } - /// Returns a reference to the provider. - #[inline] - pub const fn provider(&self) -> &P { - &self.provider - } - } - impl DeployInstance { - /// Clones the provider and returns a new instance with the cloned provider. - #[inline] - pub fn with_cloned_provider(self) -> DeployInstance { - DeployInstance { - address: self.address, - provider: ::core::clone::Clone::clone(&self.provider), - _network_transport: ::core::marker::PhantomData, - } - } - } - /// Function calls. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > DeployInstance - { - /// Creates a new call builder using this contract instance's provider and address. - /// - /// Note that the call can be any function call, not just those defined in this - /// contract. Prefer using the other methods for building type-safe contract calls. - pub fn call_builder( - &self, - call: &C, - ) -> alloy_contract::SolCallBuilder { - alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) - } - ///Creates a new call builder for the [`IS_SCRIPT`] function. - pub fn IS_SCRIPT(&self) -> alloy_contract::SolCallBuilder { - self.call_builder(&IS_SCRIPTCall {}) - } - ///Creates a new call builder for the [`run`] function. - pub fn run( - &self, - initialOwner: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&runCall { initialOwner }) - } - } - /// Event filters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > DeployInstance - { - /// Creates a new event filter using this contract instance's provider and address. - /// - /// Note that the type can be any event, not just those defined in this contract. - /// Prefer using the other methods for building type-safe event filters. - pub fn event_filter( - &self, - ) -> alloy_contract::Event { - alloy_contract::Event::new_sol(&self.provider, &self.address) - } - } -} diff --git a/crates/bindings/src/deploymentconfig.rs b/crates/bindings/src/deploymentconfig.rs deleted file mode 100644 index cbe3687..0000000 --- a/crates/bindings/src/deploymentconfig.rs +++ /dev/null @@ -1,1381 +0,0 @@ -/** - -Generated by the following Solidity interface... -```solidity -interface DeploymentConfig { - struct NetworkConfig { - address deployer; - } - - error DeploymentConfig_InvalidDeployerAddress(); - error DeploymentConfig_NoConfigForChain(uint256); - - constructor(address _broadcaster); - - function IS_SCRIPT() external view returns (bool); - function activeNetworkConfig() external view returns (address deployer); - function getOrCreateAnvilEthConfig() external view returns (NetworkConfig memory); - function test() external; -} -``` - -...which was generated by the following JSON ABI: -```json -[ - { - "type": "constructor", - "inputs": [ - { - "name": "_broadcaster", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "IS_SCRIPT", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "activeNetworkConfig", - "inputs": [], - "outputs": [ - { - "name": "deployer", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getOrCreateAnvilEthConfig", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct DeploymentConfig.NetworkConfig", - "components": [ - { - "name": "deployer", - "type": "address", - "internalType": "address" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "test", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "error", - "name": "DeploymentConfig_InvalidDeployerAddress", - "inputs": [] - }, - { - "type": "error", - "name": "DeploymentConfig_NoConfigForChain", - "inputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ] - } -] -```*/ -#[allow(non_camel_case_types, non_snake_case, clippy::style)] -pub mod DeploymentConfig { - use super::*; - use alloy::sol_types as alloy_sol_types; - /// The creation / init bytecode of the contract. - /// - /// ```text - ///0x6080604052600c805462ff00ff19166201000117905534801561002157600080fd5b50604051610223380380610223833981016040819052610040916100f0565b6001600160a01b0381166100675760405163201616d160e21b815260040160405180910390fd5b600e80546001600160a01b0319166001600160a01b03831617905546617a69036100cb57604080516020808201835260009091528151908101909152600e546001600160a01b031690819052600d80546001600160a01b03191690911790556100ea565b604051630b13dbff60e01b815246600482015260240160405180910390fd5b50610120565b60006020828403121561010257600080fd5b81516001600160a01b038116811461011957600080fd5b9392505050565b60f58061012e6000396000f3fe6080604052348015600f57600080fd5b506004361060465760003560e01c806312900da814604b578063d7b6574514608f578063f8a8fd6d1460d2578063f8ccbf471460d4575b600080fd5b6040805160208082018352600090915281518082018352600e5473ffffffffffffffffffffffffffffffffffffffff16908190529151918252015b60405180910390f35b600d5460ae9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016086565b005b600c5460e69062010000900460ff1681565b6040519015158152602001608656 - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"`\x80`@R`\x0C\x80Tb\xFF\0\xFF\x19\x16b\x01\0\x01\x17\x90U4\x80\x15a\0!W`\0\x80\xFD[P`@Qa\x02#8\x03\x80a\x02#\x839\x81\x01`@\x81\x90Ra\0@\x91a\0\xF0V[`\x01`\x01`\xA0\x1B\x03\x81\x16a\0gW`@Qc \x16\x16\xD1`\xE2\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[`\x0E\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x83\x16\x17\x90UFazi\x03a\0\xCBW`@\x80Q` \x80\x82\x01\x83R`\0\x90\x91R\x81Q\x90\x81\x01\x90\x91R`\x0ET`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x90R`\r\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16\x90\x91\x17\x90Ua\0\xEAV[`@Qc\x0B\x13\xDB\xFF`\xE0\x1B\x81RF`\x04\x82\x01R`$\x01`@Q\x80\x91\x03\x90\xFD[Pa\x01 V[`\0` \x82\x84\x03\x12\x15a\x01\x02W`\0\x80\xFD[\x81Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x01\x19W`\0\x80\xFD[\x93\x92PPPV[`\xF5\x80a\x01.`\09`\0\xF3\xFE`\x80`@R4\x80\x15`\x0FW`\0\x80\xFD[P`\x046\x10`FW`\x005`\xE0\x1C\x80c\x12\x90\r\xA8\x14`KW\x80c\xD7\xB6WE\x14`\x8FW\x80c\xF8\xA8\xFDm\x14`\xD2W\x80c\xF8\xCC\xBFG\x14`\xD4W[`\0\x80\xFD[`@\x80Q` \x80\x82\x01\x83R`\0\x90\x91R\x81Q\x80\x82\x01\x83R`\x0ETs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90\x81\x90R\x91Q\x91\x82R\x01[`@Q\x80\x91\x03\x90\xF3[`\rT`\xAE\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`\x86V[\0[`\x0CT`\xE6\x90b\x01\0\0\x90\x04`\xFF\x16\x81V[`@Q\x90\x15\x15\x81R` \x01`\x86V", - ); - /// The runtime bytecode of the contract, as deployed on the network. - /// - /// ```text - ///0x6080604052348015600f57600080fd5b506004361060465760003560e01c806312900da814604b578063d7b6574514608f578063f8a8fd6d1460d2578063f8ccbf471460d4575b600080fd5b6040805160208082018352600090915281518082018352600e5473ffffffffffffffffffffffffffffffffffffffff16908190529151918252015b60405180910390f35b600d5460ae9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016086565b005b600c5460e69062010000900460ff1681565b6040519015158152602001608656 - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"`\x80`@R4\x80\x15`\x0FW`\0\x80\xFD[P`\x046\x10`FW`\x005`\xE0\x1C\x80c\x12\x90\r\xA8\x14`KW\x80c\xD7\xB6WE\x14`\x8FW\x80c\xF8\xA8\xFDm\x14`\xD2W\x80c\xF8\xCC\xBFG\x14`\xD4W[`\0\x80\xFD[`@\x80Q` \x80\x82\x01\x83R`\0\x90\x91R\x81Q\x80\x82\x01\x83R`\x0ETs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90\x81\x90R\x91Q\x91\x82R\x01[`@Q\x80\x91\x03\x90\xF3[`\rT`\xAE\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`\x86V[\0[`\x0CT`\xE6\x90b\x01\0\0\x90\x04`\xFF\x16\x81V[`@Q\x90\x15\x15\x81R` \x01`\x86V", - ); - /**```solidity - struct NetworkConfig { address deployer; } - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct NetworkConfig { - pub deployer: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: NetworkConfig) -> Self { - (value.deployer,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for NetworkConfig { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { deployer: tuple.0 } - } - } - #[automatically_derived] - impl alloy_sol_types::SolValue for NetworkConfig { - type SolType = Self; - } - #[automatically_derived] - impl alloy_sol_types::private::SolTypeValue for NetworkConfig { - #[inline] - fn stv_to_tokens(&self) -> ::Token<'_> { - ( - ::tokenize( - &self.deployer, - ), - ) - } - #[inline] - fn stv_abi_encoded_size(&self) -> usize { - if let Some(size) = ::ENCODED_SIZE { - return size; - } - let tuple = - as ::core::convert::From>::from(self.clone()); - as alloy_sol_types::SolType>::abi_encoded_size(&tuple) - } - #[inline] - fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { - ::eip712_hash_struct(self) - } - #[inline] - fn stv_abi_encode_packed_to(&self, out: &mut alloy_sol_types::private::Vec) { - let tuple = - as ::core::convert::From>::from(self.clone()); - as alloy_sol_types::SolType>::abi_encode_packed_to( - &tuple, out, - ) - } - #[inline] - fn stv_abi_packed_encoded_size(&self) -> usize { - if let Some(size) = ::PACKED_ENCODED_SIZE { - return size; - } - let tuple = - as ::core::convert::From>::from(self.clone()); - as alloy_sol_types::SolType>::abi_packed_encoded_size( - &tuple, - ) - } - } - #[automatically_derived] - impl alloy_sol_types::SolType for NetworkConfig { - type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SOL_NAME: &'static str = ::NAME; - const ENCODED_SIZE: Option = - as alloy_sol_types::SolType>::ENCODED_SIZE; - const PACKED_ENCODED_SIZE: Option = - as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; - #[inline] - fn valid_token(token: &Self::Token<'_>) -> bool { - as alloy_sol_types::SolType>::valid_token(token) - } - #[inline] - fn detokenize(token: Self::Token<'_>) -> Self::RustType { - let tuple = as alloy_sol_types::SolType>::detokenize(token); - >>::from(tuple) - } - } - #[automatically_derived] - impl alloy_sol_types::SolStruct for NetworkConfig { - const NAME: &'static str = "NetworkConfig"; - #[inline] - fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { - alloy_sol_types::private::Cow::Borrowed("NetworkConfig(address deployer)") - } - #[inline] - fn eip712_components( - ) -> alloy_sol_types::private::Vec> - { - alloy_sol_types::private::Vec::new() - } - #[inline] - fn eip712_encode_type() -> alloy_sol_types::private::Cow<'static, str> { - ::eip712_root_type() - } - #[inline] - fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { - ::eip712_data_word( - &self.deployer, - ) - .0 - .to_vec() - } - } - #[automatically_derived] - impl alloy_sol_types::EventTopic for NetworkConfig { - #[inline] - fn topic_preimage_length(rust: &Self::RustType) -> usize { - 0usize - + ::topic_preimage_length( - &rust.deployer, - ) - } - #[inline] - fn encode_topic_preimage( - rust: &Self::RustType, - out: &mut alloy_sol_types::private::Vec, - ) { - out.reserve(::topic_preimage_length(rust)); - ::encode_topic_preimage( - &rust.deployer, - out, - ); - } - #[inline] - fn encode_topic(rust: &Self::RustType) -> alloy_sol_types::abi::token::WordToken { - let mut out = alloy_sol_types::private::Vec::new(); - ::encode_topic_preimage(rust, &mut out); - alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) - } - } - }; - /**Custom error with signature `DeploymentConfig_InvalidDeployerAddress()` and selector `0x80585b44`. - ```solidity - error DeploymentConfig_InvalidDeployerAddress(); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct DeploymentConfig_InvalidDeployerAddress {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: DeploymentConfig_InvalidDeployerAddress) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for DeploymentConfig_InvalidDeployerAddress { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - #[automatically_derived] - impl alloy_sol_types::SolError for DeploymentConfig_InvalidDeployerAddress { - type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "DeploymentConfig_InvalidDeployerAddress()"; - const SELECTOR: [u8; 4] = [128u8, 88u8, 91u8, 68u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - } - }; - /**Custom error with signature `DeploymentConfig_NoConfigForChain(uint256)` and selector `0x0b13dbff`. - ```solidity - error DeploymentConfig_NoConfigForChain(uint256); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct DeploymentConfig_NoConfigForChain { - pub _0: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: DeploymentConfig_NoConfigForChain) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for DeploymentConfig_NoConfigForChain { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - #[automatically_derived] - impl alloy_sol_types::SolError for DeploymentConfig_NoConfigForChain { - type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "DeploymentConfig_NoConfigForChain(uint256)"; - const SELECTOR: [u8; 4] = [11u8, 19u8, 219u8, 255u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self._0, - ), - ) - } - } - }; - /**Constructor`. - ```solidity - constructor(address _broadcaster); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct constructorCall { - pub _broadcaster: alloy::sol_types::private::Address, - } - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: constructorCall) -> Self { - (value._broadcaster,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for constructorCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _broadcaster: tuple.0, - } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolConstructor for constructorCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._broadcaster, - ), - ) - } - } - }; - /**Function with signature `IS_SCRIPT()` and selector `0xf8ccbf47`. - ```solidity - function IS_SCRIPT() external view returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct IS_SCRIPTCall {} - ///Container type for the return parameters of the [`IS_SCRIPT()`](IS_SCRIPTCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct IS_SCRIPTReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: IS_SCRIPTCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for IS_SCRIPTCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: IS_SCRIPTReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for IS_SCRIPTReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for IS_SCRIPTCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = IS_SCRIPTReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "IS_SCRIPT()"; - const SELECTOR: [u8; 4] = [248u8, 204u8, 191u8, 71u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `activeNetworkConfig()` and selector `0xd7b65745`. - ```solidity - function activeNetworkConfig() external view returns (address deployer); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct activeNetworkConfigCall {} - ///Container type for the return parameters of the [`activeNetworkConfig()`](activeNetworkConfigCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct activeNetworkConfigReturn { - pub deployer: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: activeNetworkConfigCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for activeNetworkConfigCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: activeNetworkConfigReturn) -> Self { - (value.deployer,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for activeNetworkConfigReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { deployer: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for activeNetworkConfigCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = activeNetworkConfigReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "activeNetworkConfig()"; - const SELECTOR: [u8; 4] = [215u8, 182u8, 87u8, 69u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `getOrCreateAnvilEthConfig()` and selector `0x12900da8`. - ```solidity - function getOrCreateAnvilEthConfig() external view returns (NetworkConfig memory); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct getOrCreateAnvilEthConfigCall {} - ///Container type for the return parameters of the [`getOrCreateAnvilEthConfig()`](getOrCreateAnvilEthConfigCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct getOrCreateAnvilEthConfigReturn { - pub _0: ::RustType, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getOrCreateAnvilEthConfigCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for getOrCreateAnvilEthConfigCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (NetworkConfig,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = - (::RustType,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getOrCreateAnvilEthConfigReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for getOrCreateAnvilEthConfigReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for getOrCreateAnvilEthConfigCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = getOrCreateAnvilEthConfigReturn; - type ReturnTuple<'a> = (NetworkConfig,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getOrCreateAnvilEthConfig()"; - const SELECTOR: [u8; 4] = [18u8, 144u8, 13u8, 168u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `test()` and selector `0xf8a8fd6d`. - ```solidity - function test() external; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct testCall {} - ///Container type for the return parameters of the [`test()`](testCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct testReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: testCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for testCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: testReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for testReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for testCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = testReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "test()"; - const SELECTOR: [u8; 4] = [248u8, 168u8, 253u8, 109u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - ///Container for all the [`DeploymentConfig`](self) function calls. - pub enum DeploymentConfigCalls { - IS_SCRIPT(IS_SCRIPTCall), - activeNetworkConfig(activeNetworkConfigCall), - getOrCreateAnvilEthConfig(getOrCreateAnvilEthConfigCall), - test(testCall), - } - #[automatically_derived] - impl DeploymentConfigCalls { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = &[ - [18u8, 144u8, 13u8, 168u8], - [215u8, 182u8, 87u8, 69u8], - [248u8, 168u8, 253u8, 109u8], - [248u8, 204u8, 191u8, 71u8], - ]; - } - #[automatically_derived] - impl alloy_sol_types::SolInterface for DeploymentConfigCalls { - const NAME: &'static str = "DeploymentConfigCalls"; - const MIN_DATA_LENGTH: usize = 0usize; - const COUNT: usize = 4usize; - #[inline] - fn selector(&self) -> [u8; 4] { - match self { - Self::IS_SCRIPT(_) => ::SELECTOR, - Self::activeNetworkConfig(_) => { - ::SELECTOR - } - Self::getOrCreateAnvilEthConfig(_) => { - ::SELECTOR - } - Self::test(_) => ::SELECTOR, - } - } - #[inline] - fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { - Self::SELECTORS.get(i).copied() - } - #[inline] - fn valid_selector(selector: [u8; 4]) -> bool { - Self::SELECTORS.binary_search(&selector).is_ok() - } - #[inline] - #[allow(unsafe_code, non_snake_case)] - fn abi_decode_raw( - selector: [u8; 4], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn( - &[u8], - bool, - ) - -> alloy_sol_types::Result] = &[ - { - fn getOrCreateAnvilEthConfig( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(DeploymentConfigCalls::getOrCreateAnvilEthConfig) - } - getOrCreateAnvilEthConfig - }, - { - fn activeNetworkConfig( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(DeploymentConfigCalls::activeNetworkConfig) - } - activeNetworkConfig - }, - { - fn test( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(DeploymentConfigCalls::test) - } - test - }, - { - fn IS_SCRIPT( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(DeploymentConfigCalls::IS_SCRIPT) - } - IS_SCRIPT - }, - ]; - let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err(alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - )); - }; - (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) - } - #[inline] - fn abi_encoded_size(&self) -> usize { - match self { - Self::IS_SCRIPT(inner) => { - ::abi_encoded_size(inner) - } - Self::activeNetworkConfig(inner) => { - ::abi_encoded_size(inner) - } - Self::getOrCreateAnvilEthConfig(inner) => { - ::abi_encoded_size( - inner, - ) - } - Self::test(inner) => { - ::abi_encoded_size(inner) - } - } - } - #[inline] - fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { - match self { - Self::IS_SCRIPT(inner) => { - ::abi_encode_raw(inner, out) - } - Self::activeNetworkConfig(inner) => { - ::abi_encode_raw( - inner, out, - ) - } - Self::getOrCreateAnvilEthConfig(inner) => { - ::abi_encode_raw( - inner, out, - ) - } - Self::test(inner) => { - ::abi_encode_raw(inner, out) - } - } - } - } - ///Container for all the [`DeploymentConfig`](self) custom errors. - pub enum DeploymentConfigErrors { - DeploymentConfig_InvalidDeployerAddress(DeploymentConfig_InvalidDeployerAddress), - DeploymentConfig_NoConfigForChain(DeploymentConfig_NoConfigForChain), - } - #[automatically_derived] - impl DeploymentConfigErrors { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = - &[[11u8, 19u8, 219u8, 255u8], [128u8, 88u8, 91u8, 68u8]]; - } - #[automatically_derived] - impl alloy_sol_types::SolInterface for DeploymentConfigErrors { - const NAME: &'static str = "DeploymentConfigErrors"; - const MIN_DATA_LENGTH: usize = 0usize; - const COUNT: usize = 2usize; - #[inline] - fn selector(&self) -> [u8; 4] { - match self { - Self::DeploymentConfig_InvalidDeployerAddress(_) => { - ::SELECTOR - } - Self::DeploymentConfig_NoConfigForChain(_) => { - ::SELECTOR - } - } - } - #[inline] - fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { - Self::SELECTORS.get(i).copied() - } - #[inline] - fn valid_selector(selector: [u8; 4]) -> bool { - Self::SELECTORS.binary_search(&selector).is_ok() - } - #[inline] - #[allow(unsafe_code, non_snake_case)] - fn abi_decode_raw( - selector: [u8; 4], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn( - &[u8], - bool, - ) - -> alloy_sol_types::Result] = &[ - { - fn DeploymentConfig_NoConfigForChain( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) - .map( - DeploymentConfigErrors::DeploymentConfig_NoConfigForChain, - ) - } - DeploymentConfig_NoConfigForChain - }, - { - fn DeploymentConfig_InvalidDeployerAddress( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) - .map( - DeploymentConfigErrors::DeploymentConfig_InvalidDeployerAddress, - ) - } - DeploymentConfig_InvalidDeployerAddress - }, - ]; - let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err(alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - )); - }; - (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) - } - #[inline] - fn abi_encoded_size(&self) -> usize { - match self { - Self::DeploymentConfig_InvalidDeployerAddress(inner) => { - ::abi_encoded_size( - inner, - ) - } - Self::DeploymentConfig_NoConfigForChain(inner) => { - ::abi_encoded_size( - inner, - ) - } - } - } - #[inline] - fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { - match self { - Self::DeploymentConfig_InvalidDeployerAddress(inner) => { - ::abi_encode_raw( - inner, - out, - ) - } - Self::DeploymentConfig_NoConfigForChain(inner) => { - ::abi_encode_raw( - inner, - out, - ) - } - } - } - } - use alloy::contract as alloy_contract; - /**Creates a new wrapper around an on-chain [`DeploymentConfig`](self) contract instance. - - See the [wrapper's documentation](`DeploymentConfigInstance`) for more details.*/ - #[inline] - pub const fn new< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - address: alloy_sol_types::private::Address, - provider: P, - ) -> DeploymentConfigInstance { - DeploymentConfigInstance::::new(address, provider) - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub fn deploy< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - _broadcaster: alloy::sol_types::private::Address, - ) -> impl ::core::future::Future>> - { - DeploymentConfigInstance::::deploy(provider, _broadcaster) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - _broadcaster: alloy::sol_types::private::Address, - ) -> alloy_contract::RawCallBuilder { - DeploymentConfigInstance::::deploy_builder(provider, _broadcaster) - } - /**A [`DeploymentConfig`](self) instance. - - Contains type-safe methods for interacting with an on-chain instance of the - [`DeploymentConfig`](self) contract located at a given `address`, using a given - provider `P`. - - If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) - documentation on how to provide it), the `deploy` and `deploy_builder` methods can - be used to deploy a new instance of the contract. - - See the [module-level documentation](self) for all the available methods.*/ - #[derive(Clone)] - pub struct DeploymentConfigInstance { - address: alloy_sol_types::private::Address, - provider: P, - _network_transport: ::core::marker::PhantomData<(N, T)>, - } - #[automatically_derived] - impl ::core::fmt::Debug for DeploymentConfigInstance { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("DeploymentConfigInstance") - .field(&self.address) - .finish() - } - } - /// Instantiation and getters/setters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > DeploymentConfigInstance - { - /**Creates a new wrapper around an on-chain [`DeploymentConfig`](self) contract instance. - - See the [wrapper's documentation](`DeploymentConfigInstance`) for more details.*/ - #[inline] - pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { - Self { - address, - provider, - _network_transport: ::core::marker::PhantomData, - } - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub async fn deploy( - provider: P, - _broadcaster: alloy::sol_types::private::Address, - ) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder(provider, _broadcaster); - let contract_address = call_builder.deploy().await?; - Ok(Self::new(contract_address, call_builder.provider)) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder( - provider: P, - _broadcaster: alloy::sol_types::private::Address, - ) -> alloy_contract::RawCallBuilder { - alloy_contract::RawCallBuilder::new_raw_deploy( - provider, - [ - &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { _broadcaster }) - [..], - ] - .concat() - .into(), - ) - } - /// Returns a reference to the address. - #[inline] - pub const fn address(&self) -> &alloy_sol_types::private::Address { - &self.address - } - /// Sets the address. - #[inline] - pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { - self.address = address; - } - /// Sets the address and returns `self`. - pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { - self.set_address(address); - self - } - /// Returns a reference to the provider. - #[inline] - pub const fn provider(&self) -> &P { - &self.provider - } - } - impl DeploymentConfigInstance { - /// Clones the provider and returns a new instance with the cloned provider. - #[inline] - pub fn with_cloned_provider(self) -> DeploymentConfigInstance { - DeploymentConfigInstance { - address: self.address, - provider: ::core::clone::Clone::clone(&self.provider), - _network_transport: ::core::marker::PhantomData, - } - } - } - /// Function calls. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > DeploymentConfigInstance - { - /// Creates a new call builder using this contract instance's provider and address. - /// - /// Note that the call can be any function call, not just those defined in this - /// contract. Prefer using the other methods for building type-safe contract calls. - pub fn call_builder( - &self, - call: &C, - ) -> alloy_contract::SolCallBuilder { - alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) - } - ///Creates a new call builder for the [`IS_SCRIPT`] function. - pub fn IS_SCRIPT(&self) -> alloy_contract::SolCallBuilder { - self.call_builder(&IS_SCRIPTCall {}) - } - ///Creates a new call builder for the [`activeNetworkConfig`] function. - pub fn activeNetworkConfig( - &self, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&activeNetworkConfigCall {}) - } - ///Creates a new call builder for the [`getOrCreateAnvilEthConfig`] function. - pub fn getOrCreateAnvilEthConfig( - &self, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&getOrCreateAnvilEthConfigCall {}) - } - ///Creates a new call builder for the [`test`] function. - pub fn test(&self) -> alloy_contract::SolCallBuilder { - self.call_builder(&testCall {}) - } - } - /// Event filters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > DeploymentConfigInstance - { - /// Creates a new event filter using this contract instance's provider and address. - /// - /// Note that the type can be any event, not just those defined in this contract. - /// Prefer using the other methods for building type-safe event filters. - pub fn event_filter( - &self, - ) -> alloy_contract::Event { - alloy_contract::Event::new_sol(&self.provider, &self.address) - } - } -} diff --git a/crates/bindings/src/ierc165.rs b/crates/bindings/src/ierc165.rs deleted file mode 100644 index e550395..0000000 --- a/crates/bindings/src/ierc165.rs +++ /dev/null @@ -1,440 +0,0 @@ -/** - -Generated by the following Solidity interface... -```solidity -interface IERC165 { - function supportsInterface(bytes4 interfaceID) external view returns (bool); -} -``` - -...which was generated by the following JSON ABI: -```json -[ - { - "type": "function", - "name": "supportsInterface", - "inputs": [ - { - "name": "interfaceID", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - } -] -```*/ -#[allow(non_camel_case_types, non_snake_case, clippy::style)] -pub mod IERC165 { - use super::*; - use alloy::sol_types as alloy_sol_types; - /// The creation / init bytecode of the contract. - /// - /// ```text - ///0x - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"", - ); - /// The runtime bytecode of the contract, as deployed on the network. - /// - /// ```text - ///0x - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"", - ); - /**Function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`. - ```solidity - function supportsInterface(bytes4 interfaceID) external view returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct supportsInterfaceCall { - pub interfaceID: alloy::sol_types::private::FixedBytes<4>, - } - ///Container type for the return parameters of the [`supportsInterface(bytes4)`](supportsInterfaceCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct supportsInterfaceReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: supportsInterfaceCall) -> Self { - (value.interfaceID,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for supportsInterfaceCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - interfaceID: tuple.0, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: supportsInterfaceReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for supportsInterfaceReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for supportsInterfaceCall { - type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = supportsInterfaceReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "supportsInterface(bytes4)"; - const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize(&self.interfaceID), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - ///Container for all the [`IERC165`](self) function calls. - pub enum IERC165Calls { - supportsInterface(supportsInterfaceCall), - } - #[automatically_derived] - impl IERC165Calls { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = &[[1u8, 255u8, 201u8, 167u8]]; - } - #[automatically_derived] - impl alloy_sol_types::SolInterface for IERC165Calls { - const NAME: &'static str = "IERC165Calls"; - const MIN_DATA_LENGTH: usize = 32usize; - const COUNT: usize = 1usize; - #[inline] - fn selector(&self) -> [u8; 4] { - match self { - Self::supportsInterface(_) => { - ::SELECTOR - } - } - } - #[inline] - fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { - Self::SELECTORS.get(i).copied() - } - #[inline] - fn valid_selector(selector: [u8; 4]) -> bool { - Self::SELECTORS.binary_search(&selector).is_ok() - } - #[inline] - #[allow(unsafe_code, non_snake_case)] - fn abi_decode_raw( - selector: [u8; 4], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = &[{ - fn supportsInterface( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC165Calls::supportsInterface) - } - supportsInterface - }]; - let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err(alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - )); - }; - (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) - } - #[inline] - fn abi_encoded_size(&self) -> usize { - match self { - Self::supportsInterface(inner) => { - ::abi_encoded_size(inner) - } - } - } - #[inline] - fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { - match self { - Self::supportsInterface(inner) => { - ::abi_encode_raw(inner, out) - } - } - } - } - use alloy::contract as alloy_contract; - /**Creates a new wrapper around an on-chain [`IERC165`](self) contract instance. - - See the [wrapper's documentation](`IERC165Instance`) for more details.*/ - #[inline] - pub const fn new< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - address: alloy_sol_types::private::Address, - provider: P, - ) -> IERC165Instance { - IERC165Instance::::new(address, provider) - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub fn deploy< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> impl ::core::future::Future>> - { - IERC165Instance::::deploy(provider) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> alloy_contract::RawCallBuilder { - IERC165Instance::::deploy_builder(provider) - } - /**A [`IERC165`](self) instance. - - Contains type-safe methods for interacting with an on-chain instance of the - [`IERC165`](self) contract located at a given `address`, using a given - provider `P`. - - If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) - documentation on how to provide it), the `deploy` and `deploy_builder` methods can - be used to deploy a new instance of the contract. - - See the [module-level documentation](self) for all the available methods.*/ - #[derive(Clone)] - pub struct IERC165Instance { - address: alloy_sol_types::private::Address, - provider: P, - _network_transport: ::core::marker::PhantomData<(N, T)>, - } - #[automatically_derived] - impl ::core::fmt::Debug for IERC165Instance { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IERC165Instance") - .field(&self.address) - .finish() - } - } - /// Instantiation and getters/setters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC165Instance - { - /**Creates a new wrapper around an on-chain [`IERC165`](self) contract instance. - - See the [wrapper's documentation](`IERC165Instance`) for more details.*/ - #[inline] - pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { - Self { - address, - provider, - _network_transport: ::core::marker::PhantomData, - } - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub async fn deploy(provider: P) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder(provider); - let contract_address = call_builder.deploy().await?; - Ok(Self::new(contract_address, call_builder.provider)) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { - alloy_contract::RawCallBuilder::new_raw_deploy( - provider, - ::core::clone::Clone::clone(&BYTECODE), - ) - } - /// Returns a reference to the address. - #[inline] - pub const fn address(&self) -> &alloy_sol_types::private::Address { - &self.address - } - /// Sets the address. - #[inline] - pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { - self.address = address; - } - /// Sets the address and returns `self`. - pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { - self.set_address(address); - self - } - /// Returns a reference to the provider. - #[inline] - pub const fn provider(&self) -> &P { - &self.provider - } - } - impl IERC165Instance { - /// Clones the provider and returns a new instance with the cloned provider. - #[inline] - pub fn with_cloned_provider(self) -> IERC165Instance { - IERC165Instance { - address: self.address, - provider: ::core::clone::Clone::clone(&self.provider), - _network_transport: ::core::marker::PhantomData, - } - } - } - /// Function calls. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC165Instance - { - /// Creates a new call builder using this contract instance's provider and address. - /// - /// Note that the call can be any function call, not just those defined in this - /// contract. Prefer using the other methods for building type-safe contract calls. - pub fn call_builder( - &self, - call: &C, - ) -> alloy_contract::SolCallBuilder { - alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) - } - ///Creates a new call builder for the [`supportsInterface`] function. - pub fn supportsInterface( - &self, - interfaceID: alloy::sol_types::private::FixedBytes<4>, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&supportsInterfaceCall { interfaceID }) - } - } - /// Event filters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC165Instance - { - /// Creates a new event filter using this contract instance's provider and address. - /// - /// Note that the type can be any event, not just those defined in this contract. - /// Prefer using the other methods for building type-safe event filters. - pub fn event_filter( - &self, - ) -> alloy_contract::Event { - alloy_contract::Event::new_sol(&self.provider, &self.address) - } - } -} diff --git a/crates/bindings/src/ierc20.rs b/crates/bindings/src/ierc20.rs deleted file mode 100644 index 580ca17..0000000 --- a/crates/bindings/src/ierc20.rs +++ /dev/null @@ -1,2063 +0,0 @@ -/** - -Generated by the following Solidity interface... -```solidity -interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - event Transfer(address indexed from, address indexed to, uint256 value); - - function allowance(address owner, address spender) external view returns (uint256); - function approve(address spender, uint256 amount) external returns (bool); - function balanceOf(address account) external view returns (uint256); - function decimals() external view returns (uint8); - function name() external view returns (string memory); - function symbol() external view returns (string memory); - function totalSupply() external view returns (uint256); - function transfer(address to, uint256 amount) external returns (bool); - function transferFrom(address from, address to, uint256 amount) external returns (bool); -} -``` - -...which was generated by the following JSON ABI: -```json -[ - { - "type": "function", - "name": "allowance", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "spender", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "approve", - "inputs": [ - { - "name": "spender", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "balanceOf", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "decimals", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint8", - "internalType": "uint8" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "symbol", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "totalSupply", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "transfer", - "inputs": [ - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transferFrom", - "inputs": [ - { - "name": "from", - "type": "address", - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "Approval", - "inputs": [ - { - "name": "owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "spender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Transfer", - "inputs": [ - { - "name": "from", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - } -] -```*/ -#[allow(non_camel_case_types, non_snake_case, clippy::style)] -pub mod IERC20 { - use super::*; - use alloy::sol_types as alloy_sol_types; - /// The creation / init bytecode of the contract. - /// - /// ```text - ///0x - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"", - ); - /// The runtime bytecode of the contract, as deployed on the network. - /// - /// ```text - ///0x - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"", - ); - /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. - ```solidity - event Approval(address indexed owner, address indexed spender, uint256 value); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct Approval { - #[allow(missing_docs)] - pub owner: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub spender: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub value: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for Approval { - type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = ( - alloy_sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - const SIGNATURE: &'static str = "Approval(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, - 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, - 91u8, 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { - owner: topics.1, - spender: topics.2, - value: data.0, - } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self.value, - ), - ) - } - #[inline] - fn topics(&self) -> ::RustType { - ( - Self::SIGNATURE_HASH.into(), - self.owner.clone(), - self.spender.clone(), - ) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - out[1usize] = ::encode_topic( - &self.owner, - ); - out[2usize] = ::encode_topic( - &self.spender, - ); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for Approval { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&Approval> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &Approval) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. - ```solidity - event Transfer(address indexed from, address indexed to, uint256 value); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct Transfer { - #[allow(missing_docs)] - pub from: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub to: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub value: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for Transfer { - type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = ( - alloy_sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, - 104u8, 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, - 161u8, 22u8, 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { - from: topics.1, - to: topics.2, - value: data.0, - } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self.value, - ), - ) - } - #[inline] - fn topics(&self) -> ::RustType { - ( - Self::SIGNATURE_HASH.into(), - self.from.clone(), - self.to.clone(), - ) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - out[1usize] = ::encode_topic( - &self.from, - ); - out[2usize] = ::encode_topic( - &self.to, - ); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for Transfer { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&Transfer> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &Transfer) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Function with signature `allowance(address,address)` and selector `0xdd62ed3e`. - ```solidity - function allowance(address owner, address spender) external view returns (uint256); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct allowanceCall { - pub owner: alloy::sol_types::private::Address, - pub spender: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct allowanceReturn { - pub _0: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: allowanceCall) -> Self { - (value.owner, value.spender) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for allowanceCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - owner: tuple.0, - spender: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: allowanceReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for allowanceReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for allowanceCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = allowanceReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "allowance(address,address)"; - const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.owner, - ), - ::tokenize( - &self.spender, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. - ```solidity - function approve(address spender, uint256 amount) external returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct approveCall { - pub spender: alloy::sol_types::private::Address, - pub amount: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct approveReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: approveCall) -> Self { - (value.spender, value.amount) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for approveCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - spender: tuple.0, - amount: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: approveReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for approveReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for approveCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = approveReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "approve(address,uint256)"; - const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.spender, - ), - as alloy_sol_types::SolType>::tokenize( - &self.amount, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `balanceOf(address)` and selector `0x70a08231`. - ```solidity - function balanceOf(address account) external view returns (uint256); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct balanceOfCall { - pub account: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct balanceOfReturn { - pub _0: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: balanceOfCall) -> Self { - (value.account,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for balanceOfCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { account: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: balanceOfReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for balanceOfReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for balanceOfCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = balanceOfReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "balanceOf(address)"; - const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.account, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `decimals()` and selector `0x313ce567`. - ```solidity - function decimals() external view returns (uint8); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct decimalsCall {} - ///Container type for the return parameters of the [`decimals()`](decimalsCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct decimalsReturn { - pub _0: u8, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: decimalsCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for decimalsCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<8>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (u8,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: decimalsReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for decimalsReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for decimalsCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = decimalsReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<8>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "decimals()"; - const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `name()` and selector `0x06fdde03`. - ```solidity - function name() external view returns (string memory); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct nameCall {} - ///Container type for the return parameters of the [`name()`](nameCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct nameReturn { - pub _0: alloy::sol_types::private::String, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: nameCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for nameCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: nameReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for nameReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for nameCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = nameReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "name()"; - const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `symbol()` and selector `0x95d89b41`. - ```solidity - function symbol() external view returns (string memory); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct symbolCall {} - ///Container type for the return parameters of the [`symbol()`](symbolCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct symbolReturn { - pub _0: alloy::sol_types::private::String, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: symbolCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for symbolCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: symbolReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for symbolReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for symbolCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = symbolReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "symbol()"; - const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `totalSupply()` and selector `0x18160ddd`. - ```solidity - function totalSupply() external view returns (uint256); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct totalSupplyCall {} - ///Container type for the return parameters of the [`totalSupply()`](totalSupplyCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct totalSupplyReturn { - pub _0: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: totalSupplyCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for totalSupplyCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: totalSupplyReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for totalSupplyReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for totalSupplyCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = totalSupplyReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "totalSupply()"; - const SELECTOR: [u8; 4] = [24u8, 22u8, 13u8, 221u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. - ```solidity - function transfer(address to, uint256 amount) external returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferCall { - pub to: alloy::sol_types::private::Address, - pub amount: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferCall) -> Self { - (value.to, value.amount) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - to: tuple.0, - amount: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for transferCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = transferReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "transfer(address,uint256)"; - const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.to, - ), - as alloy_sol_types::SolType>::tokenize( - &self.amount, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. - ```solidity - function transferFrom(address from, address to, uint256 amount) external returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferFromCall { - pub from: alloy::sol_types::private::Address, - pub to: alloy::sol_types::private::Address, - pub amount: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferFromReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferFromCall) -> Self { - (value.from, value.to, value.amount) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferFromCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - from: tuple.0, - to: tuple.1, - amount: tuple.2, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferFromReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferFromReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for transferFromCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = transferFromReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; - const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.from, - ), - ::tokenize( - &self.to, - ), - as alloy_sol_types::SolType>::tokenize( - &self.amount, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - ///Container for all the [`IERC20`](self) function calls. - pub enum IERC20Calls { - allowance(allowanceCall), - approve(approveCall), - balanceOf(balanceOfCall), - decimals(decimalsCall), - name(nameCall), - symbol(symbolCall), - totalSupply(totalSupplyCall), - transfer(transferCall), - transferFrom(transferFromCall), - } - #[automatically_derived] - impl IERC20Calls { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = &[ - [6u8, 253u8, 222u8, 3u8], - [9u8, 94u8, 167u8, 179u8], - [24u8, 22u8, 13u8, 221u8], - [35u8, 184u8, 114u8, 221u8], - [49u8, 60u8, 229u8, 103u8], - [112u8, 160u8, 130u8, 49u8], - [149u8, 216u8, 155u8, 65u8], - [169u8, 5u8, 156u8, 187u8], - [221u8, 98u8, 237u8, 62u8], - ]; - } - #[automatically_derived] - impl alloy_sol_types::SolInterface for IERC20Calls { - const NAME: &'static str = "IERC20Calls"; - const MIN_DATA_LENGTH: usize = 0usize; - const COUNT: usize = 9usize; - #[inline] - fn selector(&self) -> [u8; 4] { - match self { - Self::allowance(_) => ::SELECTOR, - Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => ::SELECTOR, - Self::decimals(_) => ::SELECTOR, - Self::name(_) => ::SELECTOR, - Self::symbol(_) => ::SELECTOR, - Self::totalSupply(_) => ::SELECTOR, - Self::transfer(_) => ::SELECTOR, - Self::transferFrom(_) => ::SELECTOR, - } - } - #[inline] - fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { - Self::SELECTORS.get(i).copied() - } - #[inline] - fn valid_selector(selector: [u8; 4]) -> bool { - Self::SELECTORS.binary_search(&selector).is_ok() - } - #[inline] - #[allow(unsafe_code, non_snake_case)] - fn abi_decode_raw( - selector: [u8; 4], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = &[ - { - fn name(data: &[u8], validate: bool) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC20Calls::name) - } - name - }, - { - fn approve( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC20Calls::approve) - } - approve - }, - { - fn totalSupply( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC20Calls::totalSupply) - } - totalSupply - }, - { - fn transferFrom( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC20Calls::transferFrom) - } - transferFrom - }, - { - fn decimals( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC20Calls::decimals) - } - decimals - }, - { - fn balanceOf( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC20Calls::balanceOf) - } - balanceOf - }, - { - fn symbol(data: &[u8], validate: bool) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC20Calls::symbol) - } - symbol - }, - { - fn transfer( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC20Calls::transfer) - } - transfer - }, - { - fn allowance( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC20Calls::allowance) - } - allowance - }, - ]; - let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err(alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - )); - }; - (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) - } - #[inline] - fn abi_encoded_size(&self) -> usize { - match self { - Self::allowance(inner) => { - ::abi_encoded_size(inner) - } - Self::approve(inner) => { - ::abi_encoded_size(inner) - } - Self::balanceOf(inner) => { - ::abi_encoded_size(inner) - } - Self::decimals(inner) => { - ::abi_encoded_size(inner) - } - Self::name(inner) => { - ::abi_encoded_size(inner) - } - Self::symbol(inner) => { - ::abi_encoded_size(inner) - } - Self::totalSupply(inner) => { - ::abi_encoded_size(inner) - } - Self::transfer(inner) => { - ::abi_encoded_size(inner) - } - Self::transferFrom(inner) => { - ::abi_encoded_size(inner) - } - } - } - #[inline] - fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { - match self { - Self::allowance(inner) => { - ::abi_encode_raw(inner, out) - } - Self::approve(inner) => { - ::abi_encode_raw(inner, out) - } - Self::balanceOf(inner) => { - ::abi_encode_raw(inner, out) - } - Self::decimals(inner) => { - ::abi_encode_raw(inner, out) - } - Self::name(inner) => { - ::abi_encode_raw(inner, out) - } - Self::symbol(inner) => { - ::abi_encode_raw(inner, out) - } - Self::totalSupply(inner) => { - ::abi_encode_raw(inner, out) - } - Self::transfer(inner) => { - ::abi_encode_raw(inner, out) - } - Self::transferFrom(inner) => { - ::abi_encode_raw(inner, out) - } - } - } - } - ///Container for all the [`IERC20`](self) events. - pub enum IERC20Events { - Approval(Approval), - Transfer(Transfer), - } - #[automatically_derived] - impl IERC20Events { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 32usize]] = &[ - [ - 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, - 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, 91u8, - 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, - ], - [ - 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, 104u8, - 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, 161u8, 22u8, - 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, - ], - ]; - } - #[automatically_derived] - impl alloy_sol_types::SolEventInterface for IERC20Events { - const NAME: &'static str = "IERC20Events"; - const COUNT: usize = 2usize; - fn decode_raw_log( - topics: &[alloy_sol_types::Word], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - match topics.first().copied() { - Some(::SIGNATURE_HASH) => { - ::decode_raw_log(topics, data, validate) - .map(Self::Approval) - } - Some(::SIGNATURE_HASH) => { - ::decode_raw_log(topics, data, validate) - .map(Self::Transfer) - } - _ => alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { - name: ::NAME, - log: alloy_sol_types::private::Box::new( - alloy_sol_types::private::LogData::new_unchecked( - topics.to_vec(), - data.to_vec().into(), - ), - ), - }), - } - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for IERC20Events { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - match self { - Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), - Self::Transfer(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), - } - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - match self { - Self::Approval(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::Transfer(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - } - } - } - use alloy::contract as alloy_contract; - /**Creates a new wrapper around an on-chain [`IERC20`](self) contract instance. - - See the [wrapper's documentation](`IERC20Instance`) for more details.*/ - #[inline] - pub const fn new< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - address: alloy_sol_types::private::Address, - provider: P, - ) -> IERC20Instance { - IERC20Instance::::new(address, provider) - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub fn deploy< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> impl ::core::future::Future>> { - IERC20Instance::::deploy(provider) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> alloy_contract::RawCallBuilder { - IERC20Instance::::deploy_builder(provider) - } - /**A [`IERC20`](self) instance. - - Contains type-safe methods for interacting with an on-chain instance of the - [`IERC20`](self) contract located at a given `address`, using a given - provider `P`. - - If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) - documentation on how to provide it), the `deploy` and `deploy_builder` methods can - be used to deploy a new instance of the contract. - - See the [module-level documentation](self) for all the available methods.*/ - #[derive(Clone)] - pub struct IERC20Instance { - address: alloy_sol_types::private::Address, - provider: P, - _network_transport: ::core::marker::PhantomData<(N, T)>, - } - #[automatically_derived] - impl ::core::fmt::Debug for IERC20Instance { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IERC20Instance") - .field(&self.address) - .finish() - } - } - /// Instantiation and getters/setters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC20Instance - { - /**Creates a new wrapper around an on-chain [`IERC20`](self) contract instance. - - See the [wrapper's documentation](`IERC20Instance`) for more details.*/ - #[inline] - pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { - Self { - address, - provider, - _network_transport: ::core::marker::PhantomData, - } - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub async fn deploy(provider: P) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder(provider); - let contract_address = call_builder.deploy().await?; - Ok(Self::new(contract_address, call_builder.provider)) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { - alloy_contract::RawCallBuilder::new_raw_deploy( - provider, - ::core::clone::Clone::clone(&BYTECODE), - ) - } - /// Returns a reference to the address. - #[inline] - pub const fn address(&self) -> &alloy_sol_types::private::Address { - &self.address - } - /// Sets the address. - #[inline] - pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { - self.address = address; - } - /// Sets the address and returns `self`. - pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { - self.set_address(address); - self - } - /// Returns a reference to the provider. - #[inline] - pub const fn provider(&self) -> &P { - &self.provider - } - } - impl IERC20Instance { - /// Clones the provider and returns a new instance with the cloned provider. - #[inline] - pub fn with_cloned_provider(self) -> IERC20Instance { - IERC20Instance { - address: self.address, - provider: ::core::clone::Clone::clone(&self.provider), - _network_transport: ::core::marker::PhantomData, - } - } - } - /// Function calls. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC20Instance - { - /// Creates a new call builder using this contract instance's provider and address. - /// - /// Note that the call can be any function call, not just those defined in this - /// contract. Prefer using the other methods for building type-safe contract calls. - pub fn call_builder( - &self, - call: &C, - ) -> alloy_contract::SolCallBuilder { - alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) - } - ///Creates a new call builder for the [`allowance`] function. - pub fn allowance( - &self, - owner: alloy::sol_types::private::Address, - spender: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&allowanceCall { owner, spender }) - } - ///Creates a new call builder for the [`approve`] function. - pub fn approve( - &self, - spender: alloy::sol_types::private::Address, - amount: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&approveCall { spender, amount }) - } - ///Creates a new call builder for the [`balanceOf`] function. - pub fn balanceOf( - &self, - account: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&balanceOfCall { account }) - } - ///Creates a new call builder for the [`decimals`] function. - pub fn decimals(&self) -> alloy_contract::SolCallBuilder { - self.call_builder(&decimalsCall {}) - } - ///Creates a new call builder for the [`name`] function. - pub fn name(&self) -> alloy_contract::SolCallBuilder { - self.call_builder(&nameCall {}) - } - ///Creates a new call builder for the [`symbol`] function. - pub fn symbol(&self) -> alloy_contract::SolCallBuilder { - self.call_builder(&symbolCall {}) - } - ///Creates a new call builder for the [`totalSupply`] function. - pub fn totalSupply(&self) -> alloy_contract::SolCallBuilder { - self.call_builder(&totalSupplyCall {}) - } - ///Creates a new call builder for the [`transfer`] function. - pub fn transfer( - &self, - to: alloy::sol_types::private::Address, - amount: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&transferCall { to, amount }) - } - ///Creates a new call builder for the [`transferFrom`] function. - pub fn transferFrom( - &self, - from: alloy::sol_types::private::Address, - to: alloy::sol_types::private::Address, - amount: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&transferFromCall { from, to, amount }) - } - } - /// Event filters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC20Instance - { - /// Creates a new event filter using this contract instance's provider and address. - /// - /// Note that the type can be any event, not just those defined in this contract. - /// Prefer using the other methods for building type-safe event filters. - pub fn event_filter( - &self, - ) -> alloy_contract::Event { - alloy_contract::Event::new_sol(&self.provider, &self.address) - } - ///Creates a new event filter for the [`Approval`] event. - pub fn Approval_filter(&self) -> alloy_contract::Event { - self.event_filter::() - } - ///Creates a new event filter for the [`Transfer`] event. - pub fn Transfer_filter(&self) -> alloy_contract::Event { - self.event_filter::() - } - } -} diff --git a/crates/bindings/src/ierc721.rs b/crates/bindings/src/ierc721.rs deleted file mode 100644 index 2719bcf..0000000 --- a/crates/bindings/src/ierc721.rs +++ /dev/null @@ -1,2518 +0,0 @@ -/** - -Generated by the following Solidity interface... -```solidity -interface IERC721 { - event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); - event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); - event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); - - function approve(address _approved, uint256 _tokenId) external payable; - function balanceOf(address _owner) external view returns (uint256); - function getApproved(uint256 _tokenId) external view returns (address); - function isApprovedForAll(address _owner, address _operator) external view returns (bool); - function ownerOf(uint256 _tokenId) external view returns (address); - function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; - function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; - function setApprovalForAll(address _operator, bool _approved) external; - function supportsInterface(bytes4 interfaceID) external view returns (bool); - function transferFrom(address _from, address _to, uint256 _tokenId) external payable; -} -``` - -...which was generated by the following JSON ABI: -```json -[ - { - "type": "function", - "name": "approve", - "inputs": [ - { - "name": "_approved", - "type": "address", - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "balanceOf", - "inputs": [ - { - "name": "_owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getApproved", - "inputs": [ - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isApprovedForAll", - "inputs": [ - { - "name": "_owner", - "type": "address", - "internalType": "address" - }, - { - "name": "_operator", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "ownerOf", - "inputs": [ - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "safeTransferFrom", - "inputs": [ - { - "name": "_from", - "type": "address", - "internalType": "address" - }, - { - "name": "_to", - "type": "address", - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "safeTransferFrom", - "inputs": [ - { - "name": "_from", - "type": "address", - "internalType": "address" - }, - { - "name": "_to", - "type": "address", - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "setApprovalForAll", - "inputs": [ - { - "name": "_operator", - "type": "address", - "internalType": "address" - }, - { - "name": "_approved", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "supportsInterface", - "inputs": [ - { - "name": "interfaceID", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "transferFrom", - "inputs": [ - { - "name": "_from", - "type": "address", - "internalType": "address" - }, - { - "name": "_to", - "type": "address", - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "event", - "name": "Approval", - "inputs": [ - { - "name": "_owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_approved", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ApprovalForAll", - "inputs": [ - { - "name": "_owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_operator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_approved", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Transfer", - "inputs": [ - { - "name": "_from", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - } -] -```*/ -#[allow(non_camel_case_types, non_snake_case, clippy::style)] -pub mod IERC721 { - use super::*; - use alloy::sol_types as alloy_sol_types; - /// The creation / init bytecode of the contract. - /// - /// ```text - ///0x - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"", - ); - /// The runtime bytecode of the contract, as deployed on the network. - /// - /// ```text - ///0x - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"", - ); - /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. - ```solidity - event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct Approval { - #[allow(missing_docs)] - pub _owner: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _approved: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _tokenId: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for Approval { - type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = ( - alloy_sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - const SIGNATURE: &'static str = "Approval(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, - 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, - 91u8, 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { - _owner: topics.1, - _approved: topics.2, - _tokenId: topics.3, - } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - () - } - #[inline] - fn topics(&self) -> ::RustType { - ( - Self::SIGNATURE_HASH.into(), - self._owner.clone(), - self._approved.clone(), - self._tokenId.clone(), - ) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - out[1usize] = ::encode_topic( - &self._owner, - ); - out[2usize] = ::encode_topic( - &self._approved, - ); - out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self._tokenId); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for Approval { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&Approval> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &Approval) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Event with signature `ApprovalForAll(address,address,bool)` and selector `0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31`. - ```solidity - event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct ApprovalForAll { - #[allow(missing_docs)] - pub _owner: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _operator: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _approved: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for ApprovalForAll { - type DataTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = ( - alloy_sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - const SIGNATURE: &'static str = "ApprovalForAll(address,address,bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 23u8, 48u8, 126u8, 171u8, 57u8, 171u8, 97u8, 7u8, 232u8, 137u8, 152u8, 69u8, - 173u8, 61u8, 89u8, 189u8, 150u8, 83u8, 242u8, 0u8, 242u8, 32u8, 146u8, 4u8, - 137u8, 202u8, 43u8, 89u8, 55u8, 105u8, 108u8, 49u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { - _owner: topics.1, - _operator: topics.2, - _approved: data.0, - } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - ( - ::tokenize( - &self._approved, - ), - ) - } - #[inline] - fn topics(&self) -> ::RustType { - ( - Self::SIGNATURE_HASH.into(), - self._owner.clone(), - self._operator.clone(), - ) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - out[1usize] = ::encode_topic( - &self._owner, - ); - out[2usize] = ::encode_topic( - &self._operator, - ); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for ApprovalForAll { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&ApprovalForAll> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &ApprovalForAll) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. - ```solidity - event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct Transfer { - #[allow(missing_docs)] - pub _from: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _to: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _tokenId: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for Transfer { - type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = ( - alloy_sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, - 104u8, 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, - 161u8, 22u8, 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { - _from: topics.1, - _to: topics.2, - _tokenId: topics.3, - } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - () - } - #[inline] - fn topics(&self) -> ::RustType { - ( - Self::SIGNATURE_HASH.into(), - self._from.clone(), - self._to.clone(), - self._tokenId.clone(), - ) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - out[1usize] = ::encode_topic( - &self._from, - ); - out[2usize] = ::encode_topic( - &self._to, - ); - out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self._tokenId); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for Transfer { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&Transfer> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &Transfer) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. - ```solidity - function approve(address _approved, uint256 _tokenId) external payable; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct approveCall { - pub _approved: alloy::sol_types::private::Address, - pub _tokenId: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct approveReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: approveCall) -> Self { - (value._approved, value._tokenId) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for approveCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _approved: tuple.0, - _tokenId: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: approveReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for approveReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for approveCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = approveReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "approve(address,uint256)"; - const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._approved, - ), - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `balanceOf(address)` and selector `0x70a08231`. - ```solidity - function balanceOf(address _owner) external view returns (uint256); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct balanceOfCall { - pub _owner: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct balanceOfReturn { - pub _0: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: balanceOfCall) -> Self { - (value._owner,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for balanceOfCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _owner: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: balanceOfReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for balanceOfReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for balanceOfCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = balanceOfReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "balanceOf(address)"; - const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._owner, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `getApproved(uint256)` and selector `0x081812fc`. - ```solidity - function getApproved(uint256 _tokenId) external view returns (address); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct getApprovedCall { - pub _tokenId: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`getApproved(uint256)`](getApprovedCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct getApprovedReturn { - pub _0: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getApprovedCall) -> Self { - (value._tokenId,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for getApprovedCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _tokenId: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getApprovedReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for getApprovedReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for getApprovedCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = getApprovedReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getApproved(uint256)"; - const SELECTOR: [u8; 4] = [8u8, 24u8, 18u8, 252u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`. - ```solidity - function isApprovedForAll(address _owner, address _operator) external view returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct isApprovedForAllCall { - pub _owner: alloy::sol_types::private::Address, - pub _operator: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`isApprovedForAll(address,address)`](isApprovedForAllCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct isApprovedForAllReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: isApprovedForAllCall) -> Self { - (value._owner, value._operator) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for isApprovedForAllCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _owner: tuple.0, - _operator: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: isApprovedForAllReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for isApprovedForAllReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for isApprovedForAllCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = isApprovedForAllReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "isApprovedForAll(address,address)"; - const SELECTOR: [u8; 4] = [233u8, 133u8, 233u8, 197u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._owner, - ), - ::tokenize( - &self._operator, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `ownerOf(uint256)` and selector `0x6352211e`. - ```solidity - function ownerOf(uint256 _tokenId) external view returns (address); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct ownerOfCall { - pub _tokenId: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`ownerOf(uint256)`](ownerOfCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct ownerOfReturn { - pub _0: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: ownerOfCall) -> Self { - (value._tokenId,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for ownerOfCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _tokenId: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: ownerOfReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for ownerOfReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for ownerOfCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = ownerOfReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ownerOf(uint256)"; - const SELECTOR: [u8; 4] = [99u8, 82u8, 33u8, 30u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e`. - ```solidity - function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct safeTransferFrom_0Call { - pub _from: alloy::sol_types::private::Address, - pub _to: alloy::sol_types::private::Address, - pub _tokenId: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`safeTransferFrom(address,address,uint256)`](safeTransferFrom_0Call) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct safeTransferFrom_0Return {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: safeTransferFrom_0Call) -> Self { - (value._from, value._to, value._tokenId) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for safeTransferFrom_0Call { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _from: tuple.0, - _to: tuple.1, - _tokenId: tuple.2, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: safeTransferFrom_0Return) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for safeTransferFrom_0Return { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for safeTransferFrom_0Call { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = safeTransferFrom_0Return; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256)"; - const SELECTOR: [u8; 4] = [66u8, 132u8, 46u8, 14u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._from, - ), - ::tokenize( - &self._to, - ), - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde`. - ```solidity - function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct safeTransferFrom_1Call { - pub _from: alloy::sol_types::private::Address, - pub _to: alloy::sol_types::private::Address, - pub _tokenId: alloy::sol_types::private::U256, - pub data: alloy::sol_types::private::Bytes, - } - ///Container type for the return parameters of the [`safeTransferFrom(address,address,uint256,bytes)`](safeTransferFrom_1Call) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct safeTransferFrom_1Return {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - alloy::sol_types::sol_data::Bytes, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - alloy::sol_types::private::Bytes, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: safeTransferFrom_1Call) -> Self { - (value._from, value._to, value._tokenId, value.data) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for safeTransferFrom_1Call { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _from: tuple.0, - _to: tuple.1, - _tokenId: tuple.2, - data: tuple.3, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: safeTransferFrom_1Return) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for safeTransferFrom_1Return { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for safeTransferFrom_1Call { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - alloy::sol_types::sol_data::Bytes, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = safeTransferFrom_1Return; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256,bytes)"; - const SELECTOR: [u8; 4] = [184u8, 141u8, 79u8, 222u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._from, - ), - ::tokenize( - &self._to, - ), - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ::tokenize( - &self.data, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465`. - ```solidity - function setApprovalForAll(address _operator, bool _approved) external; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct setApprovalForAllCall { - pub _operator: alloy::sol_types::private::Address, - pub _approved: bool, - } - ///Container type for the return parameters of the [`setApprovalForAll(address,bool)`](setApprovalForAllCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct setApprovalForAllReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Bool, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address, bool); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: setApprovalForAllCall) -> Self { - (value._operator, value._approved) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for setApprovalForAllCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _operator: tuple.0, - _approved: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: setApprovalForAllReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for setApprovalForAllReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for setApprovalForAllCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Bool, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = setApprovalForAllReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "setApprovalForAll(address,bool)"; - const SELECTOR: [u8; 4] = [162u8, 44u8, 180u8, 101u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._operator, - ), - ::tokenize( - &self._approved, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`. - ```solidity - function supportsInterface(bytes4 interfaceID) external view returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct supportsInterfaceCall { - pub interfaceID: alloy::sol_types::private::FixedBytes<4>, - } - ///Container type for the return parameters of the [`supportsInterface(bytes4)`](supportsInterfaceCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct supportsInterfaceReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: supportsInterfaceCall) -> Self { - (value.interfaceID,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for supportsInterfaceCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - interfaceID: tuple.0, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: supportsInterfaceReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for supportsInterfaceReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for supportsInterfaceCall { - type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = supportsInterfaceReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "supportsInterface(bytes4)"; - const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize(&self.interfaceID), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. - ```solidity - function transferFrom(address _from, address _to, uint256 _tokenId) external payable; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferFromCall { - pub _from: alloy::sol_types::private::Address, - pub _to: alloy::sol_types::private::Address, - pub _tokenId: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferFromReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferFromCall) -> Self { - (value._from, value._to, value._tokenId) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferFromCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _from: tuple.0, - _to: tuple.1, - _tokenId: tuple.2, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferFromReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferFromReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for transferFromCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = transferFromReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; - const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._from, - ), - ::tokenize( - &self._to, - ), - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - ///Container for all the [`IERC721`](self) function calls. - pub enum IERC721Calls { - approve(approveCall), - balanceOf(balanceOfCall), - getApproved(getApprovedCall), - isApprovedForAll(isApprovedForAllCall), - ownerOf(ownerOfCall), - safeTransferFrom_0(safeTransferFrom_0Call), - safeTransferFrom_1(safeTransferFrom_1Call), - setApprovalForAll(setApprovalForAllCall), - supportsInterface(supportsInterfaceCall), - transferFrom(transferFromCall), - } - #[automatically_derived] - impl IERC721Calls { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = &[ - [1u8, 255u8, 201u8, 167u8], - [8u8, 24u8, 18u8, 252u8], - [9u8, 94u8, 167u8, 179u8], - [35u8, 184u8, 114u8, 221u8], - [66u8, 132u8, 46u8, 14u8], - [99u8, 82u8, 33u8, 30u8], - [112u8, 160u8, 130u8, 49u8], - [162u8, 44u8, 180u8, 101u8], - [184u8, 141u8, 79u8, 222u8], - [233u8, 133u8, 233u8, 197u8], - ]; - } - #[automatically_derived] - impl alloy_sol_types::SolInterface for IERC721Calls { - const NAME: &'static str = "IERC721Calls"; - const MIN_DATA_LENGTH: usize = 32usize; - const COUNT: usize = 10usize; - #[inline] - fn selector(&self) -> [u8; 4] { - match self { - Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => ::SELECTOR, - Self::getApproved(_) => ::SELECTOR, - Self::isApprovedForAll(_) => { - ::SELECTOR - } - Self::ownerOf(_) => ::SELECTOR, - Self::safeTransferFrom_0(_) => { - ::SELECTOR - } - Self::safeTransferFrom_1(_) => { - ::SELECTOR - } - Self::setApprovalForAll(_) => { - ::SELECTOR - } - Self::supportsInterface(_) => { - ::SELECTOR - } - Self::transferFrom(_) => ::SELECTOR, - } - } - #[inline] - fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { - Self::SELECTORS.get(i).copied() - } - #[inline] - fn valid_selector(selector: [u8; 4]) -> bool { - Self::SELECTORS.binary_search(&selector).is_ok() - } - #[inline] - #[allow(unsafe_code, non_snake_case)] - fn abi_decode_raw( - selector: [u8; 4], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = &[ - { - fn supportsInterface( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721Calls::supportsInterface) - } - supportsInterface - }, - { - fn getApproved( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721Calls::getApproved) - } - getApproved - }, - { - fn approve( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC721Calls::approve) - } - approve - }, - { - fn transferFrom( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721Calls::transferFrom) - } - transferFrom - }, - { - fn safeTransferFrom_0( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721Calls::safeTransferFrom_0) - } - safeTransferFrom_0 - }, - { - fn ownerOf( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC721Calls::ownerOf) - } - ownerOf - }, - { - fn balanceOf( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC721Calls::balanceOf) - } - balanceOf - }, - { - fn setApprovalForAll( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721Calls::setApprovalForAll) - } - setApprovalForAll - }, - { - fn safeTransferFrom_1( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721Calls::safeTransferFrom_1) - } - safeTransferFrom_1 - }, - { - fn isApprovedForAll( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721Calls::isApprovedForAll) - } - isApprovedForAll - }, - ]; - let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err(alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - )); - }; - (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) - } - #[inline] - fn abi_encoded_size(&self) -> usize { - match self { - Self::approve(inner) => { - ::abi_encoded_size(inner) - } - Self::balanceOf(inner) => { - ::abi_encoded_size(inner) - } - Self::getApproved(inner) => { - ::abi_encoded_size(inner) - } - Self::isApprovedForAll(inner) => { - ::abi_encoded_size(inner) - } - Self::ownerOf(inner) => { - ::abi_encoded_size(inner) - } - Self::safeTransferFrom_0(inner) => { - ::abi_encoded_size(inner) - } - Self::safeTransferFrom_1(inner) => { - ::abi_encoded_size(inner) - } - Self::setApprovalForAll(inner) => { - ::abi_encoded_size(inner) - } - Self::supportsInterface(inner) => { - ::abi_encoded_size(inner) - } - Self::transferFrom(inner) => { - ::abi_encoded_size(inner) - } - } - } - #[inline] - fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { - match self { - Self::approve(inner) => { - ::abi_encode_raw(inner, out) - } - Self::balanceOf(inner) => { - ::abi_encode_raw(inner, out) - } - Self::getApproved(inner) => { - ::abi_encode_raw(inner, out) - } - Self::isApprovedForAll(inner) => { - ::abi_encode_raw(inner, out) - } - Self::ownerOf(inner) => { - ::abi_encode_raw(inner, out) - } - Self::safeTransferFrom_0(inner) => { - ::abi_encode_raw(inner, out) - } - Self::safeTransferFrom_1(inner) => { - ::abi_encode_raw(inner, out) - } - Self::setApprovalForAll(inner) => { - ::abi_encode_raw(inner, out) - } - Self::supportsInterface(inner) => { - ::abi_encode_raw(inner, out) - } - Self::transferFrom(inner) => { - ::abi_encode_raw(inner, out) - } - } - } - } - ///Container for all the [`IERC721`](self) events. - pub enum IERC721Events { - Approval(Approval), - ApprovalForAll(ApprovalForAll), - Transfer(Transfer), - } - #[automatically_derived] - impl IERC721Events { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 32usize]] = &[ - [ - 23u8, 48u8, 126u8, 171u8, 57u8, 171u8, 97u8, 7u8, 232u8, 137u8, 152u8, 69u8, 173u8, - 61u8, 89u8, 189u8, 150u8, 83u8, 242u8, 0u8, 242u8, 32u8, 146u8, 4u8, 137u8, 202u8, - 43u8, 89u8, 55u8, 105u8, 108u8, 49u8, - ], - [ - 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, - 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, 91u8, - 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, - ], - [ - 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, 104u8, - 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, 161u8, 22u8, - 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, - ], - ]; - } - #[automatically_derived] - impl alloy_sol_types::SolEventInterface for IERC721Events { - const NAME: &'static str = "IERC721Events"; - const COUNT: usize = 3usize; - fn decode_raw_log( - topics: &[alloy_sol_types::Word], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - match topics.first().copied() { - Some(::SIGNATURE_HASH) => { - ::decode_raw_log(topics, data, validate) - .map(Self::Approval) - } - Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, data, validate, - ) - .map(Self::ApprovalForAll) - } - Some(::SIGNATURE_HASH) => { - ::decode_raw_log(topics, data, validate) - .map(Self::Transfer) - } - _ => alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { - name: ::NAME, - log: alloy_sol_types::private::Box::new( - alloy_sol_types::private::LogData::new_unchecked( - topics.to_vec(), - data.to_vec().into(), - ), - ), - }), - } - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for IERC721Events { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - match self { - Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), - Self::ApprovalForAll(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } - Self::Transfer(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), - } - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - match self { - Self::Approval(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::ApprovalForAll(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::Transfer(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - } - } - } - use alloy::contract as alloy_contract; - /**Creates a new wrapper around an on-chain [`IERC721`](self) contract instance. - - See the [wrapper's documentation](`IERC721Instance`) for more details.*/ - #[inline] - pub const fn new< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - address: alloy_sol_types::private::Address, - provider: P, - ) -> IERC721Instance { - IERC721Instance::::new(address, provider) - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub fn deploy< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> impl ::core::future::Future>> - { - IERC721Instance::::deploy(provider) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> alloy_contract::RawCallBuilder { - IERC721Instance::::deploy_builder(provider) - } - /**A [`IERC721`](self) instance. - - Contains type-safe methods for interacting with an on-chain instance of the - [`IERC721`](self) contract located at a given `address`, using a given - provider `P`. - - If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) - documentation on how to provide it), the `deploy` and `deploy_builder` methods can - be used to deploy a new instance of the contract. - - See the [module-level documentation](self) for all the available methods.*/ - #[derive(Clone)] - pub struct IERC721Instance { - address: alloy_sol_types::private::Address, - provider: P, - _network_transport: ::core::marker::PhantomData<(N, T)>, - } - #[automatically_derived] - impl ::core::fmt::Debug for IERC721Instance { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IERC721Instance") - .field(&self.address) - .finish() - } - } - /// Instantiation and getters/setters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721Instance - { - /**Creates a new wrapper around an on-chain [`IERC721`](self) contract instance. - - See the [wrapper's documentation](`IERC721Instance`) for more details.*/ - #[inline] - pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { - Self { - address, - provider, - _network_transport: ::core::marker::PhantomData, - } - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub async fn deploy(provider: P) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder(provider); - let contract_address = call_builder.deploy().await?; - Ok(Self::new(contract_address, call_builder.provider)) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { - alloy_contract::RawCallBuilder::new_raw_deploy( - provider, - ::core::clone::Clone::clone(&BYTECODE), - ) - } - /// Returns a reference to the address. - #[inline] - pub const fn address(&self) -> &alloy_sol_types::private::Address { - &self.address - } - /// Sets the address. - #[inline] - pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { - self.address = address; - } - /// Sets the address and returns `self`. - pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { - self.set_address(address); - self - } - /// Returns a reference to the provider. - #[inline] - pub const fn provider(&self) -> &P { - &self.provider - } - } - impl IERC721Instance { - /// Clones the provider and returns a new instance with the cloned provider. - #[inline] - pub fn with_cloned_provider(self) -> IERC721Instance { - IERC721Instance { - address: self.address, - provider: ::core::clone::Clone::clone(&self.provider), - _network_transport: ::core::marker::PhantomData, - } - } - } - /// Function calls. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721Instance - { - /// Creates a new call builder using this contract instance's provider and address. - /// - /// Note that the call can be any function call, not just those defined in this - /// contract. Prefer using the other methods for building type-safe contract calls. - pub fn call_builder( - &self, - call: &C, - ) -> alloy_contract::SolCallBuilder { - alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) - } - ///Creates a new call builder for the [`approve`] function. - pub fn approve( - &self, - _approved: alloy::sol_types::private::Address, - _tokenId: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&approveCall { - _approved, - _tokenId, - }) - } - ///Creates a new call builder for the [`balanceOf`] function. - pub fn balanceOf( - &self, - _owner: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&balanceOfCall { _owner }) - } - ///Creates a new call builder for the [`getApproved`] function. - pub fn getApproved( - &self, - _tokenId: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&getApprovedCall { _tokenId }) - } - ///Creates a new call builder for the [`isApprovedForAll`] function. - pub fn isApprovedForAll( - &self, - _owner: alloy::sol_types::private::Address, - _operator: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&isApprovedForAllCall { _owner, _operator }) - } - ///Creates a new call builder for the [`ownerOf`] function. - pub fn ownerOf( - &self, - _tokenId: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&ownerOfCall { _tokenId }) - } - ///Creates a new call builder for the [`safeTransferFrom_0`] function. - pub fn safeTransferFrom_0( - &self, - _from: alloy::sol_types::private::Address, - _to: alloy::sol_types::private::Address, - _tokenId: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&safeTransferFrom_0Call { - _from, - _to, - _tokenId, - }) - } - ///Creates a new call builder for the [`safeTransferFrom_1`] function. - pub fn safeTransferFrom_1( - &self, - _from: alloy::sol_types::private::Address, - _to: alloy::sol_types::private::Address, - _tokenId: alloy::sol_types::private::U256, - data: alloy::sol_types::private::Bytes, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&safeTransferFrom_1Call { - _from, - _to, - _tokenId, - data, - }) - } - ///Creates a new call builder for the [`setApprovalForAll`] function. - pub fn setApprovalForAll( - &self, - _operator: alloy::sol_types::private::Address, - _approved: bool, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&setApprovalForAllCall { - _operator, - _approved, - }) - } - ///Creates a new call builder for the [`supportsInterface`] function. - pub fn supportsInterface( - &self, - interfaceID: alloy::sol_types::private::FixedBytes<4>, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&supportsInterfaceCall { interfaceID }) - } - ///Creates a new call builder for the [`transferFrom`] function. - pub fn transferFrom( - &self, - _from: alloy::sol_types::private::Address, - _to: alloy::sol_types::private::Address, - _tokenId: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&transferFromCall { - _from, - _to, - _tokenId, - }) - } - } - /// Event filters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721Instance - { - /// Creates a new event filter using this contract instance's provider and address. - /// - /// Note that the type can be any event, not just those defined in this contract. - /// Prefer using the other methods for building type-safe event filters. - pub fn event_filter( - &self, - ) -> alloy_contract::Event { - alloy_contract::Event::new_sol(&self.provider, &self.address) - } - ///Creates a new event filter for the [`Approval`] event. - pub fn Approval_filter(&self) -> alloy_contract::Event { - self.event_filter::() - } - ///Creates a new event filter for the [`ApprovalForAll`] event. - pub fn ApprovalForAll_filter(&self) -> alloy_contract::Event { - self.event_filter::() - } - ///Creates a new event filter for the [`Transfer`] event. - pub fn Transfer_filter(&self) -> alloy_contract::Event { - self.event_filter::() - } - } -} diff --git a/crates/bindings/src/ierc721enumerable.rs b/crates/bindings/src/ierc721enumerable.rs deleted file mode 100644 index d655e61..0000000 --- a/crates/bindings/src/ierc721enumerable.rs +++ /dev/null @@ -1,3012 +0,0 @@ -/** - -Generated by the following Solidity interface... -```solidity -interface IERC721Enumerable { - event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); - event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); - event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); - - function approve(address _approved, uint256 _tokenId) external payable; - function balanceOf(address _owner) external view returns (uint256); - function getApproved(uint256 _tokenId) external view returns (address); - function isApprovedForAll(address _owner, address _operator) external view returns (bool); - function ownerOf(uint256 _tokenId) external view returns (address); - function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; - function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; - function setApprovalForAll(address _operator, bool _approved) external; - function supportsInterface(bytes4 interfaceID) external view returns (bool); - function tokenByIndex(uint256 _index) external view returns (uint256); - function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256); - function totalSupply() external view returns (uint256); - function transferFrom(address _from, address _to, uint256 _tokenId) external payable; -} -``` - -...which was generated by the following JSON ABI: -```json -[ - { - "type": "function", - "name": "approve", - "inputs": [ - { - "name": "_approved", - "type": "address", - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "balanceOf", - "inputs": [ - { - "name": "_owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getApproved", - "inputs": [ - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isApprovedForAll", - "inputs": [ - { - "name": "_owner", - "type": "address", - "internalType": "address" - }, - { - "name": "_operator", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "ownerOf", - "inputs": [ - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "safeTransferFrom", - "inputs": [ - { - "name": "_from", - "type": "address", - "internalType": "address" - }, - { - "name": "_to", - "type": "address", - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "safeTransferFrom", - "inputs": [ - { - "name": "_from", - "type": "address", - "internalType": "address" - }, - { - "name": "_to", - "type": "address", - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "setApprovalForAll", - "inputs": [ - { - "name": "_operator", - "type": "address", - "internalType": "address" - }, - { - "name": "_approved", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "supportsInterface", - "inputs": [ - { - "name": "interfaceID", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "tokenByIndex", - "inputs": [ - { - "name": "_index", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "tokenOfOwnerByIndex", - "inputs": [ - { - "name": "_owner", - "type": "address", - "internalType": "address" - }, - { - "name": "_index", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "totalSupply", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "transferFrom", - "inputs": [ - { - "name": "_from", - "type": "address", - "internalType": "address" - }, - { - "name": "_to", - "type": "address", - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "event", - "name": "Approval", - "inputs": [ - { - "name": "_owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_approved", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ApprovalForAll", - "inputs": [ - { - "name": "_owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_operator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_approved", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Transfer", - "inputs": [ - { - "name": "_from", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - } -] -```*/ -#[allow(non_camel_case_types, non_snake_case, clippy::style)] -pub mod IERC721Enumerable { - use super::*; - use alloy::sol_types as alloy_sol_types; - /// The creation / init bytecode of the contract. - /// - /// ```text - ///0x - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"", - ); - /// The runtime bytecode of the contract, as deployed on the network. - /// - /// ```text - ///0x - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"", - ); - /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. - ```solidity - event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct Approval { - #[allow(missing_docs)] - pub _owner: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _approved: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _tokenId: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for Approval { - type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = ( - alloy_sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - const SIGNATURE: &'static str = "Approval(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, - 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, - 91u8, 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { - _owner: topics.1, - _approved: topics.2, - _tokenId: topics.3, - } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - () - } - #[inline] - fn topics(&self) -> ::RustType { - ( - Self::SIGNATURE_HASH.into(), - self._owner.clone(), - self._approved.clone(), - self._tokenId.clone(), - ) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - out[1usize] = ::encode_topic( - &self._owner, - ); - out[2usize] = ::encode_topic( - &self._approved, - ); - out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self._tokenId); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for Approval { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&Approval> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &Approval) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Event with signature `ApprovalForAll(address,address,bool)` and selector `0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31`. - ```solidity - event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct ApprovalForAll { - #[allow(missing_docs)] - pub _owner: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _operator: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _approved: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for ApprovalForAll { - type DataTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = ( - alloy_sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - const SIGNATURE: &'static str = "ApprovalForAll(address,address,bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 23u8, 48u8, 126u8, 171u8, 57u8, 171u8, 97u8, 7u8, 232u8, 137u8, 152u8, 69u8, - 173u8, 61u8, 89u8, 189u8, 150u8, 83u8, 242u8, 0u8, 242u8, 32u8, 146u8, 4u8, - 137u8, 202u8, 43u8, 89u8, 55u8, 105u8, 108u8, 49u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { - _owner: topics.1, - _operator: topics.2, - _approved: data.0, - } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - ( - ::tokenize( - &self._approved, - ), - ) - } - #[inline] - fn topics(&self) -> ::RustType { - ( - Self::SIGNATURE_HASH.into(), - self._owner.clone(), - self._operator.clone(), - ) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - out[1usize] = ::encode_topic( - &self._owner, - ); - out[2usize] = ::encode_topic( - &self._operator, - ); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for ApprovalForAll { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&ApprovalForAll> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &ApprovalForAll) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. - ```solidity - event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct Transfer { - #[allow(missing_docs)] - pub _from: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _to: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _tokenId: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for Transfer { - type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = ( - alloy_sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, - 104u8, 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, - 161u8, 22u8, 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { - _from: topics.1, - _to: topics.2, - _tokenId: topics.3, - } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - () - } - #[inline] - fn topics(&self) -> ::RustType { - ( - Self::SIGNATURE_HASH.into(), - self._from.clone(), - self._to.clone(), - self._tokenId.clone(), - ) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - out[1usize] = ::encode_topic( - &self._from, - ); - out[2usize] = ::encode_topic( - &self._to, - ); - out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self._tokenId); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for Transfer { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&Transfer> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &Transfer) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. - ```solidity - function approve(address _approved, uint256 _tokenId) external payable; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct approveCall { - pub _approved: alloy::sol_types::private::Address, - pub _tokenId: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct approveReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: approveCall) -> Self { - (value._approved, value._tokenId) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for approveCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _approved: tuple.0, - _tokenId: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: approveReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for approveReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for approveCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = approveReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "approve(address,uint256)"; - const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._approved, - ), - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `balanceOf(address)` and selector `0x70a08231`. - ```solidity - function balanceOf(address _owner) external view returns (uint256); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct balanceOfCall { - pub _owner: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct balanceOfReturn { - pub _0: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: balanceOfCall) -> Self { - (value._owner,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for balanceOfCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _owner: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: balanceOfReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for balanceOfReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for balanceOfCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = balanceOfReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "balanceOf(address)"; - const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._owner, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `getApproved(uint256)` and selector `0x081812fc`. - ```solidity - function getApproved(uint256 _tokenId) external view returns (address); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct getApprovedCall { - pub _tokenId: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`getApproved(uint256)`](getApprovedCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct getApprovedReturn { - pub _0: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getApprovedCall) -> Self { - (value._tokenId,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for getApprovedCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _tokenId: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getApprovedReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for getApprovedReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for getApprovedCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = getApprovedReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getApproved(uint256)"; - const SELECTOR: [u8; 4] = [8u8, 24u8, 18u8, 252u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`. - ```solidity - function isApprovedForAll(address _owner, address _operator) external view returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct isApprovedForAllCall { - pub _owner: alloy::sol_types::private::Address, - pub _operator: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`isApprovedForAll(address,address)`](isApprovedForAllCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct isApprovedForAllReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: isApprovedForAllCall) -> Self { - (value._owner, value._operator) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for isApprovedForAllCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _owner: tuple.0, - _operator: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: isApprovedForAllReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for isApprovedForAllReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for isApprovedForAllCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = isApprovedForAllReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "isApprovedForAll(address,address)"; - const SELECTOR: [u8; 4] = [233u8, 133u8, 233u8, 197u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._owner, - ), - ::tokenize( - &self._operator, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `ownerOf(uint256)` and selector `0x6352211e`. - ```solidity - function ownerOf(uint256 _tokenId) external view returns (address); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct ownerOfCall { - pub _tokenId: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`ownerOf(uint256)`](ownerOfCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct ownerOfReturn { - pub _0: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: ownerOfCall) -> Self { - (value._tokenId,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for ownerOfCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _tokenId: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: ownerOfReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for ownerOfReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for ownerOfCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = ownerOfReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ownerOf(uint256)"; - const SELECTOR: [u8; 4] = [99u8, 82u8, 33u8, 30u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e`. - ```solidity - function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct safeTransferFrom_0Call { - pub _from: alloy::sol_types::private::Address, - pub _to: alloy::sol_types::private::Address, - pub _tokenId: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`safeTransferFrom(address,address,uint256)`](safeTransferFrom_0Call) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct safeTransferFrom_0Return {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: safeTransferFrom_0Call) -> Self { - (value._from, value._to, value._tokenId) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for safeTransferFrom_0Call { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _from: tuple.0, - _to: tuple.1, - _tokenId: tuple.2, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: safeTransferFrom_0Return) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for safeTransferFrom_0Return { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for safeTransferFrom_0Call { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = safeTransferFrom_0Return; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256)"; - const SELECTOR: [u8; 4] = [66u8, 132u8, 46u8, 14u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._from, - ), - ::tokenize( - &self._to, - ), - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde`. - ```solidity - function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct safeTransferFrom_1Call { - pub _from: alloy::sol_types::private::Address, - pub _to: alloy::sol_types::private::Address, - pub _tokenId: alloy::sol_types::private::U256, - pub data: alloy::sol_types::private::Bytes, - } - ///Container type for the return parameters of the [`safeTransferFrom(address,address,uint256,bytes)`](safeTransferFrom_1Call) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct safeTransferFrom_1Return {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - alloy::sol_types::sol_data::Bytes, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - alloy::sol_types::private::Bytes, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: safeTransferFrom_1Call) -> Self { - (value._from, value._to, value._tokenId, value.data) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for safeTransferFrom_1Call { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _from: tuple.0, - _to: tuple.1, - _tokenId: tuple.2, - data: tuple.3, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: safeTransferFrom_1Return) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for safeTransferFrom_1Return { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for safeTransferFrom_1Call { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - alloy::sol_types::sol_data::Bytes, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = safeTransferFrom_1Return; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256,bytes)"; - const SELECTOR: [u8; 4] = [184u8, 141u8, 79u8, 222u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._from, - ), - ::tokenize( - &self._to, - ), - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ::tokenize( - &self.data, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465`. - ```solidity - function setApprovalForAll(address _operator, bool _approved) external; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct setApprovalForAllCall { - pub _operator: alloy::sol_types::private::Address, - pub _approved: bool, - } - ///Container type for the return parameters of the [`setApprovalForAll(address,bool)`](setApprovalForAllCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct setApprovalForAllReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Bool, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address, bool); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: setApprovalForAllCall) -> Self { - (value._operator, value._approved) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for setApprovalForAllCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _operator: tuple.0, - _approved: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: setApprovalForAllReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for setApprovalForAllReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for setApprovalForAllCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Bool, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = setApprovalForAllReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "setApprovalForAll(address,bool)"; - const SELECTOR: [u8; 4] = [162u8, 44u8, 180u8, 101u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._operator, - ), - ::tokenize( - &self._approved, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`. - ```solidity - function supportsInterface(bytes4 interfaceID) external view returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct supportsInterfaceCall { - pub interfaceID: alloy::sol_types::private::FixedBytes<4>, - } - ///Container type for the return parameters of the [`supportsInterface(bytes4)`](supportsInterfaceCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct supportsInterfaceReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: supportsInterfaceCall) -> Self { - (value.interfaceID,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for supportsInterfaceCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - interfaceID: tuple.0, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: supportsInterfaceReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for supportsInterfaceReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for supportsInterfaceCall { - type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = supportsInterfaceReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "supportsInterface(bytes4)"; - const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize(&self.interfaceID), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `tokenByIndex(uint256)` and selector `0x4f6ccce7`. - ```solidity - function tokenByIndex(uint256 _index) external view returns (uint256); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct tokenByIndexCall { - pub _index: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`tokenByIndex(uint256)`](tokenByIndexCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct tokenByIndexReturn { - pub _0: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: tokenByIndexCall) -> Self { - (value._index,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for tokenByIndexCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _index: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: tokenByIndexReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for tokenByIndexReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for tokenByIndexCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = tokenByIndexReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "tokenByIndex(uint256)"; - const SELECTOR: [u8; 4] = [79u8, 108u8, 204u8, 231u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self._index, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `tokenOfOwnerByIndex(address,uint256)` and selector `0x2f745c59`. - ```solidity - function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct tokenOfOwnerByIndexCall { - pub _owner: alloy::sol_types::private::Address, - pub _index: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`tokenOfOwnerByIndex(address,uint256)`](tokenOfOwnerByIndexCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct tokenOfOwnerByIndexReturn { - pub _0: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: tokenOfOwnerByIndexCall) -> Self { - (value._owner, value._index) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for tokenOfOwnerByIndexCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _owner: tuple.0, - _index: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: tokenOfOwnerByIndexReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for tokenOfOwnerByIndexReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for tokenOfOwnerByIndexCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = tokenOfOwnerByIndexReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "tokenOfOwnerByIndex(address,uint256)"; - const SELECTOR: [u8; 4] = [47u8, 116u8, 92u8, 89u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._owner, - ), - as alloy_sol_types::SolType>::tokenize( - &self._index, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `totalSupply()` and selector `0x18160ddd`. - ```solidity - function totalSupply() external view returns (uint256); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct totalSupplyCall {} - ///Container type for the return parameters of the [`totalSupply()`](totalSupplyCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct totalSupplyReturn { - pub _0: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: totalSupplyCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for totalSupplyCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: totalSupplyReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for totalSupplyReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for totalSupplyCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = totalSupplyReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "totalSupply()"; - const SELECTOR: [u8; 4] = [24u8, 22u8, 13u8, 221u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. - ```solidity - function transferFrom(address _from, address _to, uint256 _tokenId) external payable; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferFromCall { - pub _from: alloy::sol_types::private::Address, - pub _to: alloy::sol_types::private::Address, - pub _tokenId: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferFromReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferFromCall) -> Self { - (value._from, value._to, value._tokenId) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferFromCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _from: tuple.0, - _to: tuple.1, - _tokenId: tuple.2, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferFromReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferFromReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for transferFromCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = transferFromReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; - const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._from, - ), - ::tokenize( - &self._to, - ), - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - ///Container for all the [`IERC721Enumerable`](self) function calls. - pub enum IERC721EnumerableCalls { - approve(approveCall), - balanceOf(balanceOfCall), - getApproved(getApprovedCall), - isApprovedForAll(isApprovedForAllCall), - ownerOf(ownerOfCall), - safeTransferFrom_0(safeTransferFrom_0Call), - safeTransferFrom_1(safeTransferFrom_1Call), - setApprovalForAll(setApprovalForAllCall), - supportsInterface(supportsInterfaceCall), - tokenByIndex(tokenByIndexCall), - tokenOfOwnerByIndex(tokenOfOwnerByIndexCall), - totalSupply(totalSupplyCall), - transferFrom(transferFromCall), - } - #[automatically_derived] - impl IERC721EnumerableCalls { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = &[ - [1u8, 255u8, 201u8, 167u8], - [8u8, 24u8, 18u8, 252u8], - [9u8, 94u8, 167u8, 179u8], - [24u8, 22u8, 13u8, 221u8], - [35u8, 184u8, 114u8, 221u8], - [47u8, 116u8, 92u8, 89u8], - [66u8, 132u8, 46u8, 14u8], - [79u8, 108u8, 204u8, 231u8], - [99u8, 82u8, 33u8, 30u8], - [112u8, 160u8, 130u8, 49u8], - [162u8, 44u8, 180u8, 101u8], - [184u8, 141u8, 79u8, 222u8], - [233u8, 133u8, 233u8, 197u8], - ]; - } - #[automatically_derived] - impl alloy_sol_types::SolInterface for IERC721EnumerableCalls { - const NAME: &'static str = "IERC721EnumerableCalls"; - const MIN_DATA_LENGTH: usize = 0usize; - const COUNT: usize = 13usize; - #[inline] - fn selector(&self) -> [u8; 4] { - match self { - Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => ::SELECTOR, - Self::getApproved(_) => ::SELECTOR, - Self::isApprovedForAll(_) => { - ::SELECTOR - } - Self::ownerOf(_) => ::SELECTOR, - Self::safeTransferFrom_0(_) => { - ::SELECTOR - } - Self::safeTransferFrom_1(_) => { - ::SELECTOR - } - Self::setApprovalForAll(_) => { - ::SELECTOR - } - Self::supportsInterface(_) => { - ::SELECTOR - } - Self::tokenByIndex(_) => ::SELECTOR, - Self::tokenOfOwnerByIndex(_) => { - ::SELECTOR - } - Self::totalSupply(_) => ::SELECTOR, - Self::transferFrom(_) => ::SELECTOR, - } - } - #[inline] - fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { - Self::SELECTORS.get(i).copied() - } - #[inline] - fn valid_selector(selector: [u8; 4]) -> bool { - Self::SELECTORS.binary_search(&selector).is_ok() - } - #[inline] - #[allow(unsafe_code, non_snake_case)] - fn abi_decode_raw( - selector: [u8; 4], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn( - &[u8], - bool, - ) - -> alloy_sol_types::Result] = &[ - { - fn supportsInterface( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721EnumerableCalls::supportsInterface) - } - supportsInterface - }, - { - fn getApproved( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721EnumerableCalls::getApproved) - } - getApproved - }, - { - fn approve( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC721EnumerableCalls::approve) - } - approve - }, - { - fn totalSupply( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721EnumerableCalls::totalSupply) - } - totalSupply - }, - { - fn transferFrom( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721EnumerableCalls::transferFrom) - } - transferFrom - }, - { - fn tokenOfOwnerByIndex( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721EnumerableCalls::tokenOfOwnerByIndex) - } - tokenOfOwnerByIndex - }, - { - fn safeTransferFrom_0( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721EnumerableCalls::safeTransferFrom_0) - } - safeTransferFrom_0 - }, - { - fn tokenByIndex( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721EnumerableCalls::tokenByIndex) - } - tokenByIndex - }, - { - fn ownerOf( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC721EnumerableCalls::ownerOf) - } - ownerOf - }, - { - fn balanceOf( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC721EnumerableCalls::balanceOf) - } - balanceOf - }, - { - fn setApprovalForAll( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721EnumerableCalls::setApprovalForAll) - } - setApprovalForAll - }, - { - fn safeTransferFrom_1( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721EnumerableCalls::safeTransferFrom_1) - } - safeTransferFrom_1 - }, - { - fn isApprovedForAll( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721EnumerableCalls::isApprovedForAll) - } - isApprovedForAll - }, - ]; - let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err(alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - )); - }; - (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) - } - #[inline] - fn abi_encoded_size(&self) -> usize { - match self { - Self::approve(inner) => { - ::abi_encoded_size(inner) - } - Self::balanceOf(inner) => { - ::abi_encoded_size(inner) - } - Self::getApproved(inner) => { - ::abi_encoded_size(inner) - } - Self::isApprovedForAll(inner) => { - ::abi_encoded_size(inner) - } - Self::ownerOf(inner) => { - ::abi_encoded_size(inner) - } - Self::safeTransferFrom_0(inner) => { - ::abi_encoded_size(inner) - } - Self::safeTransferFrom_1(inner) => { - ::abi_encoded_size(inner) - } - Self::setApprovalForAll(inner) => { - ::abi_encoded_size(inner) - } - Self::supportsInterface(inner) => { - ::abi_encoded_size(inner) - } - Self::tokenByIndex(inner) => { - ::abi_encoded_size(inner) - } - Self::tokenOfOwnerByIndex(inner) => { - ::abi_encoded_size(inner) - } - Self::totalSupply(inner) => { - ::abi_encoded_size(inner) - } - Self::transferFrom(inner) => { - ::abi_encoded_size(inner) - } - } - } - #[inline] - fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { - match self { - Self::approve(inner) => { - ::abi_encode_raw(inner, out) - } - Self::balanceOf(inner) => { - ::abi_encode_raw(inner, out) - } - Self::getApproved(inner) => { - ::abi_encode_raw(inner, out) - } - Self::isApprovedForAll(inner) => { - ::abi_encode_raw(inner, out) - } - Self::ownerOf(inner) => { - ::abi_encode_raw(inner, out) - } - Self::safeTransferFrom_0(inner) => { - ::abi_encode_raw(inner, out) - } - Self::safeTransferFrom_1(inner) => { - ::abi_encode_raw(inner, out) - } - Self::setApprovalForAll(inner) => { - ::abi_encode_raw(inner, out) - } - Self::supportsInterface(inner) => { - ::abi_encode_raw(inner, out) - } - Self::tokenByIndex(inner) => { - ::abi_encode_raw(inner, out) - } - Self::tokenOfOwnerByIndex(inner) => { - ::abi_encode_raw( - inner, out, - ) - } - Self::totalSupply(inner) => { - ::abi_encode_raw(inner, out) - } - Self::transferFrom(inner) => { - ::abi_encode_raw(inner, out) - } - } - } - } - ///Container for all the [`IERC721Enumerable`](self) events. - pub enum IERC721EnumerableEvents { - Approval(Approval), - ApprovalForAll(ApprovalForAll), - Transfer(Transfer), - } - #[automatically_derived] - impl IERC721EnumerableEvents { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 32usize]] = &[ - [ - 23u8, 48u8, 126u8, 171u8, 57u8, 171u8, 97u8, 7u8, 232u8, 137u8, 152u8, 69u8, 173u8, - 61u8, 89u8, 189u8, 150u8, 83u8, 242u8, 0u8, 242u8, 32u8, 146u8, 4u8, 137u8, 202u8, - 43u8, 89u8, 55u8, 105u8, 108u8, 49u8, - ], - [ - 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, - 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, 91u8, - 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, - ], - [ - 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, 104u8, - 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, 161u8, 22u8, - 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, - ], - ]; - } - #[automatically_derived] - impl alloy_sol_types::SolEventInterface for IERC721EnumerableEvents { - const NAME: &'static str = "IERC721EnumerableEvents"; - const COUNT: usize = 3usize; - fn decode_raw_log( - topics: &[alloy_sol_types::Word], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - match topics.first().copied() { - Some(::SIGNATURE_HASH) => { - ::decode_raw_log(topics, data, validate) - .map(Self::Approval) - } - Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, data, validate, - ) - .map(Self::ApprovalForAll) - } - Some(::SIGNATURE_HASH) => { - ::decode_raw_log(topics, data, validate) - .map(Self::Transfer) - } - _ => alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { - name: ::NAME, - log: alloy_sol_types::private::Box::new( - alloy_sol_types::private::LogData::new_unchecked( - topics.to_vec(), - data.to_vec().into(), - ), - ), - }), - } - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for IERC721EnumerableEvents { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - match self { - Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), - Self::ApprovalForAll(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } - Self::Transfer(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), - } - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - match self { - Self::Approval(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::ApprovalForAll(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::Transfer(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - } - } - } - use alloy::contract as alloy_contract; - /**Creates a new wrapper around an on-chain [`IERC721Enumerable`](self) contract instance. - - See the [wrapper's documentation](`IERC721EnumerableInstance`) for more details.*/ - #[inline] - pub const fn new< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - address: alloy_sol_types::private::Address, - provider: P, - ) -> IERC721EnumerableInstance { - IERC721EnumerableInstance::::new(address, provider) - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub fn deploy< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> impl ::core::future::Future>> - { - IERC721EnumerableInstance::::deploy(provider) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> alloy_contract::RawCallBuilder { - IERC721EnumerableInstance::::deploy_builder(provider) - } - /**A [`IERC721Enumerable`](self) instance. - - Contains type-safe methods for interacting with an on-chain instance of the - [`IERC721Enumerable`](self) contract located at a given `address`, using a given - provider `P`. - - If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) - documentation on how to provide it), the `deploy` and `deploy_builder` methods can - be used to deploy a new instance of the contract. - - See the [module-level documentation](self) for all the available methods.*/ - #[derive(Clone)] - pub struct IERC721EnumerableInstance { - address: alloy_sol_types::private::Address, - provider: P, - _network_transport: ::core::marker::PhantomData<(N, T)>, - } - #[automatically_derived] - impl ::core::fmt::Debug for IERC721EnumerableInstance { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IERC721EnumerableInstance") - .field(&self.address) - .finish() - } - } - /// Instantiation and getters/setters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721EnumerableInstance - { - /**Creates a new wrapper around an on-chain [`IERC721Enumerable`](self) contract instance. - - See the [wrapper's documentation](`IERC721EnumerableInstance`) for more details.*/ - #[inline] - pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { - Self { - address, - provider, - _network_transport: ::core::marker::PhantomData, - } - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub async fn deploy( - provider: P, - ) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder(provider); - let contract_address = call_builder.deploy().await?; - Ok(Self::new(contract_address, call_builder.provider)) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { - alloy_contract::RawCallBuilder::new_raw_deploy( - provider, - ::core::clone::Clone::clone(&BYTECODE), - ) - } - /// Returns a reference to the address. - #[inline] - pub const fn address(&self) -> &alloy_sol_types::private::Address { - &self.address - } - /// Sets the address. - #[inline] - pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { - self.address = address; - } - /// Sets the address and returns `self`. - pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { - self.set_address(address); - self - } - /// Returns a reference to the provider. - #[inline] - pub const fn provider(&self) -> &P { - &self.provider - } - } - impl IERC721EnumerableInstance { - /// Clones the provider and returns a new instance with the cloned provider. - #[inline] - pub fn with_cloned_provider(self) -> IERC721EnumerableInstance { - IERC721EnumerableInstance { - address: self.address, - provider: ::core::clone::Clone::clone(&self.provider), - _network_transport: ::core::marker::PhantomData, - } - } - } - /// Function calls. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721EnumerableInstance - { - /// Creates a new call builder using this contract instance's provider and address. - /// - /// Note that the call can be any function call, not just those defined in this - /// contract. Prefer using the other methods for building type-safe contract calls. - pub fn call_builder( - &self, - call: &C, - ) -> alloy_contract::SolCallBuilder { - alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) - } - ///Creates a new call builder for the [`approve`] function. - pub fn approve( - &self, - _approved: alloy::sol_types::private::Address, - _tokenId: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&approveCall { - _approved, - _tokenId, - }) - } - ///Creates a new call builder for the [`balanceOf`] function. - pub fn balanceOf( - &self, - _owner: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&balanceOfCall { _owner }) - } - ///Creates a new call builder for the [`getApproved`] function. - pub fn getApproved( - &self, - _tokenId: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&getApprovedCall { _tokenId }) - } - ///Creates a new call builder for the [`isApprovedForAll`] function. - pub fn isApprovedForAll( - &self, - _owner: alloy::sol_types::private::Address, - _operator: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&isApprovedForAllCall { _owner, _operator }) - } - ///Creates a new call builder for the [`ownerOf`] function. - pub fn ownerOf( - &self, - _tokenId: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&ownerOfCall { _tokenId }) - } - ///Creates a new call builder for the [`safeTransferFrom_0`] function. - pub fn safeTransferFrom_0( - &self, - _from: alloy::sol_types::private::Address, - _to: alloy::sol_types::private::Address, - _tokenId: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&safeTransferFrom_0Call { - _from, - _to, - _tokenId, - }) - } - ///Creates a new call builder for the [`safeTransferFrom_1`] function. - pub fn safeTransferFrom_1( - &self, - _from: alloy::sol_types::private::Address, - _to: alloy::sol_types::private::Address, - _tokenId: alloy::sol_types::private::U256, - data: alloy::sol_types::private::Bytes, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&safeTransferFrom_1Call { - _from, - _to, - _tokenId, - data, - }) - } - ///Creates a new call builder for the [`setApprovalForAll`] function. - pub fn setApprovalForAll( - &self, - _operator: alloy::sol_types::private::Address, - _approved: bool, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&setApprovalForAllCall { - _operator, - _approved, - }) - } - ///Creates a new call builder for the [`supportsInterface`] function. - pub fn supportsInterface( - &self, - interfaceID: alloy::sol_types::private::FixedBytes<4>, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&supportsInterfaceCall { interfaceID }) - } - ///Creates a new call builder for the [`tokenByIndex`] function. - pub fn tokenByIndex( - &self, - _index: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&tokenByIndexCall { _index }) - } - ///Creates a new call builder for the [`tokenOfOwnerByIndex`] function. - pub fn tokenOfOwnerByIndex( - &self, - _owner: alloy::sol_types::private::Address, - _index: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&tokenOfOwnerByIndexCall { _owner, _index }) - } - ///Creates a new call builder for the [`totalSupply`] function. - pub fn totalSupply(&self) -> alloy_contract::SolCallBuilder { - self.call_builder(&totalSupplyCall {}) - } - ///Creates a new call builder for the [`transferFrom`] function. - pub fn transferFrom( - &self, - _from: alloy::sol_types::private::Address, - _to: alloy::sol_types::private::Address, - _tokenId: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&transferFromCall { - _from, - _to, - _tokenId, - }) - } - } - /// Event filters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721EnumerableInstance - { - /// Creates a new event filter using this contract instance's provider and address. - /// - /// Note that the type can be any event, not just those defined in this contract. - /// Prefer using the other methods for building type-safe event filters. - pub fn event_filter( - &self, - ) -> alloy_contract::Event { - alloy_contract::Event::new_sol(&self.provider, &self.address) - } - ///Creates a new event filter for the [`Approval`] event. - pub fn Approval_filter(&self) -> alloy_contract::Event { - self.event_filter::() - } - ///Creates a new event filter for the [`ApprovalForAll`] event. - pub fn ApprovalForAll_filter(&self) -> alloy_contract::Event { - self.event_filter::() - } - ///Creates a new event filter for the [`Transfer`] event. - pub fn Transfer_filter(&self) -> alloy_contract::Event { - self.event_filter::() - } - } -} diff --git a/crates/bindings/src/ierc721metadata.rs b/crates/bindings/src/ierc721metadata.rs deleted file mode 100644 index 4e8353e..0000000 --- a/crates/bindings/src/ierc721metadata.rs +++ /dev/null @@ -1,2965 +0,0 @@ -/** - -Generated by the following Solidity interface... -```solidity -interface IERC721Metadata { - event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); - event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); - event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); - - function approve(address _approved, uint256 _tokenId) external payable; - function balanceOf(address _owner) external view returns (uint256); - function getApproved(uint256 _tokenId) external view returns (address); - function isApprovedForAll(address _owner, address _operator) external view returns (bool); - function name() external view returns (string memory _name); - function ownerOf(uint256 _tokenId) external view returns (address); - function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; - function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; - function setApprovalForAll(address _operator, bool _approved) external; - function supportsInterface(bytes4 interfaceID) external view returns (bool); - function symbol() external view returns (string memory _symbol); - function tokenURI(uint256 _tokenId) external view returns (string memory); - function transferFrom(address _from, address _to, uint256 _tokenId) external payable; -} -``` - -...which was generated by the following JSON ABI: -```json -[ - { - "type": "function", - "name": "approve", - "inputs": [ - { - "name": "_approved", - "type": "address", - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "balanceOf", - "inputs": [ - { - "name": "_owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getApproved", - "inputs": [ - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isApprovedForAll", - "inputs": [ - { - "name": "_owner", - "type": "address", - "internalType": "address" - }, - { - "name": "_operator", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "name": "_name", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "ownerOf", - "inputs": [ - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "safeTransferFrom", - "inputs": [ - { - "name": "_from", - "type": "address", - "internalType": "address" - }, - { - "name": "_to", - "type": "address", - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "safeTransferFrom", - "inputs": [ - { - "name": "_from", - "type": "address", - "internalType": "address" - }, - { - "name": "_to", - "type": "address", - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "setApprovalForAll", - "inputs": [ - { - "name": "_operator", - "type": "address", - "internalType": "address" - }, - { - "name": "_approved", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "supportsInterface", - "inputs": [ - { - "name": "interfaceID", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "symbol", - "inputs": [], - "outputs": [ - { - "name": "_symbol", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "tokenURI", - "inputs": [ - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "transferFrom", - "inputs": [ - { - "name": "_from", - "type": "address", - "internalType": "address" - }, - { - "name": "_to", - "type": "address", - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "event", - "name": "Approval", - "inputs": [ - { - "name": "_owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_approved", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ApprovalForAll", - "inputs": [ - { - "name": "_owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_operator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_approved", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Transfer", - "inputs": [ - { - "name": "_from", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - } -] -```*/ -#[allow(non_camel_case_types, non_snake_case, clippy::style)] -pub mod IERC721Metadata { - use super::*; - use alloy::sol_types as alloy_sol_types; - /// The creation / init bytecode of the contract. - /// - /// ```text - ///0x - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"", - ); - /// The runtime bytecode of the contract, as deployed on the network. - /// - /// ```text - ///0x - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"", - ); - /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. - ```solidity - event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct Approval { - #[allow(missing_docs)] - pub _owner: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _approved: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _tokenId: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for Approval { - type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = ( - alloy_sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - const SIGNATURE: &'static str = "Approval(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, - 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, - 91u8, 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { - _owner: topics.1, - _approved: topics.2, - _tokenId: topics.3, - } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - () - } - #[inline] - fn topics(&self) -> ::RustType { - ( - Self::SIGNATURE_HASH.into(), - self._owner.clone(), - self._approved.clone(), - self._tokenId.clone(), - ) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - out[1usize] = ::encode_topic( - &self._owner, - ); - out[2usize] = ::encode_topic( - &self._approved, - ); - out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self._tokenId); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for Approval { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&Approval> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &Approval) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Event with signature `ApprovalForAll(address,address,bool)` and selector `0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31`. - ```solidity - event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct ApprovalForAll { - #[allow(missing_docs)] - pub _owner: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _operator: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _approved: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for ApprovalForAll { - type DataTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = ( - alloy_sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - const SIGNATURE: &'static str = "ApprovalForAll(address,address,bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 23u8, 48u8, 126u8, 171u8, 57u8, 171u8, 97u8, 7u8, 232u8, 137u8, 152u8, 69u8, - 173u8, 61u8, 89u8, 189u8, 150u8, 83u8, 242u8, 0u8, 242u8, 32u8, 146u8, 4u8, - 137u8, 202u8, 43u8, 89u8, 55u8, 105u8, 108u8, 49u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { - _owner: topics.1, - _operator: topics.2, - _approved: data.0, - } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - ( - ::tokenize( - &self._approved, - ), - ) - } - #[inline] - fn topics(&self) -> ::RustType { - ( - Self::SIGNATURE_HASH.into(), - self._owner.clone(), - self._operator.clone(), - ) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - out[1usize] = ::encode_topic( - &self._owner, - ); - out[2usize] = ::encode_topic( - &self._operator, - ); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for ApprovalForAll { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&ApprovalForAll> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &ApprovalForAll) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. - ```solidity - event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct Transfer { - #[allow(missing_docs)] - pub _from: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _to: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _tokenId: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for Transfer { - type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = ( - alloy_sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, - 104u8, 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, - 161u8, 22u8, 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { - _from: topics.1, - _to: topics.2, - _tokenId: topics.3, - } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - () - } - #[inline] - fn topics(&self) -> ::RustType { - ( - Self::SIGNATURE_HASH.into(), - self._from.clone(), - self._to.clone(), - self._tokenId.clone(), - ) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - out[1usize] = ::encode_topic( - &self._from, - ); - out[2usize] = ::encode_topic( - &self._to, - ); - out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self._tokenId); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for Transfer { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&Transfer> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &Transfer) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. - ```solidity - function approve(address _approved, uint256 _tokenId) external payable; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct approveCall { - pub _approved: alloy::sol_types::private::Address, - pub _tokenId: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct approveReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: approveCall) -> Self { - (value._approved, value._tokenId) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for approveCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _approved: tuple.0, - _tokenId: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: approveReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for approveReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for approveCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = approveReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "approve(address,uint256)"; - const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._approved, - ), - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `balanceOf(address)` and selector `0x70a08231`. - ```solidity - function balanceOf(address _owner) external view returns (uint256); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct balanceOfCall { - pub _owner: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct balanceOfReturn { - pub _0: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: balanceOfCall) -> Self { - (value._owner,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for balanceOfCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _owner: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: balanceOfReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for balanceOfReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for balanceOfCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = balanceOfReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "balanceOf(address)"; - const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._owner, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `getApproved(uint256)` and selector `0x081812fc`. - ```solidity - function getApproved(uint256 _tokenId) external view returns (address); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct getApprovedCall { - pub _tokenId: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`getApproved(uint256)`](getApprovedCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct getApprovedReturn { - pub _0: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getApprovedCall) -> Self { - (value._tokenId,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for getApprovedCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _tokenId: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getApprovedReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for getApprovedReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for getApprovedCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = getApprovedReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getApproved(uint256)"; - const SELECTOR: [u8; 4] = [8u8, 24u8, 18u8, 252u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`. - ```solidity - function isApprovedForAll(address _owner, address _operator) external view returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct isApprovedForAllCall { - pub _owner: alloy::sol_types::private::Address, - pub _operator: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`isApprovedForAll(address,address)`](isApprovedForAllCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct isApprovedForAllReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: isApprovedForAllCall) -> Self { - (value._owner, value._operator) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for isApprovedForAllCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _owner: tuple.0, - _operator: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: isApprovedForAllReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for isApprovedForAllReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for isApprovedForAllCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = isApprovedForAllReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "isApprovedForAll(address,address)"; - const SELECTOR: [u8; 4] = [233u8, 133u8, 233u8, 197u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._owner, - ), - ::tokenize( - &self._operator, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `name()` and selector `0x06fdde03`. - ```solidity - function name() external view returns (string memory _name); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct nameCall {} - ///Container type for the return parameters of the [`name()`](nameCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct nameReturn { - pub _name: alloy::sol_types::private::String, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: nameCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for nameCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: nameReturn) -> Self { - (value._name,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for nameReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _name: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for nameCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = nameReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "name()"; - const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `ownerOf(uint256)` and selector `0x6352211e`. - ```solidity - function ownerOf(uint256 _tokenId) external view returns (address); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct ownerOfCall { - pub _tokenId: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`ownerOf(uint256)`](ownerOfCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct ownerOfReturn { - pub _0: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: ownerOfCall) -> Self { - (value._tokenId,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for ownerOfCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _tokenId: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: ownerOfReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for ownerOfReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for ownerOfCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = ownerOfReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ownerOf(uint256)"; - const SELECTOR: [u8; 4] = [99u8, 82u8, 33u8, 30u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e`. - ```solidity - function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct safeTransferFrom_0Call { - pub _from: alloy::sol_types::private::Address, - pub _to: alloy::sol_types::private::Address, - pub _tokenId: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`safeTransferFrom(address,address,uint256)`](safeTransferFrom_0Call) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct safeTransferFrom_0Return {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: safeTransferFrom_0Call) -> Self { - (value._from, value._to, value._tokenId) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for safeTransferFrom_0Call { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _from: tuple.0, - _to: tuple.1, - _tokenId: tuple.2, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: safeTransferFrom_0Return) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for safeTransferFrom_0Return { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for safeTransferFrom_0Call { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = safeTransferFrom_0Return; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256)"; - const SELECTOR: [u8; 4] = [66u8, 132u8, 46u8, 14u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._from, - ), - ::tokenize( - &self._to, - ), - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde`. - ```solidity - function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct safeTransferFrom_1Call { - pub _from: alloy::sol_types::private::Address, - pub _to: alloy::sol_types::private::Address, - pub _tokenId: alloy::sol_types::private::U256, - pub data: alloy::sol_types::private::Bytes, - } - ///Container type for the return parameters of the [`safeTransferFrom(address,address,uint256,bytes)`](safeTransferFrom_1Call) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct safeTransferFrom_1Return {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - alloy::sol_types::sol_data::Bytes, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - alloy::sol_types::private::Bytes, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: safeTransferFrom_1Call) -> Self { - (value._from, value._to, value._tokenId, value.data) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for safeTransferFrom_1Call { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _from: tuple.0, - _to: tuple.1, - _tokenId: tuple.2, - data: tuple.3, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: safeTransferFrom_1Return) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for safeTransferFrom_1Return { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for safeTransferFrom_1Call { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - alloy::sol_types::sol_data::Bytes, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = safeTransferFrom_1Return; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256,bytes)"; - const SELECTOR: [u8; 4] = [184u8, 141u8, 79u8, 222u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._from, - ), - ::tokenize( - &self._to, - ), - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ::tokenize( - &self.data, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465`. - ```solidity - function setApprovalForAll(address _operator, bool _approved) external; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct setApprovalForAllCall { - pub _operator: alloy::sol_types::private::Address, - pub _approved: bool, - } - ///Container type for the return parameters of the [`setApprovalForAll(address,bool)`](setApprovalForAllCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct setApprovalForAllReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Bool, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address, bool); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: setApprovalForAllCall) -> Self { - (value._operator, value._approved) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for setApprovalForAllCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _operator: tuple.0, - _approved: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: setApprovalForAllReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for setApprovalForAllReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for setApprovalForAllCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Bool, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = setApprovalForAllReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "setApprovalForAll(address,bool)"; - const SELECTOR: [u8; 4] = [162u8, 44u8, 180u8, 101u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._operator, - ), - ::tokenize( - &self._approved, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`. - ```solidity - function supportsInterface(bytes4 interfaceID) external view returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct supportsInterfaceCall { - pub interfaceID: alloy::sol_types::private::FixedBytes<4>, - } - ///Container type for the return parameters of the [`supportsInterface(bytes4)`](supportsInterfaceCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct supportsInterfaceReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: supportsInterfaceCall) -> Self { - (value.interfaceID,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for supportsInterfaceCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - interfaceID: tuple.0, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: supportsInterfaceReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for supportsInterfaceReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for supportsInterfaceCall { - type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = supportsInterfaceReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "supportsInterface(bytes4)"; - const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize(&self.interfaceID), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `symbol()` and selector `0x95d89b41`. - ```solidity - function symbol() external view returns (string memory _symbol); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct symbolCall {} - ///Container type for the return parameters of the [`symbol()`](symbolCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct symbolReturn { - pub _symbol: alloy::sol_types::private::String, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: symbolCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for symbolCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: symbolReturn) -> Self { - (value._symbol,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for symbolReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _symbol: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for symbolCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = symbolReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "symbol()"; - const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `tokenURI(uint256)` and selector `0xc87b56dd`. - ```solidity - function tokenURI(uint256 _tokenId) external view returns (string memory); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct tokenURICall { - pub _tokenId: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`tokenURI(uint256)`](tokenURICall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct tokenURIReturn { - pub _0: alloy::sol_types::private::String, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: tokenURICall) -> Self { - (value._tokenId,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for tokenURICall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _tokenId: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: tokenURIReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for tokenURIReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for tokenURICall { - type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = tokenURIReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "tokenURI(uint256)"; - const SELECTOR: [u8; 4] = [200u8, 123u8, 86u8, 221u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. - ```solidity - function transferFrom(address _from, address _to, uint256 _tokenId) external payable; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferFromCall { - pub _from: alloy::sol_types::private::Address, - pub _to: alloy::sol_types::private::Address, - pub _tokenId: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferFromReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferFromCall) -> Self { - (value._from, value._to, value._tokenId) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferFromCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _from: tuple.0, - _to: tuple.1, - _tokenId: tuple.2, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferFromReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferFromReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for transferFromCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = transferFromReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; - const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._from, - ), - ::tokenize( - &self._to, - ), - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - ///Container for all the [`IERC721Metadata`](self) function calls. - pub enum IERC721MetadataCalls { - approve(approveCall), - balanceOf(balanceOfCall), - getApproved(getApprovedCall), - isApprovedForAll(isApprovedForAllCall), - name(nameCall), - ownerOf(ownerOfCall), - safeTransferFrom_0(safeTransferFrom_0Call), - safeTransferFrom_1(safeTransferFrom_1Call), - setApprovalForAll(setApprovalForAllCall), - supportsInterface(supportsInterfaceCall), - symbol(symbolCall), - tokenURI(tokenURICall), - transferFrom(transferFromCall), - } - #[automatically_derived] - impl IERC721MetadataCalls { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = &[ - [1u8, 255u8, 201u8, 167u8], - [6u8, 253u8, 222u8, 3u8], - [8u8, 24u8, 18u8, 252u8], - [9u8, 94u8, 167u8, 179u8], - [35u8, 184u8, 114u8, 221u8], - [66u8, 132u8, 46u8, 14u8], - [99u8, 82u8, 33u8, 30u8], - [112u8, 160u8, 130u8, 49u8], - [149u8, 216u8, 155u8, 65u8], - [162u8, 44u8, 180u8, 101u8], - [184u8, 141u8, 79u8, 222u8], - [200u8, 123u8, 86u8, 221u8], - [233u8, 133u8, 233u8, 197u8], - ]; - } - #[automatically_derived] - impl alloy_sol_types::SolInterface for IERC721MetadataCalls { - const NAME: &'static str = "IERC721MetadataCalls"; - const MIN_DATA_LENGTH: usize = 0usize; - const COUNT: usize = 13usize; - #[inline] - fn selector(&self) -> [u8; 4] { - match self { - Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => ::SELECTOR, - Self::getApproved(_) => ::SELECTOR, - Self::isApprovedForAll(_) => { - ::SELECTOR - } - Self::name(_) => ::SELECTOR, - Self::ownerOf(_) => ::SELECTOR, - Self::safeTransferFrom_0(_) => { - ::SELECTOR - } - Self::safeTransferFrom_1(_) => { - ::SELECTOR - } - Self::setApprovalForAll(_) => { - ::SELECTOR - } - Self::supportsInterface(_) => { - ::SELECTOR - } - Self::symbol(_) => ::SELECTOR, - Self::tokenURI(_) => ::SELECTOR, - Self::transferFrom(_) => ::SELECTOR, - } - } - #[inline] - fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { - Self::SELECTORS.get(i).copied() - } - #[inline] - fn valid_selector(selector: [u8; 4]) -> bool { - Self::SELECTORS.binary_search(&selector).is_ok() - } - #[inline] - #[allow(unsafe_code, non_snake_case)] - fn abi_decode_raw( - selector: [u8; 4], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn( - &[u8], - bool, - ) - -> alloy_sol_types::Result] = &[ - { - fn supportsInterface( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721MetadataCalls::supportsInterface) - } - supportsInterface - }, - { - fn name( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC721MetadataCalls::name) - } - name - }, - { - fn getApproved( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721MetadataCalls::getApproved) - } - getApproved - }, - { - fn approve( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC721MetadataCalls::approve) - } - approve - }, - { - fn transferFrom( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721MetadataCalls::transferFrom) - } - transferFrom - }, - { - fn safeTransferFrom_0( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721MetadataCalls::safeTransferFrom_0) - } - safeTransferFrom_0 - }, - { - fn ownerOf( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC721MetadataCalls::ownerOf) - } - ownerOf - }, - { - fn balanceOf( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC721MetadataCalls::balanceOf) - } - balanceOf - }, - { - fn symbol( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC721MetadataCalls::symbol) - } - symbol - }, - { - fn setApprovalForAll( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721MetadataCalls::setApprovalForAll) - } - setApprovalForAll - }, - { - fn safeTransferFrom_1( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721MetadataCalls::safeTransferFrom_1) - } - safeTransferFrom_1 - }, - { - fn tokenURI( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(IERC721MetadataCalls::tokenURI) - } - tokenURI - }, - { - fn isApprovedForAll( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721MetadataCalls::isApprovedForAll) - } - isApprovedForAll - }, - ]; - let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err(alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - )); - }; - (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) - } - #[inline] - fn abi_encoded_size(&self) -> usize { - match self { - Self::approve(inner) => { - ::abi_encoded_size(inner) - } - Self::balanceOf(inner) => { - ::abi_encoded_size(inner) - } - Self::getApproved(inner) => { - ::abi_encoded_size(inner) - } - Self::isApprovedForAll(inner) => { - ::abi_encoded_size(inner) - } - Self::name(inner) => { - ::abi_encoded_size(inner) - } - Self::ownerOf(inner) => { - ::abi_encoded_size(inner) - } - Self::safeTransferFrom_0(inner) => { - ::abi_encoded_size(inner) - } - Self::safeTransferFrom_1(inner) => { - ::abi_encoded_size(inner) - } - Self::setApprovalForAll(inner) => { - ::abi_encoded_size(inner) - } - Self::supportsInterface(inner) => { - ::abi_encoded_size(inner) - } - Self::symbol(inner) => { - ::abi_encoded_size(inner) - } - Self::tokenURI(inner) => { - ::abi_encoded_size(inner) - } - Self::transferFrom(inner) => { - ::abi_encoded_size(inner) - } - } - } - #[inline] - fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { - match self { - Self::approve(inner) => { - ::abi_encode_raw(inner, out) - } - Self::balanceOf(inner) => { - ::abi_encode_raw(inner, out) - } - Self::getApproved(inner) => { - ::abi_encode_raw(inner, out) - } - Self::isApprovedForAll(inner) => { - ::abi_encode_raw(inner, out) - } - Self::name(inner) => { - ::abi_encode_raw(inner, out) - } - Self::ownerOf(inner) => { - ::abi_encode_raw(inner, out) - } - Self::safeTransferFrom_0(inner) => { - ::abi_encode_raw(inner, out) - } - Self::safeTransferFrom_1(inner) => { - ::abi_encode_raw(inner, out) - } - Self::setApprovalForAll(inner) => { - ::abi_encode_raw(inner, out) - } - Self::supportsInterface(inner) => { - ::abi_encode_raw(inner, out) - } - Self::symbol(inner) => { - ::abi_encode_raw(inner, out) - } - Self::tokenURI(inner) => { - ::abi_encode_raw(inner, out) - } - Self::transferFrom(inner) => { - ::abi_encode_raw(inner, out) - } - } - } - } - ///Container for all the [`IERC721Metadata`](self) events. - pub enum IERC721MetadataEvents { - Approval(Approval), - ApprovalForAll(ApprovalForAll), - Transfer(Transfer), - } - #[automatically_derived] - impl IERC721MetadataEvents { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 32usize]] = &[ - [ - 23u8, 48u8, 126u8, 171u8, 57u8, 171u8, 97u8, 7u8, 232u8, 137u8, 152u8, 69u8, 173u8, - 61u8, 89u8, 189u8, 150u8, 83u8, 242u8, 0u8, 242u8, 32u8, 146u8, 4u8, 137u8, 202u8, - 43u8, 89u8, 55u8, 105u8, 108u8, 49u8, - ], - [ - 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, - 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, 91u8, - 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, - ], - [ - 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, 104u8, - 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, 161u8, 22u8, - 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, - ], - ]; - } - #[automatically_derived] - impl alloy_sol_types::SolEventInterface for IERC721MetadataEvents { - const NAME: &'static str = "IERC721MetadataEvents"; - const COUNT: usize = 3usize; - fn decode_raw_log( - topics: &[alloy_sol_types::Word], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - match topics.first().copied() { - Some(::SIGNATURE_HASH) => { - ::decode_raw_log(topics, data, validate) - .map(Self::Approval) - } - Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, data, validate, - ) - .map(Self::ApprovalForAll) - } - Some(::SIGNATURE_HASH) => { - ::decode_raw_log(topics, data, validate) - .map(Self::Transfer) - } - _ => alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { - name: ::NAME, - log: alloy_sol_types::private::Box::new( - alloy_sol_types::private::LogData::new_unchecked( - topics.to_vec(), - data.to_vec().into(), - ), - ), - }), - } - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for IERC721MetadataEvents { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - match self { - Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), - Self::ApprovalForAll(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } - Self::Transfer(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), - } - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - match self { - Self::Approval(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::ApprovalForAll(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::Transfer(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - } - } - } - use alloy::contract as alloy_contract; - /**Creates a new wrapper around an on-chain [`IERC721Metadata`](self) contract instance. - - See the [wrapper's documentation](`IERC721MetadataInstance`) for more details.*/ - #[inline] - pub const fn new< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - address: alloy_sol_types::private::Address, - provider: P, - ) -> IERC721MetadataInstance { - IERC721MetadataInstance::::new(address, provider) - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub fn deploy< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> impl ::core::future::Future>> - { - IERC721MetadataInstance::::deploy(provider) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> alloy_contract::RawCallBuilder { - IERC721MetadataInstance::::deploy_builder(provider) - } - /**A [`IERC721Metadata`](self) instance. - - Contains type-safe methods for interacting with an on-chain instance of the - [`IERC721Metadata`](self) contract located at a given `address`, using a given - provider `P`. - - If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) - documentation on how to provide it), the `deploy` and `deploy_builder` methods can - be used to deploy a new instance of the contract. - - See the [module-level documentation](self) for all the available methods.*/ - #[derive(Clone)] - pub struct IERC721MetadataInstance { - address: alloy_sol_types::private::Address, - provider: P, - _network_transport: ::core::marker::PhantomData<(N, T)>, - } - #[automatically_derived] - impl ::core::fmt::Debug for IERC721MetadataInstance { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IERC721MetadataInstance") - .field(&self.address) - .finish() - } - } - /// Instantiation and getters/setters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721MetadataInstance - { - /**Creates a new wrapper around an on-chain [`IERC721Metadata`](self) contract instance. - - See the [wrapper's documentation](`IERC721MetadataInstance`) for more details.*/ - #[inline] - pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { - Self { - address, - provider, - _network_transport: ::core::marker::PhantomData, - } - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub async fn deploy( - provider: P, - ) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder(provider); - let contract_address = call_builder.deploy().await?; - Ok(Self::new(contract_address, call_builder.provider)) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { - alloy_contract::RawCallBuilder::new_raw_deploy( - provider, - ::core::clone::Clone::clone(&BYTECODE), - ) - } - /// Returns a reference to the address. - #[inline] - pub const fn address(&self) -> &alloy_sol_types::private::Address { - &self.address - } - /// Sets the address. - #[inline] - pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { - self.address = address; - } - /// Sets the address and returns `self`. - pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { - self.set_address(address); - self - } - /// Returns a reference to the provider. - #[inline] - pub const fn provider(&self) -> &P { - &self.provider - } - } - impl IERC721MetadataInstance { - /// Clones the provider and returns a new instance with the cloned provider. - #[inline] - pub fn with_cloned_provider(self) -> IERC721MetadataInstance { - IERC721MetadataInstance { - address: self.address, - provider: ::core::clone::Clone::clone(&self.provider), - _network_transport: ::core::marker::PhantomData, - } - } - } - /// Function calls. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721MetadataInstance - { - /// Creates a new call builder using this contract instance's provider and address. - /// - /// Note that the call can be any function call, not just those defined in this - /// contract. Prefer using the other methods for building type-safe contract calls. - pub fn call_builder( - &self, - call: &C, - ) -> alloy_contract::SolCallBuilder { - alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) - } - ///Creates a new call builder for the [`approve`] function. - pub fn approve( - &self, - _approved: alloy::sol_types::private::Address, - _tokenId: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&approveCall { - _approved, - _tokenId, - }) - } - ///Creates a new call builder for the [`balanceOf`] function. - pub fn balanceOf( - &self, - _owner: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&balanceOfCall { _owner }) - } - ///Creates a new call builder for the [`getApproved`] function. - pub fn getApproved( - &self, - _tokenId: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&getApprovedCall { _tokenId }) - } - ///Creates a new call builder for the [`isApprovedForAll`] function. - pub fn isApprovedForAll( - &self, - _owner: alloy::sol_types::private::Address, - _operator: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&isApprovedForAllCall { _owner, _operator }) - } - ///Creates a new call builder for the [`name`] function. - pub fn name(&self) -> alloy_contract::SolCallBuilder { - self.call_builder(&nameCall {}) - } - ///Creates a new call builder for the [`ownerOf`] function. - pub fn ownerOf( - &self, - _tokenId: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&ownerOfCall { _tokenId }) - } - ///Creates a new call builder for the [`safeTransferFrom_0`] function. - pub fn safeTransferFrom_0( - &self, - _from: alloy::sol_types::private::Address, - _to: alloy::sol_types::private::Address, - _tokenId: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&safeTransferFrom_0Call { - _from, - _to, - _tokenId, - }) - } - ///Creates a new call builder for the [`safeTransferFrom_1`] function. - pub fn safeTransferFrom_1( - &self, - _from: alloy::sol_types::private::Address, - _to: alloy::sol_types::private::Address, - _tokenId: alloy::sol_types::private::U256, - data: alloy::sol_types::private::Bytes, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&safeTransferFrom_1Call { - _from, - _to, - _tokenId, - data, - }) - } - ///Creates a new call builder for the [`setApprovalForAll`] function. - pub fn setApprovalForAll( - &self, - _operator: alloy::sol_types::private::Address, - _approved: bool, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&setApprovalForAllCall { - _operator, - _approved, - }) - } - ///Creates a new call builder for the [`supportsInterface`] function. - pub fn supportsInterface( - &self, - interfaceID: alloy::sol_types::private::FixedBytes<4>, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&supportsInterfaceCall { interfaceID }) - } - ///Creates a new call builder for the [`symbol`] function. - pub fn symbol(&self) -> alloy_contract::SolCallBuilder { - self.call_builder(&symbolCall {}) - } - ///Creates a new call builder for the [`tokenURI`] function. - pub fn tokenURI( - &self, - _tokenId: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&tokenURICall { _tokenId }) - } - ///Creates a new call builder for the [`transferFrom`] function. - pub fn transferFrom( - &self, - _from: alloy::sol_types::private::Address, - _to: alloy::sol_types::private::Address, - _tokenId: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&transferFromCall { - _from, - _to, - _tokenId, - }) - } - } - /// Event filters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721MetadataInstance - { - /// Creates a new event filter using this contract instance's provider and address. - /// - /// Note that the type can be any event, not just those defined in this contract. - /// Prefer using the other methods for building type-safe event filters. - pub fn event_filter( - &self, - ) -> alloy_contract::Event { - alloy_contract::Event::new_sol(&self.provider, &self.address) - } - ///Creates a new event filter for the [`Approval`] event. - pub fn Approval_filter(&self) -> alloy_contract::Event { - self.event_filter::() - } - ///Creates a new event filter for the [`ApprovalForAll`] event. - pub fn ApprovalForAll_filter(&self) -> alloy_contract::Event { - self.event_filter::() - } - ///Creates a new event filter for the [`Transfer`] event. - pub fn Transfer_filter(&self) -> alloy_contract::Event { - self.event_filter::() - } - } -} diff --git a/crates/bindings/src/ierc721tokenreceiver.rs b/crates/bindings/src/ierc721tokenreceiver.rs deleted file mode 100644 index 784e4f2..0000000 --- a/crates/bindings/src/ierc721tokenreceiver.rs +++ /dev/null @@ -1,500 +0,0 @@ -/** - -Generated by the following Solidity interface... -```solidity -interface IERC721TokenReceiver { - function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes memory _data) external returns (bytes4); -} -``` - -...which was generated by the following JSON ABI: -```json -[ - { - "type": "function", - "name": "onERC721Received", - "inputs": [ - { - "name": "_operator", - "type": "address", - "internalType": "address" - }, - { - "name": "_from", - "type": "address", - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "nonpayable" - } -] -```*/ -#[allow(non_camel_case_types, non_snake_case, clippy::style)] -pub mod IERC721TokenReceiver { - use super::*; - use alloy::sol_types as alloy_sol_types; - /// The creation / init bytecode of the contract. - /// - /// ```text - ///0x - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"", - ); - /// The runtime bytecode of the contract, as deployed on the network. - /// - /// ```text - ///0x - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"", - ); - /**Function with signature `onERC721Received(address,address,uint256,bytes)` and selector `0x150b7a02`. - ```solidity - function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes memory _data) external returns (bytes4); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct onERC721ReceivedCall { - pub _operator: alloy::sol_types::private::Address, - pub _from: alloy::sol_types::private::Address, - pub _tokenId: alloy::sol_types::private::U256, - pub _data: alloy::sol_types::private::Bytes, - } - ///Container type for the return parameters of the [`onERC721Received(address,address,uint256,bytes)`](onERC721ReceivedCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct onERC721ReceivedReturn { - pub _0: alloy::sol_types::private::FixedBytes<4>, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - alloy::sol_types::sol_data::Bytes, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - alloy::sol_types::private::Bytes, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: onERC721ReceivedCall) -> Self { - (value._operator, value._from, value._tokenId, value._data) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for onERC721ReceivedCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _operator: tuple.0, - _from: tuple.1, - _tokenId: tuple.2, - _data: tuple.3, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: onERC721ReceivedReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for onERC721ReceivedReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for onERC721ReceivedCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - alloy::sol_types::sol_data::Bytes, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = onERC721ReceivedReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "onERC721Received(address,address,uint256,bytes)"; - const SELECTOR: [u8; 4] = [21u8, 11u8, 122u8, 2u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._operator, - ), - ::tokenize( - &self._from, - ), - as alloy_sol_types::SolType>::tokenize( - &self._tokenId, - ), - ::tokenize( - &self._data, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - ///Container for all the [`IERC721TokenReceiver`](self) function calls. - pub enum IERC721TokenReceiverCalls { - onERC721Received(onERC721ReceivedCall), - } - #[automatically_derived] - impl IERC721TokenReceiverCalls { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = &[[21u8, 11u8, 122u8, 2u8]]; - } - #[automatically_derived] - impl alloy_sol_types::SolInterface for IERC721TokenReceiverCalls { - const NAME: &'static str = "IERC721TokenReceiverCalls"; - const MIN_DATA_LENGTH: usize = 160usize; - const COUNT: usize = 1usize; - #[inline] - fn selector(&self) -> [u8; 4] { - match self { - Self::onERC721Received(_) => { - ::SELECTOR - } - } - } - #[inline] - fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { - Self::SELECTORS.get(i).copied() - } - #[inline] - fn valid_selector(selector: [u8; 4]) -> bool { - Self::SELECTORS.binary_search(&selector).is_ok() - } - #[inline] - #[allow(unsafe_code, non_snake_case)] - fn abi_decode_raw( - selector: [u8; 4], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn( - &[u8], - bool, - ) - -> alloy_sol_types::Result] = &[{ - fn onERC721Received( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IERC721TokenReceiverCalls::onERC721Received) - } - onERC721Received - }]; - let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err(alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - )); - }; - (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) - } - #[inline] - fn abi_encoded_size(&self) -> usize { - match self { - Self::onERC721Received(inner) => { - ::abi_encoded_size(inner) - } - } - } - #[inline] - fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { - match self { - Self::onERC721Received(inner) => { - ::abi_encode_raw(inner, out) - } - } - } - } - use alloy::contract as alloy_contract; - /**Creates a new wrapper around an on-chain [`IERC721TokenReceiver`](self) contract instance. - - See the [wrapper's documentation](`IERC721TokenReceiverInstance`) for more details.*/ - #[inline] - pub const fn new< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - address: alloy_sol_types::private::Address, - provider: P, - ) -> IERC721TokenReceiverInstance { - IERC721TokenReceiverInstance::::new(address, provider) - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub fn deploy< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { - IERC721TokenReceiverInstance::::deploy(provider) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> alloy_contract::RawCallBuilder { - IERC721TokenReceiverInstance::::deploy_builder(provider) - } - /**A [`IERC721TokenReceiver`](self) instance. - - Contains type-safe methods for interacting with an on-chain instance of the - [`IERC721TokenReceiver`](self) contract located at a given `address`, using a given - provider `P`. - - If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) - documentation on how to provide it), the `deploy` and `deploy_builder` methods can - be used to deploy a new instance of the contract. - - See the [module-level documentation](self) for all the available methods.*/ - #[derive(Clone)] - pub struct IERC721TokenReceiverInstance { - address: alloy_sol_types::private::Address, - provider: P, - _network_transport: ::core::marker::PhantomData<(N, T)>, - } - #[automatically_derived] - impl ::core::fmt::Debug for IERC721TokenReceiverInstance { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IERC721TokenReceiverInstance") - .field(&self.address) - .finish() - } - } - /// Instantiation and getters/setters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721TokenReceiverInstance - { - /**Creates a new wrapper around an on-chain [`IERC721TokenReceiver`](self) contract instance. - - See the [wrapper's documentation](`IERC721TokenReceiverInstance`) for more details.*/ - #[inline] - pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { - Self { - address, - provider, - _network_transport: ::core::marker::PhantomData, - } - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub async fn deploy( - provider: P, - ) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder(provider); - let contract_address = call_builder.deploy().await?; - Ok(Self::new(contract_address, call_builder.provider)) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { - alloy_contract::RawCallBuilder::new_raw_deploy( - provider, - ::core::clone::Clone::clone(&BYTECODE), - ) - } - /// Returns a reference to the address. - #[inline] - pub const fn address(&self) -> &alloy_sol_types::private::Address { - &self.address - } - /// Sets the address. - #[inline] - pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { - self.address = address; - } - /// Sets the address and returns `self`. - pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { - self.set_address(address); - self - } - /// Returns a reference to the provider. - #[inline] - pub const fn provider(&self) -> &P { - &self.provider - } - } - impl IERC721TokenReceiverInstance { - /// Clones the provider and returns a new instance with the cloned provider. - #[inline] - pub fn with_cloned_provider(self) -> IERC721TokenReceiverInstance { - IERC721TokenReceiverInstance { - address: self.address, - provider: ::core::clone::Clone::clone(&self.provider), - _network_transport: ::core::marker::PhantomData, - } - } - } - /// Function calls. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721TokenReceiverInstance - { - /// Creates a new call builder using this contract instance's provider and address. - /// - /// Note that the call can be any function call, not just those defined in this - /// contract. Prefer using the other methods for building type-safe contract calls. - pub fn call_builder( - &self, - call: &C, - ) -> alloy_contract::SolCallBuilder { - alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) - } - ///Creates a new call builder for the [`onERC721Received`] function. - pub fn onERC721Received( - &self, - _operator: alloy::sol_types::private::Address, - _from: alloy::sol_types::private::Address, - _tokenId: alloy::sol_types::private::U256, - _data: alloy::sol_types::private::Bytes, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&onERC721ReceivedCall { - _operator, - _from, - _tokenId, - _data, - }) - } - } - /// Event filters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721TokenReceiverInstance - { - /// Creates a new event filter using this contract instance's provider and address. - /// - /// Note that the type can be any event, not just those defined in this contract. - /// Prefer using the other methods for building type-safe event filters. - pub fn event_filter( - &self, - ) -> alloy_contract::Event { - alloy_contract::Event::new_sol(&self.provider, &self.address) - } - } -} diff --git a/crates/bindings/src/isckeystore.rs b/crates/bindings/src/isckeystore.rs deleted file mode 100644 index 2a5bde8..0000000 --- a/crates/bindings/src/isckeystore.rs +++ /dev/null @@ -1,743 +0,0 @@ -/** - -Generated by the following Solidity interface... -```solidity -interface IScKeystore { - function addUser(address user) external; - function removeUser(address user) external; - function userExists(address user) external view returns (bool); -} -``` - -...which was generated by the following JSON ABI: -```json -[ - { - "type": "function", - "name": "addUser", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "removeUser", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "userExists", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - } -] -```*/ -#[allow(non_camel_case_types, non_snake_case, clippy::style)] -pub mod IScKeystore { - use super::*; - use alloy::sol_types as alloy_sol_types; - /// The creation / init bytecode of the contract. - /// - /// ```text - ///0x - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"", - ); - /// The runtime bytecode of the contract, as deployed on the network. - /// - /// ```text - ///0x - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"", - ); - /**Function with signature `addUser(address)` and selector `0x421b2d8b`. - ```solidity - function addUser(address user) external; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct addUserCall { - pub user: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`addUser(address)`](addUserCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct addUserReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: addUserCall) -> Self { - (value.user,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for addUserCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { user: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: addUserReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for addUserReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for addUserCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = addUserReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "addUser(address)"; - const SELECTOR: [u8; 4] = [66u8, 27u8, 45u8, 139u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.user, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `removeUser(address)` and selector `0x98575188`. - ```solidity - function removeUser(address user) external; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct removeUserCall { - pub user: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`removeUser(address)`](removeUserCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct removeUserReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: removeUserCall) -> Self { - (value.user,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for removeUserCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { user: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: removeUserReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for removeUserReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for removeUserCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = removeUserReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "removeUser(address)"; - const SELECTOR: [u8; 4] = [152u8, 87u8, 81u8, 136u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.user, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `userExists(address)` and selector `0x0e666e49`. - ```solidity - function userExists(address user) external view returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct userExistsCall { - pub user: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`userExists(address)`](userExistsCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct userExistsReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: userExistsCall) -> Self { - (value.user,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for userExistsCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { user: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: userExistsReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for userExistsReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for userExistsCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = userExistsReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "userExists(address)"; - const SELECTOR: [u8; 4] = [14u8, 102u8, 110u8, 73u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.user, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - ///Container for all the [`IScKeystore`](self) function calls. - pub enum IScKeystoreCalls { - addUser(addUserCall), - removeUser(removeUserCall), - userExists(userExistsCall), - } - #[automatically_derived] - impl IScKeystoreCalls { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = &[ - [14u8, 102u8, 110u8, 73u8], - [66u8, 27u8, 45u8, 139u8], - [152u8, 87u8, 81u8, 136u8], - ]; - } - #[automatically_derived] - impl alloy_sol_types::SolInterface for IScKeystoreCalls { - const NAME: &'static str = "IScKeystoreCalls"; - const MIN_DATA_LENGTH: usize = 32usize; - const COUNT: usize = 3usize; - #[inline] - fn selector(&self) -> [u8; 4] { - match self { - Self::addUser(_) => ::SELECTOR, - Self::removeUser(_) => ::SELECTOR, - Self::userExists(_) => ::SELECTOR, - } - } - #[inline] - fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { - Self::SELECTORS.get(i).copied() - } - #[inline] - fn valid_selector(selector: [u8; 4]) -> bool { - Self::SELECTORS.binary_search(&selector).is_ok() - } - #[inline] - #[allow(unsafe_code, non_snake_case)] - fn abi_decode_raw( - selector: [u8; 4], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = - &[ - { - fn userExists( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IScKeystoreCalls::userExists) - } - userExists - }, - { - fn addUser( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IScKeystoreCalls::addUser) - } - addUser - }, - { - fn removeUser( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(IScKeystoreCalls::removeUser) - } - removeUser - }, - ]; - let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err(alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - )); - }; - (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) - } - #[inline] - fn abi_encoded_size(&self) -> usize { - match self { - Self::addUser(inner) => { - ::abi_encoded_size(inner) - } - Self::removeUser(inner) => { - ::abi_encoded_size(inner) - } - Self::userExists(inner) => { - ::abi_encoded_size(inner) - } - } - } - #[inline] - fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { - match self { - Self::addUser(inner) => { - ::abi_encode_raw(inner, out) - } - Self::removeUser(inner) => { - ::abi_encode_raw(inner, out) - } - Self::userExists(inner) => { - ::abi_encode_raw(inner, out) - } - } - } - } - use alloy::contract as alloy_contract; - /**Creates a new wrapper around an on-chain [`IScKeystore`](self) contract instance. - - See the [wrapper's documentation](`IScKeystoreInstance`) for more details.*/ - #[inline] - pub const fn new< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - address: alloy_sol_types::private::Address, - provider: P, - ) -> IScKeystoreInstance { - IScKeystoreInstance::::new(address, provider) - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub fn deploy< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> impl ::core::future::Future>> - { - IScKeystoreInstance::::deploy(provider) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> alloy_contract::RawCallBuilder { - IScKeystoreInstance::::deploy_builder(provider) - } - /**A [`IScKeystore`](self) instance. - - Contains type-safe methods for interacting with an on-chain instance of the - [`IScKeystore`](self) contract located at a given `address`, using a given - provider `P`. - - If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) - documentation on how to provide it), the `deploy` and `deploy_builder` methods can - be used to deploy a new instance of the contract. - - See the [module-level documentation](self) for all the available methods.*/ - #[derive(Clone)] - pub struct IScKeystoreInstance { - address: alloy_sol_types::private::Address, - provider: P, - _network_transport: ::core::marker::PhantomData<(N, T)>, - } - #[automatically_derived] - impl ::core::fmt::Debug for IScKeystoreInstance { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IScKeystoreInstance") - .field(&self.address) - .finish() - } - } - /// Instantiation and getters/setters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IScKeystoreInstance - { - /**Creates a new wrapper around an on-chain [`IScKeystore`](self) contract instance. - - See the [wrapper's documentation](`IScKeystoreInstance`) for more details.*/ - #[inline] - pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { - Self { - address, - provider, - _network_transport: ::core::marker::PhantomData, - } - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub async fn deploy(provider: P) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder(provider); - let contract_address = call_builder.deploy().await?; - Ok(Self::new(contract_address, call_builder.provider)) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { - alloy_contract::RawCallBuilder::new_raw_deploy( - provider, - ::core::clone::Clone::clone(&BYTECODE), - ) - } - /// Returns a reference to the address. - #[inline] - pub const fn address(&self) -> &alloy_sol_types::private::Address { - &self.address - } - /// Sets the address. - #[inline] - pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { - self.address = address; - } - /// Sets the address and returns `self`. - pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { - self.set_address(address); - self - } - /// Returns a reference to the provider. - #[inline] - pub const fn provider(&self) -> &P { - &self.provider - } - } - impl IScKeystoreInstance { - /// Clones the provider and returns a new instance with the cloned provider. - #[inline] - pub fn with_cloned_provider(self) -> IScKeystoreInstance { - IScKeystoreInstance { - address: self.address, - provider: ::core::clone::Clone::clone(&self.provider), - _network_transport: ::core::marker::PhantomData, - } - } - } - /// Function calls. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IScKeystoreInstance - { - /// Creates a new call builder using this contract instance's provider and address. - /// - /// Note that the call can be any function call, not just those defined in this - /// contract. Prefer using the other methods for building type-safe contract calls. - pub fn call_builder( - &self, - call: &C, - ) -> alloy_contract::SolCallBuilder { - alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) - } - ///Creates a new call builder for the [`addUser`] function. - pub fn addUser( - &self, - user: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&addUserCall { user }) - } - ///Creates a new call builder for the [`removeUser`] function. - pub fn removeUser( - &self, - user: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&removeUserCall { user }) - } - ///Creates a new call builder for the [`userExists`] function. - pub fn userExists( - &self, - user: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&userExistsCall { user }) - } - } - /// Event filters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IScKeystoreInstance - { - /// Creates a new event filter using this contract instance's provider and address. - /// - /// Note that the type can be any event, not just those defined in this contract. - /// Prefer using the other methods for building type-safe event filters. - pub fn event_filter( - &self, - ) -> alloy_contract::Event { - alloy_contract::Event::new_sol(&self.provider, &self.address) - } - } -} diff --git a/crates/bindings/src/lib.rs b/crates/bindings/src/lib.rs deleted file mode 100644 index dec5b05..0000000 --- a/crates/bindings/src/lib.rs +++ /dev/null @@ -1,19 +0,0 @@ -#![allow(unused_imports, clippy::all, rustdoc::all)] -//! This module contains the sol! generated bindings for solidity contracts. -//! This is autogenerated code. -//! Do not manually edit these files. -//! These files may be overwritten by the codegen system at any time. -pub mod context; -pub mod deploy; -pub mod deploymentconfig; -pub mod ierc165; -pub mod ierc20; -pub mod ierc721; -pub mod ierc721enumerable; -pub mod ierc721metadata; -pub mod ierc721tokenreceiver; -pub mod isckeystore; -pub mod mockerc20; -pub mod mockerc721; -pub mod ownable; -pub mod sckeystore; diff --git a/crates/bindings/src/mockerc20.rs b/crates/bindings/src/mockerc20.rs deleted file mode 100644 index ac1b1ca..0000000 --- a/crates/bindings/src/mockerc20.rs +++ /dev/null @@ -1,2822 +0,0 @@ -/** - -Generated by the following Solidity interface... -```solidity -interface MockERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - event Transfer(address indexed from, address indexed to, uint256 value); - - function DOMAIN_SEPARATOR() external view returns (bytes32); - function allowance(address owner, address spender) external view returns (uint256); - function approve(address spender, uint256 amount) external returns (bool); - function balanceOf(address owner) external view returns (uint256); - function decimals() external view returns (uint8); - function initialize(string memory name_, string memory symbol_, uint8 decimals_) external; - function name() external view returns (string memory); - function nonces(address) external view returns (uint256); - function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; - function symbol() external view returns (string memory); - function totalSupply() external view returns (uint256); - function transfer(address to, uint256 amount) external returns (bool); - function transferFrom(address from, address to, uint256 amount) external returns (bool); -} -``` - -...which was generated by the following JSON ABI: -```json -[ - { - "type": "function", - "name": "DOMAIN_SEPARATOR", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "allowance", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "spender", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "approve", - "inputs": [ - { - "name": "spender", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "balanceOf", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "decimals", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint8", - "internalType": "uint8" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "name_", - "type": "string", - "internalType": "string" - }, - { - "name": "symbol_", - "type": "string", - "internalType": "string" - }, - { - "name": "decimals_", - "type": "uint8", - "internalType": "uint8" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "nonces", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "permit", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "spender", - "type": "address", - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "symbol", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "totalSupply", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "transfer", - "inputs": [ - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transferFrom", - "inputs": [ - { - "name": "from", - "type": "address", - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "Approval", - "inputs": [ - { - "name": "owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "spender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Transfer", - "inputs": [ - { - "name": "from", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - } -] -```*/ -#[allow(non_camel_case_types, non_snake_case, clippy::style)] -pub mod MockERC20 { - use super::*; - use alloy::sol_types as alloy_sol_types; - /// The creation / init bytecode of the contract. - /// - /// ```text - ///0x608060405234801561001057600080fd5b50611199806100206000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c80633644e5151161008c57806395d89b411161006657806395d89b41146101d2578063a9059cbb146101da578063d505accf146101ed578063dd62ed3e1461020057600080fd5b80633644e5151461017457806370a082311461017c5780637ecebe00146101b257600080fd5b806318160ddd116100bd57806318160ddd1461013a57806323b872dd1461014c578063313ce5671461015f57600080fd5b806306fdde03146100e4578063095ea7b3146101025780631624f6c614610125575b600080fd5b6100ec610246565b6040516100f99190610ba7565b60405180910390f35b610115610110366004610c3d565b6102d8565b60405190151581526020016100f9565b610138610133366004610d52565b610352565b005b6003545b6040519081526020016100f9565b61011561015a366004610dc6565b610451565b60025460405160ff90911681526020016100f9565b61013e6105c5565b61013e61018a366004610e02565b73ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090205490565b61013e6101c0366004610e02565b60086020526000908152604090205481565b6100ec6105eb565b6101156101e8366004610c3d565b6105fa565b6101386101fb366004610e1d565b6106ab565b61013e61020e366004610e87565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205490565b60606000805461025590610eba565b80601f016020809104026020016040519081016040528092919081815260200182805461028190610eba565b80156102ce5780601f106102a3576101008083540402835291602001916102ce565b820191906000526020600020905b8154815290600101906020018083116102b157829003601f168201915b5050505050905090565b33600081815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103409086815260200190565b60405180910390a35060015b92915050565b60095460ff16156103c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f414c52454144595f494e495449414c495a45440000000000000000000000000060448201526064015b60405180910390fd5b60006103d08482610f5e565b5060016103dd8382610f5e565b50600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff83161790556104136109f1565b60065561041e610a0a565b6007555050600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905550565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146104e5576104b38184610aad565b73ffffffffffffffffffffffffffffffffffffffff861660009081526005602090815260408083203384529091529020555b73ffffffffffffffffffffffffffffffffffffffff85166000908152600460205260409020546105159084610aad565b73ffffffffffffffffffffffffffffffffffffffff80871660009081526004602052604080822093909355908616815220546105519084610b2a565b73ffffffffffffffffffffffffffffffffffffffff80861660008181526004602052604090819020939093559151908716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906105b29087815260200190565b60405180910390a3506001949350505050565b60006006546105d26109f1565b146105e4576105df610a0a565b905090565b5060075490565b60606001805461025590610eba565b336000908152600460205260408120546106149083610aad565b336000908152600460205260408082209290925573ffffffffffffffffffffffffffffffffffffffff85168152205461064d9083610b2a565b73ffffffffffffffffffffffffffffffffffffffff84166000818152600460205260409081902092909255905133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103409086815260200190565b42841015610715576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f5045524d49545f444541444c494e455f4558504952454400000000000000000060448201526064016103bb565b600060016107216105c5565b73ffffffffffffffffffffffffffffffffffffffff8a16600090815260086020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928d928d928d9290919061077c836110a7565b9091555060408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161081d9291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015610899573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81161580159061091457508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b61097a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f494e56414c49445f5349474e455200000000000000000000000000000000000060448201526064016103bb565b73ffffffffffffffffffffffffffffffffffffffff81811660009081526005602090815260408083208b8516808552908352928190208a90555189815291928b16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35050505050505050565b6000610ba380610a0363ffffffff8216565b9250505090565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051610a3c91906110df565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6610a6d6109f1565b604080516020810195909552840192909252606083015260808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600081831015610b19576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45524332303a207375627472616374696f6e20756e646572666c6f770000000060448201526064016103bb565b610b238284611173565b9392505050565b600080610b378385611186565b905083811015610b23576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45524332303a206164646974696f6e206f766572666c6f77000000000000000060448201526064016103bb565b4690565b60006020808352835180602085015260005b81811015610bd557858101830151858201604001528201610bb9565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610c3857600080fd5b919050565b60008060408385031215610c5057600080fd5b610c5983610c14565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610ca757600080fd5b813567ffffffffffffffff80821115610cc257610cc2610c67565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610d0857610d08610c67565b81604052838152866020858801011115610d2157600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff81168114610c3857600080fd5b600080600060608486031215610d6757600080fd5b833567ffffffffffffffff80821115610d7f57600080fd5b610d8b87838801610c96565b94506020860135915080821115610da157600080fd5b50610dae86828701610c96565b925050610dbd60408501610d41565b90509250925092565b600080600060608486031215610ddb57600080fd5b610de484610c14565b9250610df260208501610c14565b9150604084013590509250925092565b600060208284031215610e1457600080fd5b610b2382610c14565b600080600080600080600060e0888a031215610e3857600080fd5b610e4188610c14565b9650610e4f60208901610c14565b95506040880135945060608801359350610e6b60808901610d41565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215610e9a57600080fd5b610ea383610c14565b9150610eb160208401610c14565b90509250929050565b600181811c90821680610ece57607f821691505b602082108103610f07577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f821115610f59576000816000526020600020601f850160051c81016020861015610f365750805b601f850160051c820191505b81811015610f5557828155600101610f42565b5050505b505050565b815167ffffffffffffffff811115610f7857610f78610c67565b610f8c81610f868454610eba565b84610f0d565b602080601f831160018114610fdf5760008415610fa95750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610f55565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561102c5788860151825594840194600190910190840161100d565b508582101561106857878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036110d8576110d8611078565b5060010190565b60008083546110ed81610eba565b60018281168015611105576001811461113857611167565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168752821515830287019450611167565b8760005260208060002060005b8581101561115e5781548a820152908401908201611145565b50505082870194505b50929695505050505050565b8181038181111561034c5761034c611078565b8082018082111561034c5761034c61107856 - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[Pa\x11\x99\x80a\0 `\09`\0\xF3\xFE`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0\xDFW`\x005`\xE0\x1C\x80c6D\xE5\x15\x11a\0\x8CW\x80c\x95\xD8\x9BA\x11a\0fW\x80c\x95\xD8\x9BA\x14a\x01\xD2W\x80c\xA9\x05\x9C\xBB\x14a\x01\xDAW\x80c\xD5\x05\xAC\xCF\x14a\x01\xEDW\x80c\xDDb\xED>\x14a\x02\0W`\0\x80\xFD[\x80c6D\xE5\x15\x14a\x01tW\x80cp\xA0\x821\x14a\x01|W\x80c~\xCE\xBE\0\x14a\x01\xB2W`\0\x80\xFD[\x80c\x18\x16\r\xDD\x11a\0\xBDW\x80c\x18\x16\r\xDD\x14a\x01:W\x80c#\xB8r\xDD\x14a\x01LW\x80c1<\xE5g\x14a\x01_W`\0\x80\xFD[\x80c\x06\xFD\xDE\x03\x14a\0\xE4W\x80c\t^\xA7\xB3\x14a\x01\x02W\x80c\x16$\xF6\xC6\x14a\x01%W[`\0\x80\xFD[a\0\xECa\x02FV[`@Qa\0\xF9\x91\x90a\x0B\xA7V[`@Q\x80\x91\x03\x90\xF3[a\x01\x15a\x01\x106`\x04a\x0C=V[a\x02\xD8V[`@Q\x90\x15\x15\x81R` \x01a\0\xF9V[a\x018a\x0136`\x04a\rRV[a\x03RV[\0[`\x03T[`@Q\x90\x81R` \x01a\0\xF9V[a\x01\x15a\x01Z6`\x04a\r\xC6V[a\x04QV[`\x02T`@Q`\xFF\x90\x91\x16\x81R` \x01a\0\xF9V[a\x01>a\x05\xC5V[a\x01>a\x01\x8A6`\x04a\x0E\x02V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0\x90\x81R`\x04` R`@\x90 T\x90V[a\x01>a\x01\xC06`\x04a\x0E\x02V[`\x08` R`\0\x90\x81R`@\x90 T\x81V[a\0\xECa\x05\xEBV[a\x01\x15a\x01\xE86`\x04a\x0C=V[a\x05\xFAV[a\x018a\x01\xFB6`\x04a\x0E\x1DV[a\x06\xABV[a\x01>a\x02\x0E6`\x04a\x0E\x87V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x82\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x93\x90\x94\x16\x82R\x91\x90\x91R T\x90V[```\0\x80Ta\x02U\x90a\x0E\xBAV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x02\x81\x90a\x0E\xBAV[\x80\x15a\x02\xCEW\x80`\x1F\x10a\x02\xA3Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x02\xCEV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x02\xB1W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[3`\0\x81\x81R`\x05` \x90\x81R`@\x80\x83 s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x87\x16\x80\x85R\x92R\x80\x83 \x85\x90UQ\x91\x92\x90\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x90a\x03@\x90\x86\x81R` \x01\x90V[`@Q\x80\x91\x03\x90\xA3P`\x01[\x92\x91PPV[`\tT`\xFF\x16\x15a\x03\xC4W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x13`$\x82\x01R\x7FALREADY_INITIALIZED\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0a\x03\xD0\x84\x82a\x0F^V[P`\x01a\x03\xDD\x83\x82a\x0F^V[P`\x02\x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16`\xFF\x83\x16\x17\x90Ua\x04\x13a\t\xF1V[`\x06Ua\x04\x1Ea\n\nV[`\x07UPP`\t\x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16`\x01\x17\x90UPV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x81 T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x14a\x04\xE5Wa\x04\xB3\x81\x84a\n\xADV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x86\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x90 U[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x16`\0\x90\x81R`\x04` R`@\x90 Ta\x05\x15\x90\x84a\n\xADV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x87\x16`\0\x90\x81R`\x04` R`@\x80\x82 \x93\x90\x93U\x90\x86\x16\x81R Ta\x05Q\x90\x84a\x0B*V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x86\x16`\0\x81\x81R`\x04` R`@\x90\x81\x90 \x93\x90\x93U\x91Q\x90\x87\x16\x90\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x90a\x05\xB2\x90\x87\x81R` \x01\x90V[`@Q\x80\x91\x03\x90\xA3P`\x01\x94\x93PPPPV[`\0`\x06Ta\x05\xD2a\t\xF1V[\x14a\x05\xE4Wa\x05\xDFa\n\nV[\x90P\x90V[P`\x07T\x90V[```\x01\x80Ta\x02U\x90a\x0E\xBAV[3`\0\x90\x81R`\x04` R`@\x81 Ta\x06\x14\x90\x83a\n\xADV[3`\0\x90\x81R`\x04` R`@\x80\x82 \x92\x90\x92Us\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x16\x81R Ta\x06M\x90\x83a\x0B*V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x16`\0\x81\x81R`\x04` R`@\x90\x81\x90 \x92\x90\x92U\x90Q3\x90\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x90a\x03@\x90\x86\x81R` \x01\x90V[B\x84\x10\x15a\x07\x15W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x17`$\x82\x01R\x7FPERMIT_DEADLINE_EXPIRED\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x03\xBBV[`\0`\x01a\x07!a\x05\xC5V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x8A\x16`\0\x90\x81R`\x08` R`@\x81 \x80T\x7Fnq\xED\xAE\x12\xB1\xB9\x7FM\x1F`7\x0F\xEF\x10\x10_\xA2\xFA\xAE\x01&\x11J\x16\x9Cd\x84]a&\xC9\x92\x8D\x92\x8D\x92\x8D\x92\x90\x91\x90a\x07|\x83a\x10\xA7V[\x90\x91UP`@\x80Q` \x81\x01\x96\x90\x96Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x94\x85\x16\x90\x86\x01R\x92\x90\x91\x16``\x84\x01R`\x80\x83\x01R`\xA0\x82\x01R`\xC0\x81\x01\x88\x90R`\xE0\x01`@Q` \x81\x83\x03\x03\x81R\x90`@R\x80Q\x90` \x01 `@Q` \x01a\x08\x1D\x92\x91\x90\x7F\x19\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x02\x81\x01\x92\x90\x92R`\"\x82\x01R`B\x01\x90V[`@\x80Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x84\x03\x01\x81R\x82\x82R\x80Q` \x91\x82\x01 `\0\x84R\x90\x83\x01\x80\x83RR`\xFF\x87\x16\x90\x82\x01R``\x81\x01\x85\x90R`\x80\x81\x01\x84\x90R`\xA0\x01` `@Q` \x81\x03\x90\x80\x84\x03\x90\x85Z\xFA\x15\x80\x15a\x08\x99W=`\0\x80>=`\0\xFD[PP`@Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x01Q\x91PPs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x15\x80\x15\x90a\t\x14WP\x87s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x14[a\tzW`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x0E`$\x82\x01R\x7FINVALID_SIGNER\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x03\xBBV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x81\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x8B\x85\x16\x80\x85R\x90\x83R\x92\x81\x90 \x8A\x90UQ\x89\x81R\x91\x92\x8B\x16\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\x01`@Q\x80\x91\x03\x90\xA3PPPPPPPPV[`\0a\x0B\xA3\x80a\n\x03c\xFF\xFF\xFF\xFF\x82\x16V[\x92PPP\x90V[`\0\x7F\x8Bs\xC3\xC6\x9B\xB8\xFE=Q.\xCCL\xF7Y\xCCy#\x9F{\x17\x9B\x0F\xFA\xCA\xA9\xA7]R+9@\x0F`\0`@Qa\n<\x91\x90a\x10\xDFV[`@Q\x80\x91\x03\x90 \x7F\xC8\x9E\xFD\xAAT\xC0\xF2\x0Cz\xDFa(\x82\xDF\tP\xF5\xA9Qc~\x03\x07\xCD\xCBLg/)\x8B\x8B\xC6a\nma\t\xF1V[`@\x80Q` \x81\x01\x95\x90\x95R\x84\x01\x92\x90\x92R``\x83\x01R`\x80\x82\x01R0`\xA0\x82\x01R`\xC0\x01`@Q` \x81\x83\x03\x03\x81R\x90`@R\x80Q\x90` \x01 \x90P\x90V[`\0\x81\x83\x10\x15a\x0B\x19W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x1C`$\x82\x01R\x7FERC20: subtraction underflow\0\0\0\0`D\x82\x01R`d\x01a\x03\xBBV[a\x0B#\x82\x84a\x11sV[\x93\x92PPPV[`\0\x80a\x0B7\x83\x85a\x11\x86V[\x90P\x83\x81\x10\x15a\x0B#W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x18`$\x82\x01R\x7FERC20: addition overflow\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x03\xBBV[F\x90V[`\0` \x80\x83R\x83Q\x80` \x85\x01R`\0[\x81\x81\x10\x15a\x0B\xD5W\x85\x81\x01\x83\x01Q\x85\x82\x01`@\x01R\x82\x01a\x0B\xB9V[P`\0`@\x82\x86\x01\x01R`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F\x83\x01\x16\x85\x01\x01\x92PPP\x92\x91PPV[\x805s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x0C8W`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0CPW`\0\x80\xFD[a\x0CY\x83a\x0C\x14V[\x94` \x93\x90\x93\x015\x93PPPV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[`\0\x82`\x1F\x83\x01\x12a\x0C\xA7W`\0\x80\xFD[\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x0C\xC2Wa\x0C\xC2a\x0CgV[`@Q`\x1F\x83\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\r\x08Wa\r\x08a\x0CgV[\x81`@R\x83\x81R\x86` \x85\x88\x01\x01\x11\x15a\r!W`\0\x80\xFD[\x83` \x87\x01` \x83\x017`\0` \x85\x83\x01\x01R\x80\x94PPPPP\x92\x91PPV[\x805`\xFF\x81\x16\x81\x14a\x0C8W`\0\x80\xFD[`\0\x80`\0``\x84\x86\x03\x12\x15a\rgW`\0\x80\xFD[\x835g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\r\x7FW`\0\x80\xFD[a\r\x8B\x87\x83\x88\x01a\x0C\x96V[\x94P` \x86\x015\x91P\x80\x82\x11\x15a\r\xA1W`\0\x80\xFD[Pa\r\xAE\x86\x82\x87\x01a\x0C\x96V[\x92PPa\r\xBD`@\x85\x01a\rAV[\x90P\x92P\x92P\x92V[`\0\x80`\0``\x84\x86\x03\x12\x15a\r\xDBW`\0\x80\xFD[a\r\xE4\x84a\x0C\x14V[\x92Pa\r\xF2` \x85\x01a\x0C\x14V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[`\0` \x82\x84\x03\x12\x15a\x0E\x14W`\0\x80\xFD[a\x0B#\x82a\x0C\x14V[`\0\x80`\0\x80`\0\x80`\0`\xE0\x88\x8A\x03\x12\x15a\x0E8W`\0\x80\xFD[a\x0EA\x88a\x0C\x14V[\x96Pa\x0EO` \x89\x01a\x0C\x14V[\x95P`@\x88\x015\x94P``\x88\x015\x93Pa\x0Ek`\x80\x89\x01a\rAV[\x92P`\xA0\x88\x015\x91P`\xC0\x88\x015\x90P\x92\x95\x98\x91\x94\x97P\x92\x95PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0E\x9AW`\0\x80\xFD[a\x0E\xA3\x83a\x0C\x14V[\x91Pa\x0E\xB1` \x84\x01a\x0C\x14V[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x0E\xCEW`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x0F\x07W\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[`\x1F\x82\x11\x15a\x0FYW`\0\x81`\0R` `\0 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15a\x0F6WP\x80[`\x1F\x85\x01`\x05\x1C\x82\x01\x91P[\x81\x81\x10\x15a\x0FUW\x82\x81U`\x01\x01a\x0FBV[PPP[PPPV[\x81Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0FxWa\x0Fxa\x0CgV[a\x0F\x8C\x81a\x0F\x86\x84Ta\x0E\xBAV[\x84a\x0F\rV[` \x80`\x1F\x83\x11`\x01\x81\x14a\x0F\xDFW`\0\x84\x15a\x0F\xA9WP\x85\x83\x01Q[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x03\x86\x90\x1B\x1C\x19\x16`\x01\x85\x90\x1B\x17\x85Ua\x0FUV[`\0\x85\x81R` \x81 \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x86\x16\x91[\x82\x81\x10\x15a\x10,W\x88\x86\x01Q\x82U\x94\x84\x01\x94`\x01\x90\x91\x01\x90\x84\x01a\x10\rV[P\x85\x82\x10\x15a\x10hW\x87\x85\x01Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x03\x88\x90\x1B`\xF8\x16\x1C\x19\x16\x81U[PPPPP`\x01\x90\x81\x1B\x01\x90UPV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\x11`\x04R`$`\0\xFD[`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x03a\x10\xD8Wa\x10\xD8a\x10xV[P`\x01\x01\x90V[`\0\x80\x83Ta\x10\xED\x81a\x0E\xBAV[`\x01\x82\x81\x16\x80\x15a\x11\x05W`\x01\x81\x14a\x118Wa\x11gV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x84\x16\x87R\x82\x15\x15\x83\x02\x87\x01\x94Pa\x11gV[\x87`\0R` \x80`\0 `\0[\x85\x81\x10\x15a\x11^W\x81T\x8A\x82\x01R\x90\x84\x01\x90\x82\x01a\x11EV[PPP\x82\x87\x01\x94P[P\x92\x96\x95PPPPPPV[\x81\x81\x03\x81\x81\x11\x15a\x03LWa\x03La\x10xV[\x80\x82\x01\x80\x82\x11\x15a\x03LWa\x03La\x10xV", - ); - /// The runtime bytecode of the contract, as deployed on the network. - /// - /// ```text - ///0x608060405234801561001057600080fd5b50600436106100df5760003560e01c80633644e5151161008c57806395d89b411161006657806395d89b41146101d2578063a9059cbb146101da578063d505accf146101ed578063dd62ed3e1461020057600080fd5b80633644e5151461017457806370a082311461017c5780637ecebe00146101b257600080fd5b806318160ddd116100bd57806318160ddd1461013a57806323b872dd1461014c578063313ce5671461015f57600080fd5b806306fdde03146100e4578063095ea7b3146101025780631624f6c614610125575b600080fd5b6100ec610246565b6040516100f99190610ba7565b60405180910390f35b610115610110366004610c3d565b6102d8565b60405190151581526020016100f9565b610138610133366004610d52565b610352565b005b6003545b6040519081526020016100f9565b61011561015a366004610dc6565b610451565b60025460405160ff90911681526020016100f9565b61013e6105c5565b61013e61018a366004610e02565b73ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090205490565b61013e6101c0366004610e02565b60086020526000908152604090205481565b6100ec6105eb565b6101156101e8366004610c3d565b6105fa565b6101386101fb366004610e1d565b6106ab565b61013e61020e366004610e87565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205490565b60606000805461025590610eba565b80601f016020809104026020016040519081016040528092919081815260200182805461028190610eba565b80156102ce5780601f106102a3576101008083540402835291602001916102ce565b820191906000526020600020905b8154815290600101906020018083116102b157829003601f168201915b5050505050905090565b33600081815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103409086815260200190565b60405180910390a35060015b92915050565b60095460ff16156103c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f414c52454144595f494e495449414c495a45440000000000000000000000000060448201526064015b60405180910390fd5b60006103d08482610f5e565b5060016103dd8382610f5e565b50600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff83161790556104136109f1565b60065561041e610a0a565b6007555050600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905550565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146104e5576104b38184610aad565b73ffffffffffffffffffffffffffffffffffffffff861660009081526005602090815260408083203384529091529020555b73ffffffffffffffffffffffffffffffffffffffff85166000908152600460205260409020546105159084610aad565b73ffffffffffffffffffffffffffffffffffffffff80871660009081526004602052604080822093909355908616815220546105519084610b2a565b73ffffffffffffffffffffffffffffffffffffffff80861660008181526004602052604090819020939093559151908716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906105b29087815260200190565b60405180910390a3506001949350505050565b60006006546105d26109f1565b146105e4576105df610a0a565b905090565b5060075490565b60606001805461025590610eba565b336000908152600460205260408120546106149083610aad565b336000908152600460205260408082209290925573ffffffffffffffffffffffffffffffffffffffff85168152205461064d9083610b2a565b73ffffffffffffffffffffffffffffffffffffffff84166000818152600460205260409081902092909255905133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103409086815260200190565b42841015610715576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f5045524d49545f444541444c494e455f4558504952454400000000000000000060448201526064016103bb565b600060016107216105c5565b73ffffffffffffffffffffffffffffffffffffffff8a16600090815260086020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928d928d928d9290919061077c836110a7565b9091555060408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161081d9291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015610899573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81161580159061091457508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b61097a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f494e56414c49445f5349474e455200000000000000000000000000000000000060448201526064016103bb565b73ffffffffffffffffffffffffffffffffffffffff81811660009081526005602090815260408083208b8516808552908352928190208a90555189815291928b16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35050505050505050565b6000610ba380610a0363ffffffff8216565b9250505090565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051610a3c91906110df565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6610a6d6109f1565b604080516020810195909552840192909252606083015260808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600081831015610b19576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45524332303a207375627472616374696f6e20756e646572666c6f770000000060448201526064016103bb565b610b238284611173565b9392505050565b600080610b378385611186565b905083811015610b23576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45524332303a206164646974696f6e206f766572666c6f77000000000000000060448201526064016103bb565b4690565b60006020808352835180602085015260005b81811015610bd557858101830151858201604001528201610bb9565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610c3857600080fd5b919050565b60008060408385031215610c5057600080fd5b610c5983610c14565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610ca757600080fd5b813567ffffffffffffffff80821115610cc257610cc2610c67565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610d0857610d08610c67565b81604052838152866020858801011115610d2157600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff81168114610c3857600080fd5b600080600060608486031215610d6757600080fd5b833567ffffffffffffffff80821115610d7f57600080fd5b610d8b87838801610c96565b94506020860135915080821115610da157600080fd5b50610dae86828701610c96565b925050610dbd60408501610d41565b90509250925092565b600080600060608486031215610ddb57600080fd5b610de484610c14565b9250610df260208501610c14565b9150604084013590509250925092565b600060208284031215610e1457600080fd5b610b2382610c14565b600080600080600080600060e0888a031215610e3857600080fd5b610e4188610c14565b9650610e4f60208901610c14565b95506040880135945060608801359350610e6b60808901610d41565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215610e9a57600080fd5b610ea383610c14565b9150610eb160208401610c14565b90509250929050565b600181811c90821680610ece57607f821691505b602082108103610f07577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f821115610f59576000816000526020600020601f850160051c81016020861015610f365750805b601f850160051c820191505b81811015610f5557828155600101610f42565b5050505b505050565b815167ffffffffffffffff811115610f7857610f78610c67565b610f8c81610f868454610eba565b84610f0d565b602080601f831160018114610fdf5760008415610fa95750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610f55565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561102c5788860151825594840194600190910190840161100d565b508582101561106857878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036110d8576110d8611078565b5060010190565b60008083546110ed81610eba565b60018281168015611105576001811461113857611167565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168752821515830287019450611167565b8760005260208060002060005b8581101561115e5781548a820152908401908201611145565b50505082870194505b50929695505050505050565b8181038181111561034c5761034c611078565b8082018082111561034c5761034c61107856 - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0\xDFW`\x005`\xE0\x1C\x80c6D\xE5\x15\x11a\0\x8CW\x80c\x95\xD8\x9BA\x11a\0fW\x80c\x95\xD8\x9BA\x14a\x01\xD2W\x80c\xA9\x05\x9C\xBB\x14a\x01\xDAW\x80c\xD5\x05\xAC\xCF\x14a\x01\xEDW\x80c\xDDb\xED>\x14a\x02\0W`\0\x80\xFD[\x80c6D\xE5\x15\x14a\x01tW\x80cp\xA0\x821\x14a\x01|W\x80c~\xCE\xBE\0\x14a\x01\xB2W`\0\x80\xFD[\x80c\x18\x16\r\xDD\x11a\0\xBDW\x80c\x18\x16\r\xDD\x14a\x01:W\x80c#\xB8r\xDD\x14a\x01LW\x80c1<\xE5g\x14a\x01_W`\0\x80\xFD[\x80c\x06\xFD\xDE\x03\x14a\0\xE4W\x80c\t^\xA7\xB3\x14a\x01\x02W\x80c\x16$\xF6\xC6\x14a\x01%W[`\0\x80\xFD[a\0\xECa\x02FV[`@Qa\0\xF9\x91\x90a\x0B\xA7V[`@Q\x80\x91\x03\x90\xF3[a\x01\x15a\x01\x106`\x04a\x0C=V[a\x02\xD8V[`@Q\x90\x15\x15\x81R` \x01a\0\xF9V[a\x018a\x0136`\x04a\rRV[a\x03RV[\0[`\x03T[`@Q\x90\x81R` \x01a\0\xF9V[a\x01\x15a\x01Z6`\x04a\r\xC6V[a\x04QV[`\x02T`@Q`\xFF\x90\x91\x16\x81R` \x01a\0\xF9V[a\x01>a\x05\xC5V[a\x01>a\x01\x8A6`\x04a\x0E\x02V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0\x90\x81R`\x04` R`@\x90 T\x90V[a\x01>a\x01\xC06`\x04a\x0E\x02V[`\x08` R`\0\x90\x81R`@\x90 T\x81V[a\0\xECa\x05\xEBV[a\x01\x15a\x01\xE86`\x04a\x0C=V[a\x05\xFAV[a\x018a\x01\xFB6`\x04a\x0E\x1DV[a\x06\xABV[a\x01>a\x02\x0E6`\x04a\x0E\x87V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x82\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x93\x90\x94\x16\x82R\x91\x90\x91R T\x90V[```\0\x80Ta\x02U\x90a\x0E\xBAV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x02\x81\x90a\x0E\xBAV[\x80\x15a\x02\xCEW\x80`\x1F\x10a\x02\xA3Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x02\xCEV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x02\xB1W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[3`\0\x81\x81R`\x05` \x90\x81R`@\x80\x83 s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x87\x16\x80\x85R\x92R\x80\x83 \x85\x90UQ\x91\x92\x90\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x90a\x03@\x90\x86\x81R` \x01\x90V[`@Q\x80\x91\x03\x90\xA3P`\x01[\x92\x91PPV[`\tT`\xFF\x16\x15a\x03\xC4W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x13`$\x82\x01R\x7FALREADY_INITIALIZED\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0a\x03\xD0\x84\x82a\x0F^V[P`\x01a\x03\xDD\x83\x82a\x0F^V[P`\x02\x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16`\xFF\x83\x16\x17\x90Ua\x04\x13a\t\xF1V[`\x06Ua\x04\x1Ea\n\nV[`\x07UPP`\t\x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16`\x01\x17\x90UPV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x81 T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x14a\x04\xE5Wa\x04\xB3\x81\x84a\n\xADV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x86\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x90 U[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x16`\0\x90\x81R`\x04` R`@\x90 Ta\x05\x15\x90\x84a\n\xADV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x87\x16`\0\x90\x81R`\x04` R`@\x80\x82 \x93\x90\x93U\x90\x86\x16\x81R Ta\x05Q\x90\x84a\x0B*V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x86\x16`\0\x81\x81R`\x04` R`@\x90\x81\x90 \x93\x90\x93U\x91Q\x90\x87\x16\x90\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x90a\x05\xB2\x90\x87\x81R` \x01\x90V[`@Q\x80\x91\x03\x90\xA3P`\x01\x94\x93PPPPV[`\0`\x06Ta\x05\xD2a\t\xF1V[\x14a\x05\xE4Wa\x05\xDFa\n\nV[\x90P\x90V[P`\x07T\x90V[```\x01\x80Ta\x02U\x90a\x0E\xBAV[3`\0\x90\x81R`\x04` R`@\x81 Ta\x06\x14\x90\x83a\n\xADV[3`\0\x90\x81R`\x04` R`@\x80\x82 \x92\x90\x92Us\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x16\x81R Ta\x06M\x90\x83a\x0B*V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x16`\0\x81\x81R`\x04` R`@\x90\x81\x90 \x92\x90\x92U\x90Q3\x90\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x90a\x03@\x90\x86\x81R` \x01\x90V[B\x84\x10\x15a\x07\x15W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x17`$\x82\x01R\x7FPERMIT_DEADLINE_EXPIRED\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x03\xBBV[`\0`\x01a\x07!a\x05\xC5V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x8A\x16`\0\x90\x81R`\x08` R`@\x81 \x80T\x7Fnq\xED\xAE\x12\xB1\xB9\x7FM\x1F`7\x0F\xEF\x10\x10_\xA2\xFA\xAE\x01&\x11J\x16\x9Cd\x84]a&\xC9\x92\x8D\x92\x8D\x92\x8D\x92\x90\x91\x90a\x07|\x83a\x10\xA7V[\x90\x91UP`@\x80Q` \x81\x01\x96\x90\x96Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x94\x85\x16\x90\x86\x01R\x92\x90\x91\x16``\x84\x01R`\x80\x83\x01R`\xA0\x82\x01R`\xC0\x81\x01\x88\x90R`\xE0\x01`@Q` \x81\x83\x03\x03\x81R\x90`@R\x80Q\x90` \x01 `@Q` \x01a\x08\x1D\x92\x91\x90\x7F\x19\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x02\x81\x01\x92\x90\x92R`\"\x82\x01R`B\x01\x90V[`@\x80Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x84\x03\x01\x81R\x82\x82R\x80Q` \x91\x82\x01 `\0\x84R\x90\x83\x01\x80\x83RR`\xFF\x87\x16\x90\x82\x01R``\x81\x01\x85\x90R`\x80\x81\x01\x84\x90R`\xA0\x01` `@Q` \x81\x03\x90\x80\x84\x03\x90\x85Z\xFA\x15\x80\x15a\x08\x99W=`\0\x80>=`\0\xFD[PP`@Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x01Q\x91PPs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x15\x80\x15\x90a\t\x14WP\x87s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x14[a\tzW`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x0E`$\x82\x01R\x7FINVALID_SIGNER\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x03\xBBV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x81\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x8B\x85\x16\x80\x85R\x90\x83R\x92\x81\x90 \x8A\x90UQ\x89\x81R\x91\x92\x8B\x16\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\x01`@Q\x80\x91\x03\x90\xA3PPPPPPPPV[`\0a\x0B\xA3\x80a\n\x03c\xFF\xFF\xFF\xFF\x82\x16V[\x92PPP\x90V[`\0\x7F\x8Bs\xC3\xC6\x9B\xB8\xFE=Q.\xCCL\xF7Y\xCCy#\x9F{\x17\x9B\x0F\xFA\xCA\xA9\xA7]R+9@\x0F`\0`@Qa\n<\x91\x90a\x10\xDFV[`@Q\x80\x91\x03\x90 \x7F\xC8\x9E\xFD\xAAT\xC0\xF2\x0Cz\xDFa(\x82\xDF\tP\xF5\xA9Qc~\x03\x07\xCD\xCBLg/)\x8B\x8B\xC6a\nma\t\xF1V[`@\x80Q` \x81\x01\x95\x90\x95R\x84\x01\x92\x90\x92R``\x83\x01R`\x80\x82\x01R0`\xA0\x82\x01R`\xC0\x01`@Q` \x81\x83\x03\x03\x81R\x90`@R\x80Q\x90` \x01 \x90P\x90V[`\0\x81\x83\x10\x15a\x0B\x19W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x1C`$\x82\x01R\x7FERC20: subtraction underflow\0\0\0\0`D\x82\x01R`d\x01a\x03\xBBV[a\x0B#\x82\x84a\x11sV[\x93\x92PPPV[`\0\x80a\x0B7\x83\x85a\x11\x86V[\x90P\x83\x81\x10\x15a\x0B#W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x18`$\x82\x01R\x7FERC20: addition overflow\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x03\xBBV[F\x90V[`\0` \x80\x83R\x83Q\x80` \x85\x01R`\0[\x81\x81\x10\x15a\x0B\xD5W\x85\x81\x01\x83\x01Q\x85\x82\x01`@\x01R\x82\x01a\x0B\xB9V[P`\0`@\x82\x86\x01\x01R`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F\x83\x01\x16\x85\x01\x01\x92PPP\x92\x91PPV[\x805s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x0C8W`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0CPW`\0\x80\xFD[a\x0CY\x83a\x0C\x14V[\x94` \x93\x90\x93\x015\x93PPPV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[`\0\x82`\x1F\x83\x01\x12a\x0C\xA7W`\0\x80\xFD[\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x0C\xC2Wa\x0C\xC2a\x0CgV[`@Q`\x1F\x83\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\r\x08Wa\r\x08a\x0CgV[\x81`@R\x83\x81R\x86` \x85\x88\x01\x01\x11\x15a\r!W`\0\x80\xFD[\x83` \x87\x01` \x83\x017`\0` \x85\x83\x01\x01R\x80\x94PPPPP\x92\x91PPV[\x805`\xFF\x81\x16\x81\x14a\x0C8W`\0\x80\xFD[`\0\x80`\0``\x84\x86\x03\x12\x15a\rgW`\0\x80\xFD[\x835g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\r\x7FW`\0\x80\xFD[a\r\x8B\x87\x83\x88\x01a\x0C\x96V[\x94P` \x86\x015\x91P\x80\x82\x11\x15a\r\xA1W`\0\x80\xFD[Pa\r\xAE\x86\x82\x87\x01a\x0C\x96V[\x92PPa\r\xBD`@\x85\x01a\rAV[\x90P\x92P\x92P\x92V[`\0\x80`\0``\x84\x86\x03\x12\x15a\r\xDBW`\0\x80\xFD[a\r\xE4\x84a\x0C\x14V[\x92Pa\r\xF2` \x85\x01a\x0C\x14V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[`\0` \x82\x84\x03\x12\x15a\x0E\x14W`\0\x80\xFD[a\x0B#\x82a\x0C\x14V[`\0\x80`\0\x80`\0\x80`\0`\xE0\x88\x8A\x03\x12\x15a\x0E8W`\0\x80\xFD[a\x0EA\x88a\x0C\x14V[\x96Pa\x0EO` \x89\x01a\x0C\x14V[\x95P`@\x88\x015\x94P``\x88\x015\x93Pa\x0Ek`\x80\x89\x01a\rAV[\x92P`\xA0\x88\x015\x91P`\xC0\x88\x015\x90P\x92\x95\x98\x91\x94\x97P\x92\x95PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0E\x9AW`\0\x80\xFD[a\x0E\xA3\x83a\x0C\x14V[\x91Pa\x0E\xB1` \x84\x01a\x0C\x14V[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x0E\xCEW`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x0F\x07W\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[`\x1F\x82\x11\x15a\x0FYW`\0\x81`\0R` `\0 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15a\x0F6WP\x80[`\x1F\x85\x01`\x05\x1C\x82\x01\x91P[\x81\x81\x10\x15a\x0FUW\x82\x81U`\x01\x01a\x0FBV[PPP[PPPV[\x81Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0FxWa\x0Fxa\x0CgV[a\x0F\x8C\x81a\x0F\x86\x84Ta\x0E\xBAV[\x84a\x0F\rV[` \x80`\x1F\x83\x11`\x01\x81\x14a\x0F\xDFW`\0\x84\x15a\x0F\xA9WP\x85\x83\x01Q[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x03\x86\x90\x1B\x1C\x19\x16`\x01\x85\x90\x1B\x17\x85Ua\x0FUV[`\0\x85\x81R` \x81 \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x86\x16\x91[\x82\x81\x10\x15a\x10,W\x88\x86\x01Q\x82U\x94\x84\x01\x94`\x01\x90\x91\x01\x90\x84\x01a\x10\rV[P\x85\x82\x10\x15a\x10hW\x87\x85\x01Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x03\x88\x90\x1B`\xF8\x16\x1C\x19\x16\x81U[PPPPP`\x01\x90\x81\x1B\x01\x90UPV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\x11`\x04R`$`\0\xFD[`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x03a\x10\xD8Wa\x10\xD8a\x10xV[P`\x01\x01\x90V[`\0\x80\x83Ta\x10\xED\x81a\x0E\xBAV[`\x01\x82\x81\x16\x80\x15a\x11\x05W`\x01\x81\x14a\x118Wa\x11gV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x84\x16\x87R\x82\x15\x15\x83\x02\x87\x01\x94Pa\x11gV[\x87`\0R` \x80`\0 `\0[\x85\x81\x10\x15a\x11^W\x81T\x8A\x82\x01R\x90\x84\x01\x90\x82\x01a\x11EV[PPP\x82\x87\x01\x94P[P\x92\x96\x95PPPPPPV[\x81\x81\x03\x81\x81\x11\x15a\x03LWa\x03La\x10xV[\x80\x82\x01\x80\x82\x11\x15a\x03LWa\x03La\x10xV", - ); - /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. - ```solidity - event Approval(address indexed owner, address indexed spender, uint256 value); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct Approval { - #[allow(missing_docs)] - pub owner: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub spender: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub value: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for Approval { - type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = ( - alloy_sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - const SIGNATURE: &'static str = "Approval(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, - 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, - 91u8, 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { - owner: topics.1, - spender: topics.2, - value: data.0, - } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self.value, - ), - ) - } - #[inline] - fn topics(&self) -> ::RustType { - ( - Self::SIGNATURE_HASH.into(), - self.owner.clone(), - self.spender.clone(), - ) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - out[1usize] = ::encode_topic( - &self.owner, - ); - out[2usize] = ::encode_topic( - &self.spender, - ); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for Approval { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&Approval> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &Approval) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. - ```solidity - event Transfer(address indexed from, address indexed to, uint256 value); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct Transfer { - #[allow(missing_docs)] - pub from: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub to: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub value: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for Transfer { - type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = ( - alloy_sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, - 104u8, 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, - 161u8, 22u8, 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { - from: topics.1, - to: topics.2, - value: data.0, - } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self.value, - ), - ) - } - #[inline] - fn topics(&self) -> ::RustType { - ( - Self::SIGNATURE_HASH.into(), - self.from.clone(), - self.to.clone(), - ) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - out[1usize] = ::encode_topic( - &self.from, - ); - out[2usize] = ::encode_topic( - &self.to, - ); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for Transfer { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&Transfer> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &Transfer) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515`. - ```solidity - function DOMAIN_SEPARATOR() external view returns (bytes32); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct DOMAIN_SEPARATORCall {} - ///Container type for the return parameters of the [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct DOMAIN_SEPARATORReturn { - pub _0: alloy::sol_types::private::FixedBytes<32>, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: DOMAIN_SEPARATORCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for DOMAIN_SEPARATORCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: DOMAIN_SEPARATORReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for DOMAIN_SEPARATORReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for DOMAIN_SEPARATORCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = DOMAIN_SEPARATORReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; - const SELECTOR: [u8; 4] = [54u8, 68u8, 229u8, 21u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `allowance(address,address)` and selector `0xdd62ed3e`. - ```solidity - function allowance(address owner, address spender) external view returns (uint256); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct allowanceCall { - pub owner: alloy::sol_types::private::Address, - pub spender: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct allowanceReturn { - pub _0: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: allowanceCall) -> Self { - (value.owner, value.spender) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for allowanceCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - owner: tuple.0, - spender: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: allowanceReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for allowanceReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for allowanceCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = allowanceReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "allowance(address,address)"; - const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.owner, - ), - ::tokenize( - &self.spender, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. - ```solidity - function approve(address spender, uint256 amount) external returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct approveCall { - pub spender: alloy::sol_types::private::Address, - pub amount: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct approveReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: approveCall) -> Self { - (value.spender, value.amount) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for approveCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - spender: tuple.0, - amount: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: approveReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for approveReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for approveCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = approveReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "approve(address,uint256)"; - const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.spender, - ), - as alloy_sol_types::SolType>::tokenize( - &self.amount, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `balanceOf(address)` and selector `0x70a08231`. - ```solidity - function balanceOf(address owner) external view returns (uint256); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct balanceOfCall { - pub owner: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct balanceOfReturn { - pub _0: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: balanceOfCall) -> Self { - (value.owner,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for balanceOfCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { owner: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: balanceOfReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for balanceOfReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for balanceOfCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = balanceOfReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "balanceOf(address)"; - const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.owner, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `decimals()` and selector `0x313ce567`. - ```solidity - function decimals() external view returns (uint8); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct decimalsCall {} - ///Container type for the return parameters of the [`decimals()`](decimalsCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct decimalsReturn { - pub _0: u8, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: decimalsCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for decimalsCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<8>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (u8,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: decimalsReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for decimalsReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for decimalsCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = decimalsReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<8>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "decimals()"; - const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `initialize(string,string,uint8)` and selector `0x1624f6c6`. - ```solidity - function initialize(string memory name_, string memory symbol_, uint8 decimals_) external; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct initializeCall { - pub name_: alloy::sol_types::private::String, - pub symbol_: alloy::sol_types::private::String, - pub decimals_: u8, - } - ///Container type for the return parameters of the [`initialize(string,string,uint8)`](initializeCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct initializeReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::String, - alloy::sol_types::sol_data::String, - alloy::sol_types::sol_data::Uint<8>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::String, - alloy::sol_types::private::String, - u8, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: initializeCall) -> Self { - (value.name_, value.symbol_, value.decimals_) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for initializeCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - name_: tuple.0, - symbol_: tuple.1, - decimals_: tuple.2, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: initializeReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for initializeReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for initializeCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::String, - alloy::sol_types::sol_data::String, - alloy::sol_types::sol_data::Uint<8>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = initializeReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "initialize(string,string,uint8)"; - const SELECTOR: [u8; 4] = [22u8, 36u8, 246u8, 198u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.name_, - ), - ::tokenize( - &self.symbol_, - ), - as alloy_sol_types::SolType>::tokenize( - &self.decimals_, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `name()` and selector `0x06fdde03`. - ```solidity - function name() external view returns (string memory); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct nameCall {} - ///Container type for the return parameters of the [`name()`](nameCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct nameReturn { - pub _0: alloy::sol_types::private::String, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: nameCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for nameCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: nameReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for nameReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for nameCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = nameReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "name()"; - const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `nonces(address)` and selector `0x7ecebe00`. - ```solidity - function nonces(address) external view returns (uint256); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct noncesCall { - pub _0: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`nonces(address)`](noncesCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct noncesReturn { - pub _0: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: noncesCall) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for noncesCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: noncesReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for noncesReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for noncesCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = noncesReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "nonces(address)"; - const SELECTOR: [u8; 4] = [126u8, 206u8, 190u8, 0u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self._0, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `permit(address,address,uint256,uint256,uint8,bytes32,bytes32)` and selector `0xd505accf`. - ```solidity - function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct permitCall { - pub owner: alloy::sol_types::private::Address, - pub spender: alloy::sol_types::private::Address, - pub value: alloy::sol_types::private::U256, - pub deadline: alloy::sol_types::private::U256, - pub v: u8, - pub r: alloy::sol_types::private::FixedBytes<32>, - pub s: alloy::sol_types::private::FixedBytes<32>, - } - ///Container type for the return parameters of the [`permit(address,address,uint256,uint256,uint8,bytes32,bytes32)`](permitCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct permitReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - alloy::sol_types::sol_data::Uint<256>, - alloy::sol_types::sol_data::Uint<8>, - alloy::sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::FixedBytes<32>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - alloy::sol_types::private::U256, - u8, - alloy::sol_types::private::FixedBytes<32>, - alloy::sol_types::private::FixedBytes<32>, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: permitCall) -> Self { - ( - value.owner, - value.spender, - value.value, - value.deadline, - value.v, - value.r, - value.s, - ) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for permitCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - owner: tuple.0, - spender: tuple.1, - value: tuple.2, - deadline: tuple.3, - v: tuple.4, - r: tuple.5, - s: tuple.6, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: permitReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for permitReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for permitCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - alloy::sol_types::sol_data::Uint<256>, - alloy::sol_types::sol_data::Uint<8>, - alloy::sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::FixedBytes<32>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = permitReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; - const SELECTOR: [u8; 4] = [213u8, 5u8, 172u8, 207u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.owner, - ), - ::tokenize( - &self.spender, - ), - as alloy_sol_types::SolType>::tokenize(&self.value), - as alloy_sol_types::SolType>::tokenize(&self.deadline), - as alloy_sol_types::SolType>::tokenize(&self.v), - as alloy_sol_types::SolType>::tokenize(&self.r), - as alloy_sol_types::SolType>::tokenize(&self.s), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `symbol()` and selector `0x95d89b41`. - ```solidity - function symbol() external view returns (string memory); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct symbolCall {} - ///Container type for the return parameters of the [`symbol()`](symbolCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct symbolReturn { - pub _0: alloy::sol_types::private::String, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: symbolCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for symbolCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: symbolReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for symbolReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for symbolCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = symbolReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "symbol()"; - const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `totalSupply()` and selector `0x18160ddd`. - ```solidity - function totalSupply() external view returns (uint256); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct totalSupplyCall {} - ///Container type for the return parameters of the [`totalSupply()`](totalSupplyCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct totalSupplyReturn { - pub _0: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: totalSupplyCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for totalSupplyCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: totalSupplyReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for totalSupplyReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for totalSupplyCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = totalSupplyReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "totalSupply()"; - const SELECTOR: [u8; 4] = [24u8, 22u8, 13u8, 221u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. - ```solidity - function transfer(address to, uint256 amount) external returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferCall { - pub to: alloy::sol_types::private::Address, - pub amount: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferCall) -> Self { - (value.to, value.amount) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - to: tuple.0, - amount: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for transferCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = transferReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "transfer(address,uint256)"; - const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.to, - ), - as alloy_sol_types::SolType>::tokenize( - &self.amount, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. - ```solidity - function transferFrom(address from, address to, uint256 amount) external returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferFromCall { - pub from: alloy::sol_types::private::Address, - pub to: alloy::sol_types::private::Address, - pub amount: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferFromReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferFromCall) -> Self { - (value.from, value.to, value.amount) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferFromCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - from: tuple.0, - to: tuple.1, - amount: tuple.2, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferFromReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferFromReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for transferFromCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = transferFromReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; - const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.from, - ), - ::tokenize( - &self.to, - ), - as alloy_sol_types::SolType>::tokenize( - &self.amount, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - ///Container for all the [`MockERC20`](self) function calls. - pub enum MockERC20Calls { - DOMAIN_SEPARATOR(DOMAIN_SEPARATORCall), - allowance(allowanceCall), - approve(approveCall), - balanceOf(balanceOfCall), - decimals(decimalsCall), - initialize(initializeCall), - name(nameCall), - nonces(noncesCall), - permit(permitCall), - symbol(symbolCall), - totalSupply(totalSupplyCall), - transfer(transferCall), - transferFrom(transferFromCall), - } - #[automatically_derived] - impl MockERC20Calls { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = &[ - [6u8, 253u8, 222u8, 3u8], - [9u8, 94u8, 167u8, 179u8], - [22u8, 36u8, 246u8, 198u8], - [24u8, 22u8, 13u8, 221u8], - [35u8, 184u8, 114u8, 221u8], - [49u8, 60u8, 229u8, 103u8], - [54u8, 68u8, 229u8, 21u8], - [112u8, 160u8, 130u8, 49u8], - [126u8, 206u8, 190u8, 0u8], - [149u8, 216u8, 155u8, 65u8], - [169u8, 5u8, 156u8, 187u8], - [213u8, 5u8, 172u8, 207u8], - [221u8, 98u8, 237u8, 62u8], - ]; - } - #[automatically_derived] - impl alloy_sol_types::SolInterface for MockERC20Calls { - const NAME: &'static str = "MockERC20Calls"; - const MIN_DATA_LENGTH: usize = 0usize; - const COUNT: usize = 13usize; - #[inline] - fn selector(&self) -> [u8; 4] { - match self { - Self::DOMAIN_SEPARATOR(_) => { - ::SELECTOR - } - Self::allowance(_) => ::SELECTOR, - Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => ::SELECTOR, - Self::decimals(_) => ::SELECTOR, - Self::initialize(_) => ::SELECTOR, - Self::name(_) => ::SELECTOR, - Self::nonces(_) => ::SELECTOR, - Self::permit(_) => ::SELECTOR, - Self::symbol(_) => ::SELECTOR, - Self::totalSupply(_) => ::SELECTOR, - Self::transfer(_) => ::SELECTOR, - Self::transferFrom(_) => ::SELECTOR, - } - } - #[inline] - fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { - Self::SELECTORS.get(i).copied() - } - #[inline] - fn valid_selector(selector: [u8; 4]) -> bool { - Self::SELECTORS.binary_search(&selector).is_ok() - } - #[inline] - #[allow(unsafe_code, non_snake_case)] - fn abi_decode_raw( - selector: [u8; 4], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = &[ - { - fn name( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(MockERC20Calls::name) - } - name - }, - { - fn approve( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(MockERC20Calls::approve) - } - approve - }, - { - fn initialize( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(MockERC20Calls::initialize) - } - initialize - }, - { - fn totalSupply( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(MockERC20Calls::totalSupply) - } - totalSupply - }, - { - fn transferFrom( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(MockERC20Calls::transferFrom) - } - transferFrom - }, - { - fn decimals( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(MockERC20Calls::decimals) - } - decimals - }, - { - fn DOMAIN_SEPARATOR( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(MockERC20Calls::DOMAIN_SEPARATOR) - } - DOMAIN_SEPARATOR - }, - { - fn balanceOf( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(MockERC20Calls::balanceOf) - } - balanceOf - }, - { - fn nonces( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(MockERC20Calls::nonces) - } - nonces - }, - { - fn symbol( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(MockERC20Calls::symbol) - } - symbol - }, - { - fn transfer( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(MockERC20Calls::transfer) - } - transfer - }, - { - fn permit( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(MockERC20Calls::permit) - } - permit - }, - { - fn allowance( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(MockERC20Calls::allowance) - } - allowance - }, - ]; - let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err(alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - )); - }; - (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) - } - #[inline] - fn abi_encoded_size(&self) -> usize { - match self { - Self::DOMAIN_SEPARATOR(inner) => { - ::abi_encoded_size(inner) - } - Self::allowance(inner) => { - ::abi_encoded_size(inner) - } - Self::approve(inner) => { - ::abi_encoded_size(inner) - } - Self::balanceOf(inner) => { - ::abi_encoded_size(inner) - } - Self::decimals(inner) => { - ::abi_encoded_size(inner) - } - Self::initialize(inner) => { - ::abi_encoded_size(inner) - } - Self::name(inner) => { - ::abi_encoded_size(inner) - } - Self::nonces(inner) => { - ::abi_encoded_size(inner) - } - Self::permit(inner) => { - ::abi_encoded_size(inner) - } - Self::symbol(inner) => { - ::abi_encoded_size(inner) - } - Self::totalSupply(inner) => { - ::abi_encoded_size(inner) - } - Self::transfer(inner) => { - ::abi_encoded_size(inner) - } - Self::transferFrom(inner) => { - ::abi_encoded_size(inner) - } - } - } - #[inline] - fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { - match self { - Self::DOMAIN_SEPARATOR(inner) => { - ::abi_encode_raw(inner, out) - } - Self::allowance(inner) => { - ::abi_encode_raw(inner, out) - } - Self::approve(inner) => { - ::abi_encode_raw(inner, out) - } - Self::balanceOf(inner) => { - ::abi_encode_raw(inner, out) - } - Self::decimals(inner) => { - ::abi_encode_raw(inner, out) - } - Self::initialize(inner) => { - ::abi_encode_raw(inner, out) - } - Self::name(inner) => { - ::abi_encode_raw(inner, out) - } - Self::nonces(inner) => { - ::abi_encode_raw(inner, out) - } - Self::permit(inner) => { - ::abi_encode_raw(inner, out) - } - Self::symbol(inner) => { - ::abi_encode_raw(inner, out) - } - Self::totalSupply(inner) => { - ::abi_encode_raw(inner, out) - } - Self::transfer(inner) => { - ::abi_encode_raw(inner, out) - } - Self::transferFrom(inner) => { - ::abi_encode_raw(inner, out) - } - } - } - } - ///Container for all the [`MockERC20`](self) events. - pub enum MockERC20Events { - Approval(Approval), - Transfer(Transfer), - } - #[automatically_derived] - impl MockERC20Events { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 32usize]] = &[ - [ - 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, - 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, 91u8, - 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, - ], - [ - 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, 104u8, - 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, 161u8, 22u8, - 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, - ], - ]; - } - #[automatically_derived] - impl alloy_sol_types::SolEventInterface for MockERC20Events { - const NAME: &'static str = "MockERC20Events"; - const COUNT: usize = 2usize; - fn decode_raw_log( - topics: &[alloy_sol_types::Word], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - match topics.first().copied() { - Some(::SIGNATURE_HASH) => { - ::decode_raw_log(topics, data, validate) - .map(Self::Approval) - } - Some(::SIGNATURE_HASH) => { - ::decode_raw_log(topics, data, validate) - .map(Self::Transfer) - } - _ => alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { - name: ::NAME, - log: alloy_sol_types::private::Box::new( - alloy_sol_types::private::LogData::new_unchecked( - topics.to_vec(), - data.to_vec().into(), - ), - ), - }), - } - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for MockERC20Events { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - match self { - Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), - Self::Transfer(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), - } - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - match self { - Self::Approval(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::Transfer(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - } - } - } - use alloy::contract as alloy_contract; - /**Creates a new wrapper around an on-chain [`MockERC20`](self) contract instance. - - See the [wrapper's documentation](`MockERC20Instance`) for more details.*/ - #[inline] - pub const fn new< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - address: alloy_sol_types::private::Address, - provider: P, - ) -> MockERC20Instance { - MockERC20Instance::::new(address, provider) - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub fn deploy< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> impl ::core::future::Future>> - { - MockERC20Instance::::deploy(provider) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> alloy_contract::RawCallBuilder { - MockERC20Instance::::deploy_builder(provider) - } - /**A [`MockERC20`](self) instance. - - Contains type-safe methods for interacting with an on-chain instance of the - [`MockERC20`](self) contract located at a given `address`, using a given - provider `P`. - - If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) - documentation on how to provide it), the `deploy` and `deploy_builder` methods can - be used to deploy a new instance of the contract. - - See the [module-level documentation](self) for all the available methods.*/ - #[derive(Clone)] - pub struct MockERC20Instance { - address: alloy_sol_types::private::Address, - provider: P, - _network_transport: ::core::marker::PhantomData<(N, T)>, - } - #[automatically_derived] - impl ::core::fmt::Debug for MockERC20Instance { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("MockERC20Instance") - .field(&self.address) - .finish() - } - } - /// Instantiation and getters/setters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockERC20Instance - { - /**Creates a new wrapper around an on-chain [`MockERC20`](self) contract instance. - - See the [wrapper's documentation](`MockERC20Instance`) for more details.*/ - #[inline] - pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { - Self { - address, - provider, - _network_transport: ::core::marker::PhantomData, - } - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub async fn deploy(provider: P) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder(provider); - let contract_address = call_builder.deploy().await?; - Ok(Self::new(contract_address, call_builder.provider)) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { - alloy_contract::RawCallBuilder::new_raw_deploy( - provider, - ::core::clone::Clone::clone(&BYTECODE), - ) - } - /// Returns a reference to the address. - #[inline] - pub const fn address(&self) -> &alloy_sol_types::private::Address { - &self.address - } - /// Sets the address. - #[inline] - pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { - self.address = address; - } - /// Sets the address and returns `self`. - pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { - self.set_address(address); - self - } - /// Returns a reference to the provider. - #[inline] - pub const fn provider(&self) -> &P { - &self.provider - } - } - impl MockERC20Instance { - /// Clones the provider and returns a new instance with the cloned provider. - #[inline] - pub fn with_cloned_provider(self) -> MockERC20Instance { - MockERC20Instance { - address: self.address, - provider: ::core::clone::Clone::clone(&self.provider), - _network_transport: ::core::marker::PhantomData, - } - } - } - /// Function calls. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockERC20Instance - { - /// Creates a new call builder using this contract instance's provider and address. - /// - /// Note that the call can be any function call, not just those defined in this - /// contract. Prefer using the other methods for building type-safe contract calls. - pub fn call_builder( - &self, - call: &C, - ) -> alloy_contract::SolCallBuilder { - alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) - } - ///Creates a new call builder for the [`DOMAIN_SEPARATOR`] function. - pub fn DOMAIN_SEPARATOR( - &self, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&DOMAIN_SEPARATORCall {}) - } - ///Creates a new call builder for the [`allowance`] function. - pub fn allowance( - &self, - owner: alloy::sol_types::private::Address, - spender: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&allowanceCall { owner, spender }) - } - ///Creates a new call builder for the [`approve`] function. - pub fn approve( - &self, - spender: alloy::sol_types::private::Address, - amount: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&approveCall { spender, amount }) - } - ///Creates a new call builder for the [`balanceOf`] function. - pub fn balanceOf( - &self, - owner: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&balanceOfCall { owner }) - } - ///Creates a new call builder for the [`decimals`] function. - pub fn decimals(&self) -> alloy_contract::SolCallBuilder { - self.call_builder(&decimalsCall {}) - } - ///Creates a new call builder for the [`initialize`] function. - pub fn initialize( - &self, - name_: alloy::sol_types::private::String, - symbol_: alloy::sol_types::private::String, - decimals_: u8, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&initializeCall { - name_, - symbol_, - decimals_, - }) - } - ///Creates a new call builder for the [`name`] function. - pub fn name(&self) -> alloy_contract::SolCallBuilder { - self.call_builder(&nameCall {}) - } - ///Creates a new call builder for the [`nonces`] function. - pub fn nonces( - &self, - _0: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&noncesCall { _0 }) - } - ///Creates a new call builder for the [`permit`] function. - pub fn permit( - &self, - owner: alloy::sol_types::private::Address, - spender: alloy::sol_types::private::Address, - value: alloy::sol_types::private::U256, - deadline: alloy::sol_types::private::U256, - v: u8, - r: alloy::sol_types::private::FixedBytes<32>, - s: alloy::sol_types::private::FixedBytes<32>, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&permitCall { - owner, - spender, - value, - deadline, - v, - r, - s, - }) - } - ///Creates a new call builder for the [`symbol`] function. - pub fn symbol(&self) -> alloy_contract::SolCallBuilder { - self.call_builder(&symbolCall {}) - } - ///Creates a new call builder for the [`totalSupply`] function. - pub fn totalSupply(&self) -> alloy_contract::SolCallBuilder { - self.call_builder(&totalSupplyCall {}) - } - ///Creates a new call builder for the [`transfer`] function. - pub fn transfer( - &self, - to: alloy::sol_types::private::Address, - amount: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&transferCall { to, amount }) - } - ///Creates a new call builder for the [`transferFrom`] function. - pub fn transferFrom( - &self, - from: alloy::sol_types::private::Address, - to: alloy::sol_types::private::Address, - amount: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&transferFromCall { from, to, amount }) - } - } - /// Event filters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockERC20Instance - { - /// Creates a new event filter using this contract instance's provider and address. - /// - /// Note that the type can be any event, not just those defined in this contract. - /// Prefer using the other methods for building type-safe event filters. - pub fn event_filter( - &self, - ) -> alloy_contract::Event { - alloy_contract::Event::new_sol(&self.provider, &self.address) - } - ///Creates a new event filter for the [`Approval`] event. - pub fn Approval_filter(&self) -> alloy_contract::Event { - self.event_filter::() - } - ///Creates a new event filter for the [`Transfer`] event. - pub fn Transfer_filter(&self) -> alloy_contract::Event { - self.event_filter::() - } - } -} diff --git a/crates/bindings/src/mockerc721.rs b/crates/bindings/src/mockerc721.rs deleted file mode 100644 index 7a4e4b7..0000000 --- a/crates/bindings/src/mockerc721.rs +++ /dev/null @@ -1,3111 +0,0 @@ -/** - -Generated by the following Solidity interface... -```solidity -interface MockERC721 { - event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); - event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); - event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); - - function approve(address spender, uint256 id) external payable; - function balanceOf(address owner) external view returns (uint256); - function getApproved(uint256 id) external view returns (address); - function initialize(string memory name_, string memory symbol_) external; - function isApprovedForAll(address owner, address operator) external view returns (bool); - function name() external view returns (string memory); - function ownerOf(uint256 id) external view returns (address owner); - function safeTransferFrom(address from, address to, uint256 id) external payable; - function safeTransferFrom(address from, address to, uint256 id, bytes memory data) external payable; - function setApprovalForAll(address operator, bool approved) external; - function supportsInterface(bytes4 interfaceId) external view returns (bool); - function symbol() external view returns (string memory); - function tokenURI(uint256 id) external view returns (string memory); - function transferFrom(address from, address to, uint256 id) external payable; -} -``` - -...which was generated by the following JSON ABI: -```json -[ - { - "type": "function", - "name": "approve", - "inputs": [ - { - "name": "spender", - "type": "address", - "internalType": "address" - }, - { - "name": "id", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "balanceOf", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getApproved", - "inputs": [ - { - "name": "id", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "name_", - "type": "string", - "internalType": "string" - }, - { - "name": "symbol_", - "type": "string", - "internalType": "string" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isApprovedForAll", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "operator", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "ownerOf", - "inputs": [ - { - "name": "id", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "safeTransferFrom", - "inputs": [ - { - "name": "from", - "type": "address", - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "id", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "safeTransferFrom", - "inputs": [ - { - "name": "from", - "type": "address", - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "id", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "setApprovalForAll", - "inputs": [ - { - "name": "operator", - "type": "address", - "internalType": "address" - }, - { - "name": "approved", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "supportsInterface", - "inputs": [ - { - "name": "interfaceId", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "symbol", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "tokenURI", - "inputs": [ - { - "name": "id", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "transferFrom", - "inputs": [ - { - "name": "from", - "type": "address", - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "id", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "event", - "name": "Approval", - "inputs": [ - { - "name": "_owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_approved", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ApprovalForAll", - "inputs": [ - { - "name": "_owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_operator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_approved", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Transfer", - "inputs": [ - { - "name": "_from", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "_tokenId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - } -] -```*/ -#[allow(non_camel_case_types, non_snake_case, clippy::style)] -pub mod MockERC721 { - use super::*; - use alloy::sol_types as alloy_sol_types; - /// The creation / init bytecode of the contract. - /// - /// ```text - ///0x608060405234801561001057600080fd5b50611469806100206000396000f3fe6080604052600436106100dd5760003560e01c80636352211e1161007f578063a22cb46511610059578063a22cb4651461025f578063b88d4fde1461027f578063c87b56dd14610292578063e985e9c5146102b357600080fd5b80636352211e146101fc57806370a082311461021c57806395d89b411461024a57600080fd5b8063095ea7b3116100bb578063095ea7b3146101a157806323b872dd146101b657806342842e0e146101c95780634cd88b76146101dc57600080fd5b806301ffc9a7146100e257806306fdde0314610117578063081812fc14610139575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610e1f565b610309565b60405190151581526020015b60405180910390f35b34801561012357600080fd5b5061012c6103ee565b60405161010e9190610ea7565b34801561014557600080fd5b5061017c610154366004610eba565b60009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161010e565b6101b46101af366004610ef7565b610480565b005b6101b46101c4366004610f21565b6105cf565b6101b46101d7366004610f21565b6108c4565b3480156101e857600080fd5b506101b46101f7366004611040565b610a18565b34801561020857600080fd5b5061017c610217366004610eba565b610ace565b34801561022857600080fd5b5061023c6102373660046110a4565b610b5f565b60405190815260200161010e565b34801561025657600080fd5b5061012c610c07565b34801561026b57600080fd5b506101b461027a3660046110bf565b610c16565b6101b461028d3660046110fb565b610cad565b34801561029e57600080fd5b5061012c6102ad366004610eba565b50606090565b3480156102bf57600080fd5b506101026102ce366004611177565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061039c57507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806103e857507f5b5e139f000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600080546103fd906111aa565b80601f0160208091040260200160405190810160405280929190818152602001828054610429906111aa565b80156104765780601f1061044b57610100808354040283529160200191610476565b820191906000526020600020905b81548152906001019060200180831161045957829003601f168201915b5050505050905090565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16338114806104e3575073ffffffffffffffffffffffffffffffffffffffff8116600090815260056020908152604080832033845290915290205460ff165b61054e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064015b60405180910390fd5b60008281526004602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff84811691161461065f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f57524f4e475f46524f4d000000000000000000000000000000000000000000006044820152606401610545565b73ffffffffffffffffffffffffffffffffffffffff82166106dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f494e56414c49445f524543495049454e540000000000000000000000000000006044820152606401610545565b3373ffffffffffffffffffffffffffffffffffffffff84161480610730575073ffffffffffffffffffffffffffffffffffffffff8316600090815260056020908152604080832033845290915290205460ff165b8061075e575060008181526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1633145b6107c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a45440000000000000000000000000000000000006044820152606401610545565b73ffffffffffffffffffffffffffffffffffffffff831660009081526003602052604081208054916107f58361122c565b909155505073ffffffffffffffffffffffffffffffffffffffff8216600090815260036020526040812080549161082b83611261565b90915550506000818152600260209081526040808320805473ffffffffffffffffffffffffffffffffffffffff8088167fffffffffffffffffffffffff000000000000000000000000000000000000000092831681179093556004909452828520805490911690559051849391928716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6108cf8383836105cf565b813b15806109ad57506040517f150b7a020000000000000000000000000000000000000000000000000000000080825233600483015273ffffffffffffffffffffffffffffffffffffffff858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610965573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109899190611299565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b610a13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f554e534146455f524543495049454e54000000000000000000000000000000006044820152606401610545565b505050565b60065460ff1615610a85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f414c52454144595f494e495449414c495a4544000000000000000000000000006044820152606401610545565b6000610a918382611306565b506001610a9e8282611306565b5050600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905550565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1680610b5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e4f545f4d494e544544000000000000000000000000000000000000000000006044820152606401610545565b919050565b600073ffffffffffffffffffffffffffffffffffffffff8216610bde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f5a45524f5f4144445245535300000000000000000000000000000000000000006044820152606401610545565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b6060600180546103fd906111aa565b33600081815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610cb88484846105cf565b823b1580610d8257506040517f150b7a02000000000000000000000000000000000000000000000000000000008082529073ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290610d1b903390899088908890600401611420565b6020604051808303816000875af1158015610d3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5e9190611299565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b610de8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f554e534146455f524543495049454e54000000000000000000000000000000006044820152606401610545565b50505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610e1c57600080fd5b50565b600060208284031215610e3157600080fd5b8135610e3c81610dee565b9392505050565b6000815180845260005b81811015610e6957602081850181015186830182015201610e4d565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610e3c6020830184610e43565b600060208284031215610ecc57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b5a57600080fd5b60008060408385031215610f0a57600080fd5b610f1383610ed3565b946020939093013593505050565b600080600060608486031215610f3657600080fd5b610f3f84610ed3565b9250610f4d60208501610ed3565b9150604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff80841115610fa757610fa7610f5d565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610fed57610fed610f5d565b8160405280935085815286868601111561100657600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261103157600080fd5b610e3c83833560208501610f8c565b6000806040838503121561105357600080fd5b823567ffffffffffffffff8082111561106b57600080fd5b61107786838701611020565b9350602085013591508082111561108d57600080fd5b5061109a85828601611020565b9150509250929050565b6000602082840312156110b657600080fd5b610e3c82610ed3565b600080604083850312156110d257600080fd5b6110db83610ed3565b9150602083013580151581146110f057600080fd5b809150509250929050565b6000806000806080858703121561111157600080fd5b61111a85610ed3565b935061112860208601610ed3565b925060408501359150606085013567ffffffffffffffff81111561114b57600080fd5b8501601f8101871361115c57600080fd5b61116b87823560208401610f8c565b91505092959194509250565b6000806040838503121561118a57600080fd5b61119383610ed3565b91506111a160208401610ed3565b90509250929050565b600181811c908216806111be57607f821691505b6020821081036111f7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008161123b5761123b6111fd565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611292576112926111fd565b5060010190565b6000602082840312156112ab57600080fd5b8151610e3c81610dee565b601f821115610a13576000816000526020600020601f850160051c810160208610156112df5750805b601f850160051c820191505b818110156112fe578281556001016112eb565b505050505050565b815167ffffffffffffffff81111561132057611320610f5d565b6113348161132e84546111aa565b846112b6565b602080601f83116001811461138757600084156113515750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556112fe565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156113d4578886015182559484019460019091019084016113b5565b508582101561141057878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261145f6080830184610e43565b969550505050505056 - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[Pa\x14i\x80a\0 `\09`\0\xF3\xFE`\x80`@R`\x046\x10a\0\xDDW`\x005`\xE0\x1C\x80ccR!\x1E\x11a\0\x7FW\x80c\xA2,\xB4e\x11a\0YW\x80c\xA2,\xB4e\x14a\x02_W\x80c\xB8\x8DO\xDE\x14a\x02\x7FW\x80c\xC8{V\xDD\x14a\x02\x92W\x80c\xE9\x85\xE9\xC5\x14a\x02\xB3W`\0\x80\xFD[\x80ccR!\x1E\x14a\x01\xFCW\x80cp\xA0\x821\x14a\x02\x1CW\x80c\x95\xD8\x9BA\x14a\x02JW`\0\x80\xFD[\x80c\t^\xA7\xB3\x11a\0\xBBW\x80c\t^\xA7\xB3\x14a\x01\xA1W\x80c#\xB8r\xDD\x14a\x01\xB6W\x80cB\x84.\x0E\x14a\x01\xC9W\x80cL\xD8\x8Bv\x14a\x01\xDCW`\0\x80\xFD[\x80c\x01\xFF\xC9\xA7\x14a\0\xE2W\x80c\x06\xFD\xDE\x03\x14a\x01\x17W\x80c\x08\x18\x12\xFC\x14a\x019W[`\0\x80\xFD[4\x80\x15a\0\xEEW`\0\x80\xFD[Pa\x01\x02a\0\xFD6`\x04a\x0E\x1FV[a\x03\tV[`@Q\x90\x15\x15\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[4\x80\x15a\x01#W`\0\x80\xFD[Pa\x01,a\x03\xEEV[`@Qa\x01\x0E\x91\x90a\x0E\xA7V[4\x80\x15a\x01EW`\0\x80\xFD[Pa\x01|a\x01T6`\x04a\x0E\xBAV[`\0\x90\x81R`\x04` R`@\x90 Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\x01\x0EV[a\x01\xB4a\x01\xAF6`\x04a\x0E\xF7V[a\x04\x80V[\0[a\x01\xB4a\x01\xC46`\x04a\x0F!V[a\x05\xCFV[a\x01\xB4a\x01\xD76`\x04a\x0F!V[a\x08\xC4V[4\x80\x15a\x01\xE8W`\0\x80\xFD[Pa\x01\xB4a\x01\xF76`\x04a\x10@V[a\n\x18V[4\x80\x15a\x02\x08W`\0\x80\xFD[Pa\x01|a\x02\x176`\x04a\x0E\xBAV[a\n\xCEV[4\x80\x15a\x02(W`\0\x80\xFD[Pa\x02=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\t\x89\x91\x90a\x12\x99V[\x7F\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16\x14[a\n\x13W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x10`$\x82\x01R\x7FUNSAFE_RECIPIENT\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[PPPV[`\x06T`\xFF\x16\x15a\n\x85W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x13`$\x82\x01R\x7FALREADY_INITIALIZED\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[`\0a\n\x91\x83\x82a\x13\x06V[P`\x01a\n\x9E\x82\x82a\x13\x06V[PP`\x06\x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16`\x01\x17\x90UPV[`\0\x81\x81R`\x02` R`@\x90 Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x80a\x0BZW`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\n`$\x82\x01R\x7FNOT_MINTED\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[\x91\x90PV[`\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16a\x0B\xDEW`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x0C`$\x82\x01R\x7FZERO_ADDRESS\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0\x90\x81R`\x03` R`@\x90 T\x90V[```\x01\x80Ta\x03\xFD\x90a\x11\xAAV[3`\0\x81\x81R`\x05` \x90\x81R`@\x80\x83 s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x87\x16\x80\x85R\x90\x83R\x92\x81\x90 \x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16\x86\x15\x15\x90\x81\x17\x90\x91U\x90Q\x90\x81R\x91\x92\x91\x7F\x170~\xAB9\xABa\x07\xE8\x89\x98E\xAD=Y\xBD\x96S\xF2\0\xF2 \x92\x04\x89\xCA+Y7il1\x91\x01`@Q\x80\x91\x03\x90\xA3PPV[a\x0C\xB8\x84\x84\x84a\x05\xCFV[\x82;\x15\x80a\r\x82WP`@Q\x7F\x15\x0Bz\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x80\x82R\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x16\x90c\x15\x0Bz\x02\x90a\r\x1B\x903\x90\x89\x90\x88\x90\x88\x90`\x04\x01a\x14 V[` `@Q\x80\x83\x03\x81`\0\x87Z\xF1\x15\x80\x15a\r:W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\r^\x91\x90a\x12\x99V[\x7F\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16\x14[a\r\xE8W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x10`$\x82\x01R\x7FUNSAFE_RECIPIENT\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[PPPPV[\x7F\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81\x16\x81\x14a\x0E\x1CW`\0\x80\xFD[PV[`\0` \x82\x84\x03\x12\x15a\x0E1W`\0\x80\xFD[\x815a\x0E<\x81a\r\xEEV[\x93\x92PPPV[`\0\x81Q\x80\x84R`\0[\x81\x81\x10\x15a\x0EiW` \x81\x85\x01\x81\x01Q\x86\x83\x01\x82\x01R\x01a\x0EMV[P`\0` \x82\x86\x01\x01R` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F\x83\x01\x16\x85\x01\x01\x91PP\x92\x91PPV[` \x81R`\0a\x0E<` \x83\x01\x84a\x0ECV[`\0` \x82\x84\x03\x12\x15a\x0E\xCCW`\0\x80\xFD[P5\x91\x90PV[\x805s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x0BZW`\0\x80\xFD[`\0\x80`@\x83\x85\x03\x12\x15a\x0F\nW`\0\x80\xFD[a\x0F\x13\x83a\x0E\xD3V[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80`\0``\x84\x86\x03\x12\x15a\x0F6W`\0\x80\xFD[a\x0F?\x84a\x0E\xD3V[\x92Pa\x0FM` \x85\x01a\x0E\xD3V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[`\0g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x84\x11\x15a\x0F\xA7Wa\x0F\xA7a\x0F]V[`@Q`\x1F\x85\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\x0F\xEDWa\x0F\xEDa\x0F]V[\x81`@R\x80\x93P\x85\x81R\x86\x86\x86\x01\x11\x15a\x10\x06W`\0\x80\xFD[\x85\x85` \x83\x017`\0` \x87\x83\x01\x01RPPP\x93\x92PPPV[`\0\x82`\x1F\x83\x01\x12a\x101W`\0\x80\xFD[a\x0E<\x83\x835` \x85\x01a\x0F\x8CV[`\0\x80`@\x83\x85\x03\x12\x15a\x10SW`\0\x80\xFD[\x825g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x10kW`\0\x80\xFD[a\x10w\x86\x83\x87\x01a\x10 V[\x93P` \x85\x015\x91P\x80\x82\x11\x15a\x10\x8DW`\0\x80\xFD[Pa\x10\x9A\x85\x82\x86\x01a\x10 V[\x91PP\x92P\x92\x90PV[`\0` \x82\x84\x03\x12\x15a\x10\xB6W`\0\x80\xFD[a\x0E<\x82a\x0E\xD3V[`\0\x80`@\x83\x85\x03\x12\x15a\x10\xD2W`\0\x80\xFD[a\x10\xDB\x83a\x0E\xD3V[\x91P` \x83\x015\x80\x15\x15\x81\x14a\x10\xF0W`\0\x80\xFD[\x80\x91PP\x92P\x92\x90PV[`\0\x80`\0\x80`\x80\x85\x87\x03\x12\x15a\x11\x11W`\0\x80\xFD[a\x11\x1A\x85a\x0E\xD3V[\x93Pa\x11(` \x86\x01a\x0E\xD3V[\x92P`@\x85\x015\x91P``\x85\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x11KW`\0\x80\xFD[\x85\x01`\x1F\x81\x01\x87\x13a\x11\\W`\0\x80\xFD[a\x11k\x87\x825` \x84\x01a\x0F\x8CV[\x91PP\x92\x95\x91\x94P\x92PV[`\0\x80`@\x83\x85\x03\x12\x15a\x11\x8AW`\0\x80\xFD[a\x11\x93\x83a\x0E\xD3V[\x91Pa\x11\xA1` \x84\x01a\x0E\xD3V[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x11\xBEW`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x11\xF7W\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\x11`\x04R`$`\0\xFD[`\0\x81a\x12;Wa\x12;a\x11\xFDV[P\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01\x90V[`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x03a\x12\x92Wa\x12\x92a\x11\xFDV[P`\x01\x01\x90V[`\0` \x82\x84\x03\x12\x15a\x12\xABW`\0\x80\xFD[\x81Qa\x0E<\x81a\r\xEEV[`\x1F\x82\x11\x15a\n\x13W`\0\x81`\0R` `\0 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15a\x12\xDFWP\x80[`\x1F\x85\x01`\x05\x1C\x82\x01\x91P[\x81\x81\x10\x15a\x12\xFEW\x82\x81U`\x01\x01a\x12\xEBV[PPPPPPV[\x81Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x13 Wa\x13 a\x0F]V[a\x134\x81a\x13.\x84Ta\x11\xAAV[\x84a\x12\xB6V[` \x80`\x1F\x83\x11`\x01\x81\x14a\x13\x87W`\0\x84\x15a\x13QWP\x85\x83\x01Q[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x03\x86\x90\x1B\x1C\x19\x16`\x01\x85\x90\x1B\x17\x85Ua\x12\xFEV[`\0\x85\x81R` \x81 \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x86\x16\x91[\x82\x81\x10\x15a\x13\xD4W\x88\x86\x01Q\x82U\x94\x84\x01\x94`\x01\x90\x91\x01\x90\x84\x01a\x13\xB5V[P\x85\x82\x10\x15a\x14\x10W\x87\x85\x01Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x03\x88\x90\x1B`\xF8\x16\x1C\x19\x16\x81U[PPPPP`\x01\x90\x81\x1B\x01\x90UPV[`\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x87\x16\x83R\x80\x86\x16` \x84\x01RP\x83`@\x83\x01R`\x80``\x83\x01Ra\x14_`\x80\x83\x01\x84a\x0ECV[\x96\x95PPPPPPV", - ); - /// The runtime bytecode of the contract, as deployed on the network. - /// - /// ```text - ///0x6080604052600436106100dd5760003560e01c80636352211e1161007f578063a22cb46511610059578063a22cb4651461025f578063b88d4fde1461027f578063c87b56dd14610292578063e985e9c5146102b357600080fd5b80636352211e146101fc57806370a082311461021c57806395d89b411461024a57600080fd5b8063095ea7b3116100bb578063095ea7b3146101a157806323b872dd146101b657806342842e0e146101c95780634cd88b76146101dc57600080fd5b806301ffc9a7146100e257806306fdde0314610117578063081812fc14610139575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610e1f565b610309565b60405190151581526020015b60405180910390f35b34801561012357600080fd5b5061012c6103ee565b60405161010e9190610ea7565b34801561014557600080fd5b5061017c610154366004610eba565b60009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161010e565b6101b46101af366004610ef7565b610480565b005b6101b46101c4366004610f21565b6105cf565b6101b46101d7366004610f21565b6108c4565b3480156101e857600080fd5b506101b46101f7366004611040565b610a18565b34801561020857600080fd5b5061017c610217366004610eba565b610ace565b34801561022857600080fd5b5061023c6102373660046110a4565b610b5f565b60405190815260200161010e565b34801561025657600080fd5b5061012c610c07565b34801561026b57600080fd5b506101b461027a3660046110bf565b610c16565b6101b461028d3660046110fb565b610cad565b34801561029e57600080fd5b5061012c6102ad366004610eba565b50606090565b3480156102bf57600080fd5b506101026102ce366004611177565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061039c57507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806103e857507f5b5e139f000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600080546103fd906111aa565b80601f0160208091040260200160405190810160405280929190818152602001828054610429906111aa565b80156104765780601f1061044b57610100808354040283529160200191610476565b820191906000526020600020905b81548152906001019060200180831161045957829003601f168201915b5050505050905090565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16338114806104e3575073ffffffffffffffffffffffffffffffffffffffff8116600090815260056020908152604080832033845290915290205460ff165b61054e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064015b60405180910390fd5b60008281526004602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff84811691161461065f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f57524f4e475f46524f4d000000000000000000000000000000000000000000006044820152606401610545565b73ffffffffffffffffffffffffffffffffffffffff82166106dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f494e56414c49445f524543495049454e540000000000000000000000000000006044820152606401610545565b3373ffffffffffffffffffffffffffffffffffffffff84161480610730575073ffffffffffffffffffffffffffffffffffffffff8316600090815260056020908152604080832033845290915290205460ff165b8061075e575060008181526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1633145b6107c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a45440000000000000000000000000000000000006044820152606401610545565b73ffffffffffffffffffffffffffffffffffffffff831660009081526003602052604081208054916107f58361122c565b909155505073ffffffffffffffffffffffffffffffffffffffff8216600090815260036020526040812080549161082b83611261565b90915550506000818152600260209081526040808320805473ffffffffffffffffffffffffffffffffffffffff8088167fffffffffffffffffffffffff000000000000000000000000000000000000000092831681179093556004909452828520805490911690559051849391928716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6108cf8383836105cf565b813b15806109ad57506040517f150b7a020000000000000000000000000000000000000000000000000000000080825233600483015273ffffffffffffffffffffffffffffffffffffffff858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610965573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109899190611299565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b610a13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f554e534146455f524543495049454e54000000000000000000000000000000006044820152606401610545565b505050565b60065460ff1615610a85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f414c52454144595f494e495449414c495a4544000000000000000000000000006044820152606401610545565b6000610a918382611306565b506001610a9e8282611306565b5050600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905550565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1680610b5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e4f545f4d494e544544000000000000000000000000000000000000000000006044820152606401610545565b919050565b600073ffffffffffffffffffffffffffffffffffffffff8216610bde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f5a45524f5f4144445245535300000000000000000000000000000000000000006044820152606401610545565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b6060600180546103fd906111aa565b33600081815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610cb88484846105cf565b823b1580610d8257506040517f150b7a02000000000000000000000000000000000000000000000000000000008082529073ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290610d1b903390899088908890600401611420565b6020604051808303816000875af1158015610d3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5e9190611299565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b610de8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f554e534146455f524543495049454e54000000000000000000000000000000006044820152606401610545565b50505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610e1c57600080fd5b50565b600060208284031215610e3157600080fd5b8135610e3c81610dee565b9392505050565b6000815180845260005b81811015610e6957602081850181015186830182015201610e4d565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610e3c6020830184610e43565b600060208284031215610ecc57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b5a57600080fd5b60008060408385031215610f0a57600080fd5b610f1383610ed3565b946020939093013593505050565b600080600060608486031215610f3657600080fd5b610f3f84610ed3565b9250610f4d60208501610ed3565b9150604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff80841115610fa757610fa7610f5d565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610fed57610fed610f5d565b8160405280935085815286868601111561100657600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261103157600080fd5b610e3c83833560208501610f8c565b6000806040838503121561105357600080fd5b823567ffffffffffffffff8082111561106b57600080fd5b61107786838701611020565b9350602085013591508082111561108d57600080fd5b5061109a85828601611020565b9150509250929050565b6000602082840312156110b657600080fd5b610e3c82610ed3565b600080604083850312156110d257600080fd5b6110db83610ed3565b9150602083013580151581146110f057600080fd5b809150509250929050565b6000806000806080858703121561111157600080fd5b61111a85610ed3565b935061112860208601610ed3565b925060408501359150606085013567ffffffffffffffff81111561114b57600080fd5b8501601f8101871361115c57600080fd5b61116b87823560208401610f8c565b91505092959194509250565b6000806040838503121561118a57600080fd5b61119383610ed3565b91506111a160208401610ed3565b90509250929050565b600181811c908216806111be57607f821691505b6020821081036111f7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008161123b5761123b6111fd565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611292576112926111fd565b5060010190565b6000602082840312156112ab57600080fd5b8151610e3c81610dee565b601f821115610a13576000816000526020600020601f850160051c810160208610156112df5750805b601f850160051c820191505b818110156112fe578281556001016112eb565b505050505050565b815167ffffffffffffffff81111561132057611320610f5d565b6113348161132e84546111aa565b846112b6565b602080601f83116001811461138757600084156113515750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556112fe565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156113d4578886015182559484019460019091019084016113b5565b508582101561141057878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261145f6080830184610e43565b969550505050505056 - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"`\x80`@R`\x046\x10a\0\xDDW`\x005`\xE0\x1C\x80ccR!\x1E\x11a\0\x7FW\x80c\xA2,\xB4e\x11a\0YW\x80c\xA2,\xB4e\x14a\x02_W\x80c\xB8\x8DO\xDE\x14a\x02\x7FW\x80c\xC8{V\xDD\x14a\x02\x92W\x80c\xE9\x85\xE9\xC5\x14a\x02\xB3W`\0\x80\xFD[\x80ccR!\x1E\x14a\x01\xFCW\x80cp\xA0\x821\x14a\x02\x1CW\x80c\x95\xD8\x9BA\x14a\x02JW`\0\x80\xFD[\x80c\t^\xA7\xB3\x11a\0\xBBW\x80c\t^\xA7\xB3\x14a\x01\xA1W\x80c#\xB8r\xDD\x14a\x01\xB6W\x80cB\x84.\x0E\x14a\x01\xC9W\x80cL\xD8\x8Bv\x14a\x01\xDCW`\0\x80\xFD[\x80c\x01\xFF\xC9\xA7\x14a\0\xE2W\x80c\x06\xFD\xDE\x03\x14a\x01\x17W\x80c\x08\x18\x12\xFC\x14a\x019W[`\0\x80\xFD[4\x80\x15a\0\xEEW`\0\x80\xFD[Pa\x01\x02a\0\xFD6`\x04a\x0E\x1FV[a\x03\tV[`@Q\x90\x15\x15\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[4\x80\x15a\x01#W`\0\x80\xFD[Pa\x01,a\x03\xEEV[`@Qa\x01\x0E\x91\x90a\x0E\xA7V[4\x80\x15a\x01EW`\0\x80\xFD[Pa\x01|a\x01T6`\x04a\x0E\xBAV[`\0\x90\x81R`\x04` R`@\x90 Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\x01\x0EV[a\x01\xB4a\x01\xAF6`\x04a\x0E\xF7V[a\x04\x80V[\0[a\x01\xB4a\x01\xC46`\x04a\x0F!V[a\x05\xCFV[a\x01\xB4a\x01\xD76`\x04a\x0F!V[a\x08\xC4V[4\x80\x15a\x01\xE8W`\0\x80\xFD[Pa\x01\xB4a\x01\xF76`\x04a\x10@V[a\n\x18V[4\x80\x15a\x02\x08W`\0\x80\xFD[Pa\x01|a\x02\x176`\x04a\x0E\xBAV[a\n\xCEV[4\x80\x15a\x02(W`\0\x80\xFD[Pa\x02=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\t\x89\x91\x90a\x12\x99V[\x7F\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16\x14[a\n\x13W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x10`$\x82\x01R\x7FUNSAFE_RECIPIENT\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[PPPV[`\x06T`\xFF\x16\x15a\n\x85W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x13`$\x82\x01R\x7FALREADY_INITIALIZED\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[`\0a\n\x91\x83\x82a\x13\x06V[P`\x01a\n\x9E\x82\x82a\x13\x06V[PP`\x06\x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16`\x01\x17\x90UPV[`\0\x81\x81R`\x02` R`@\x90 Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x80a\x0BZW`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\n`$\x82\x01R\x7FNOT_MINTED\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[\x91\x90PV[`\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16a\x0B\xDEW`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x0C`$\x82\x01R\x7FZERO_ADDRESS\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0\x90\x81R`\x03` R`@\x90 T\x90V[```\x01\x80Ta\x03\xFD\x90a\x11\xAAV[3`\0\x81\x81R`\x05` \x90\x81R`@\x80\x83 s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x87\x16\x80\x85R\x90\x83R\x92\x81\x90 \x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16\x86\x15\x15\x90\x81\x17\x90\x91U\x90Q\x90\x81R\x91\x92\x91\x7F\x170~\xAB9\xABa\x07\xE8\x89\x98E\xAD=Y\xBD\x96S\xF2\0\xF2 \x92\x04\x89\xCA+Y7il1\x91\x01`@Q\x80\x91\x03\x90\xA3PPV[a\x0C\xB8\x84\x84\x84a\x05\xCFV[\x82;\x15\x80a\r\x82WP`@Q\x7F\x15\x0Bz\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x80\x82R\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x16\x90c\x15\x0Bz\x02\x90a\r\x1B\x903\x90\x89\x90\x88\x90\x88\x90`\x04\x01a\x14 V[` `@Q\x80\x83\x03\x81`\0\x87Z\xF1\x15\x80\x15a\r:W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\r^\x91\x90a\x12\x99V[\x7F\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16\x14[a\r\xE8W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x10`$\x82\x01R\x7FUNSAFE_RECIPIENT\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[PPPPV[\x7F\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81\x16\x81\x14a\x0E\x1CW`\0\x80\xFD[PV[`\0` \x82\x84\x03\x12\x15a\x0E1W`\0\x80\xFD[\x815a\x0E<\x81a\r\xEEV[\x93\x92PPPV[`\0\x81Q\x80\x84R`\0[\x81\x81\x10\x15a\x0EiW` \x81\x85\x01\x81\x01Q\x86\x83\x01\x82\x01R\x01a\x0EMV[P`\0` \x82\x86\x01\x01R` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F\x83\x01\x16\x85\x01\x01\x91PP\x92\x91PPV[` \x81R`\0a\x0E<` \x83\x01\x84a\x0ECV[`\0` \x82\x84\x03\x12\x15a\x0E\xCCW`\0\x80\xFD[P5\x91\x90PV[\x805s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x0BZW`\0\x80\xFD[`\0\x80`@\x83\x85\x03\x12\x15a\x0F\nW`\0\x80\xFD[a\x0F\x13\x83a\x0E\xD3V[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80`\0``\x84\x86\x03\x12\x15a\x0F6W`\0\x80\xFD[a\x0F?\x84a\x0E\xD3V[\x92Pa\x0FM` \x85\x01a\x0E\xD3V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[`\0g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x84\x11\x15a\x0F\xA7Wa\x0F\xA7a\x0F]V[`@Q`\x1F\x85\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\x0F\xEDWa\x0F\xEDa\x0F]V[\x81`@R\x80\x93P\x85\x81R\x86\x86\x86\x01\x11\x15a\x10\x06W`\0\x80\xFD[\x85\x85` \x83\x017`\0` \x87\x83\x01\x01RPPP\x93\x92PPPV[`\0\x82`\x1F\x83\x01\x12a\x101W`\0\x80\xFD[a\x0E<\x83\x835` \x85\x01a\x0F\x8CV[`\0\x80`@\x83\x85\x03\x12\x15a\x10SW`\0\x80\xFD[\x825g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x10kW`\0\x80\xFD[a\x10w\x86\x83\x87\x01a\x10 V[\x93P` \x85\x015\x91P\x80\x82\x11\x15a\x10\x8DW`\0\x80\xFD[Pa\x10\x9A\x85\x82\x86\x01a\x10 V[\x91PP\x92P\x92\x90PV[`\0` \x82\x84\x03\x12\x15a\x10\xB6W`\0\x80\xFD[a\x0E<\x82a\x0E\xD3V[`\0\x80`@\x83\x85\x03\x12\x15a\x10\xD2W`\0\x80\xFD[a\x10\xDB\x83a\x0E\xD3V[\x91P` \x83\x015\x80\x15\x15\x81\x14a\x10\xF0W`\0\x80\xFD[\x80\x91PP\x92P\x92\x90PV[`\0\x80`\0\x80`\x80\x85\x87\x03\x12\x15a\x11\x11W`\0\x80\xFD[a\x11\x1A\x85a\x0E\xD3V[\x93Pa\x11(` \x86\x01a\x0E\xD3V[\x92P`@\x85\x015\x91P``\x85\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x11KW`\0\x80\xFD[\x85\x01`\x1F\x81\x01\x87\x13a\x11\\W`\0\x80\xFD[a\x11k\x87\x825` \x84\x01a\x0F\x8CV[\x91PP\x92\x95\x91\x94P\x92PV[`\0\x80`@\x83\x85\x03\x12\x15a\x11\x8AW`\0\x80\xFD[a\x11\x93\x83a\x0E\xD3V[\x91Pa\x11\xA1` \x84\x01a\x0E\xD3V[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x11\xBEW`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x11\xF7W\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\x11`\x04R`$`\0\xFD[`\0\x81a\x12;Wa\x12;a\x11\xFDV[P\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01\x90V[`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x03a\x12\x92Wa\x12\x92a\x11\xFDV[P`\x01\x01\x90V[`\0` \x82\x84\x03\x12\x15a\x12\xABW`\0\x80\xFD[\x81Qa\x0E<\x81a\r\xEEV[`\x1F\x82\x11\x15a\n\x13W`\0\x81`\0R` `\0 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15a\x12\xDFWP\x80[`\x1F\x85\x01`\x05\x1C\x82\x01\x91P[\x81\x81\x10\x15a\x12\xFEW\x82\x81U`\x01\x01a\x12\xEBV[PPPPPPV[\x81Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x13 Wa\x13 a\x0F]V[a\x134\x81a\x13.\x84Ta\x11\xAAV[\x84a\x12\xB6V[` \x80`\x1F\x83\x11`\x01\x81\x14a\x13\x87W`\0\x84\x15a\x13QWP\x85\x83\x01Q[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x03\x86\x90\x1B\x1C\x19\x16`\x01\x85\x90\x1B\x17\x85Ua\x12\xFEV[`\0\x85\x81R` \x81 \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x86\x16\x91[\x82\x81\x10\x15a\x13\xD4W\x88\x86\x01Q\x82U\x94\x84\x01\x94`\x01\x90\x91\x01\x90\x84\x01a\x13\xB5V[P\x85\x82\x10\x15a\x14\x10W\x87\x85\x01Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x03\x88\x90\x1B`\xF8\x16\x1C\x19\x16\x81U[PPPPP`\x01\x90\x81\x1B\x01\x90UPV[`\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x87\x16\x83R\x80\x86\x16` \x84\x01RP\x83`@\x83\x01R`\x80``\x83\x01Ra\x14_`\x80\x83\x01\x84a\x0ECV[\x96\x95PPPPPPV", - ); - /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. - ```solidity - event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct Approval { - #[allow(missing_docs)] - pub _owner: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _approved: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _tokenId: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for Approval { - type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = ( - alloy_sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - const SIGNATURE: &'static str = "Approval(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, - 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, - 91u8, 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { - _owner: topics.1, - _approved: topics.2, - _tokenId: topics.3, - } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - () - } - #[inline] - fn topics(&self) -> ::RustType { - ( - Self::SIGNATURE_HASH.into(), - self._owner.clone(), - self._approved.clone(), - self._tokenId.clone(), - ) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - out[1usize] = ::encode_topic( - &self._owner, - ); - out[2usize] = ::encode_topic( - &self._approved, - ); - out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self._tokenId); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for Approval { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&Approval> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &Approval) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Event with signature `ApprovalForAll(address,address,bool)` and selector `0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31`. - ```solidity - event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct ApprovalForAll { - #[allow(missing_docs)] - pub _owner: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _operator: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _approved: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for ApprovalForAll { - type DataTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = ( - alloy_sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - const SIGNATURE: &'static str = "ApprovalForAll(address,address,bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 23u8, 48u8, 126u8, 171u8, 57u8, 171u8, 97u8, 7u8, 232u8, 137u8, 152u8, 69u8, - 173u8, 61u8, 89u8, 189u8, 150u8, 83u8, 242u8, 0u8, 242u8, 32u8, 146u8, 4u8, - 137u8, 202u8, 43u8, 89u8, 55u8, 105u8, 108u8, 49u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { - _owner: topics.1, - _operator: topics.2, - _approved: data.0, - } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - ( - ::tokenize( - &self._approved, - ), - ) - } - #[inline] - fn topics(&self) -> ::RustType { - ( - Self::SIGNATURE_HASH.into(), - self._owner.clone(), - self._operator.clone(), - ) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - out[1usize] = ::encode_topic( - &self._owner, - ); - out[2usize] = ::encode_topic( - &self._operator, - ); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for ApprovalForAll { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&ApprovalForAll> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &ApprovalForAll) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. - ```solidity - event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct Transfer { - #[allow(missing_docs)] - pub _from: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _to: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub _tokenId: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for Transfer { - type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = ( - alloy_sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, - 104u8, 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, - 161u8, 22u8, 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { - _from: topics.1, - _to: topics.2, - _tokenId: topics.3, - } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - () - } - #[inline] - fn topics(&self) -> ::RustType { - ( - Self::SIGNATURE_HASH.into(), - self._from.clone(), - self._to.clone(), - self._tokenId.clone(), - ) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - out[1usize] = ::encode_topic( - &self._from, - ); - out[2usize] = ::encode_topic( - &self._to, - ); - out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self._tokenId); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for Transfer { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&Transfer> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &Transfer) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. - ```solidity - function approve(address spender, uint256 id) external payable; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct approveCall { - pub spender: alloy::sol_types::private::Address, - pub id: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct approveReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: approveCall) -> Self { - (value.spender, value.id) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for approveCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - spender: tuple.0, - id: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: approveReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for approveReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for approveCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = approveReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "approve(address,uint256)"; - const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.spender, - ), - as alloy_sol_types::SolType>::tokenize( - &self.id, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `balanceOf(address)` and selector `0x70a08231`. - ```solidity - function balanceOf(address owner) external view returns (uint256); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct balanceOfCall { - pub owner: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct balanceOfReturn { - pub _0: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: balanceOfCall) -> Self { - (value.owner,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for balanceOfCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { owner: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: balanceOfReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for balanceOfReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for balanceOfCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = balanceOfReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "balanceOf(address)"; - const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.owner, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `getApproved(uint256)` and selector `0x081812fc`. - ```solidity - function getApproved(uint256 id) external view returns (address); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct getApprovedCall { - pub id: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`getApproved(uint256)`](getApprovedCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct getApprovedReturn { - pub _0: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getApprovedCall) -> Self { - (value.id,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for getApprovedCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { id: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getApprovedReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for getApprovedReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for getApprovedCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = getApprovedReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getApproved(uint256)"; - const SELECTOR: [u8; 4] = [8u8, 24u8, 18u8, 252u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self.id, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `initialize(string,string)` and selector `0x4cd88b76`. - ```solidity - function initialize(string memory name_, string memory symbol_) external; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct initializeCall { - pub name_: alloy::sol_types::private::String, - pub symbol_: alloy::sol_types::private::String, - } - ///Container type for the return parameters of the [`initialize(string,string)`](initializeCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct initializeReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::String, - alloy::sol_types::sol_data::String, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::String, - alloy::sol_types::private::String, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: initializeCall) -> Self { - (value.name_, value.symbol_) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for initializeCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - name_: tuple.0, - symbol_: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: initializeReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for initializeReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for initializeCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::String, - alloy::sol_types::sol_data::String, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = initializeReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "initialize(string,string)"; - const SELECTOR: [u8; 4] = [76u8, 216u8, 139u8, 118u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.name_, - ), - ::tokenize( - &self.symbol_, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`. - ```solidity - function isApprovedForAll(address owner, address operator) external view returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct isApprovedForAllCall { - pub owner: alloy::sol_types::private::Address, - pub operator: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`isApprovedForAll(address,address)`](isApprovedForAllCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct isApprovedForAllReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: isApprovedForAllCall) -> Self { - (value.owner, value.operator) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for isApprovedForAllCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - owner: tuple.0, - operator: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: isApprovedForAllReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for isApprovedForAllReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for isApprovedForAllCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = isApprovedForAllReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "isApprovedForAll(address,address)"; - const SELECTOR: [u8; 4] = [233u8, 133u8, 233u8, 197u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.owner, - ), - ::tokenize( - &self.operator, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `name()` and selector `0x06fdde03`. - ```solidity - function name() external view returns (string memory); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct nameCall {} - ///Container type for the return parameters of the [`name()`](nameCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct nameReturn { - pub _0: alloy::sol_types::private::String, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: nameCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for nameCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: nameReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for nameReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for nameCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = nameReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "name()"; - const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `ownerOf(uint256)` and selector `0x6352211e`. - ```solidity - function ownerOf(uint256 id) external view returns (address owner); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct ownerOfCall { - pub id: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`ownerOf(uint256)`](ownerOfCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct ownerOfReturn { - pub owner: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: ownerOfCall) -> Self { - (value.id,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for ownerOfCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { id: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: ownerOfReturn) -> Self { - (value.owner,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for ownerOfReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { owner: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for ownerOfCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = ownerOfReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ownerOf(uint256)"; - const SELECTOR: [u8; 4] = [99u8, 82u8, 33u8, 30u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self.id, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e`. - ```solidity - function safeTransferFrom(address from, address to, uint256 id) external payable; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct safeTransferFrom_0Call { - pub from: alloy::sol_types::private::Address, - pub to: alloy::sol_types::private::Address, - pub id: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`safeTransferFrom(address,address,uint256)`](safeTransferFrom_0Call) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct safeTransferFrom_0Return {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: safeTransferFrom_0Call) -> Self { - (value.from, value.to, value.id) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for safeTransferFrom_0Call { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - from: tuple.0, - to: tuple.1, - id: tuple.2, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: safeTransferFrom_0Return) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for safeTransferFrom_0Return { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for safeTransferFrom_0Call { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = safeTransferFrom_0Return; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256)"; - const SELECTOR: [u8; 4] = [66u8, 132u8, 46u8, 14u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.from, - ), - ::tokenize( - &self.to, - ), - as alloy_sol_types::SolType>::tokenize( - &self.id, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde`. - ```solidity - function safeTransferFrom(address from, address to, uint256 id, bytes memory data) external payable; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct safeTransferFrom_1Call { - pub from: alloy::sol_types::private::Address, - pub to: alloy::sol_types::private::Address, - pub id: alloy::sol_types::private::U256, - pub data: alloy::sol_types::private::Bytes, - } - ///Container type for the return parameters of the [`safeTransferFrom(address,address,uint256,bytes)`](safeTransferFrom_1Call) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct safeTransferFrom_1Return {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - alloy::sol_types::sol_data::Bytes, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - alloy::sol_types::private::Bytes, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: safeTransferFrom_1Call) -> Self { - (value.from, value.to, value.id, value.data) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for safeTransferFrom_1Call { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - from: tuple.0, - to: tuple.1, - id: tuple.2, - data: tuple.3, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: safeTransferFrom_1Return) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for safeTransferFrom_1Return { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for safeTransferFrom_1Call { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - alloy::sol_types::sol_data::Bytes, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = safeTransferFrom_1Return; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256,bytes)"; - const SELECTOR: [u8; 4] = [184u8, 141u8, 79u8, 222u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.from, - ), - ::tokenize( - &self.to, - ), - as alloy_sol_types::SolType>::tokenize( - &self.id, - ), - ::tokenize( - &self.data, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465`. - ```solidity - function setApprovalForAll(address operator, bool approved) external; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct setApprovalForAllCall { - pub operator: alloy::sol_types::private::Address, - pub approved: bool, - } - ///Container type for the return parameters of the [`setApprovalForAll(address,bool)`](setApprovalForAllCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct setApprovalForAllReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Bool, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address, bool); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: setApprovalForAllCall) -> Self { - (value.operator, value.approved) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for setApprovalForAllCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - operator: tuple.0, - approved: tuple.1, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: setApprovalForAllReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for setApprovalForAllReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for setApprovalForAllCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Bool, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = setApprovalForAllReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "setApprovalForAll(address,bool)"; - const SELECTOR: [u8; 4] = [162u8, 44u8, 180u8, 101u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.operator, - ), - ::tokenize( - &self.approved, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`. - ```solidity - function supportsInterface(bytes4 interfaceId) external view returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct supportsInterfaceCall { - pub interfaceId: alloy::sol_types::private::FixedBytes<4>, - } - ///Container type for the return parameters of the [`supportsInterface(bytes4)`](supportsInterfaceCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct supportsInterfaceReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: supportsInterfaceCall) -> Self { - (value.interfaceId,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for supportsInterfaceCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - interfaceId: tuple.0, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: supportsInterfaceReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for supportsInterfaceReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for supportsInterfaceCall { - type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = supportsInterfaceReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "supportsInterface(bytes4)"; - const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize(&self.interfaceId), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `symbol()` and selector `0x95d89b41`. - ```solidity - function symbol() external view returns (string memory); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct symbolCall {} - ///Container type for the return parameters of the [`symbol()`](symbolCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct symbolReturn { - pub _0: alloy::sol_types::private::String, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: symbolCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for symbolCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: symbolReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for symbolReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for symbolCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = symbolReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "symbol()"; - const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `tokenURI(uint256)` and selector `0xc87b56dd`. - ```solidity - function tokenURI(uint256 id) external view returns (string memory); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct tokenURICall { - pub id: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`tokenURI(uint256)`](tokenURICall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct tokenURIReturn { - pub _0: alloy::sol_types::private::String, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: tokenURICall) -> Self { - (value.id,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for tokenURICall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { id: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: tokenURIReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for tokenURIReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for tokenURICall { - type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = tokenURIReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "tokenURI(uint256)"; - const SELECTOR: [u8; 4] = [200u8, 123u8, 86u8, 221u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self.id, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. - ```solidity - function transferFrom(address from, address to, uint256 id) external payable; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferFromCall { - pub from: alloy::sol_types::private::Address, - pub to: alloy::sol_types::private::Address, - pub id: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferFromReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Address, - alloy::sol_types::private::Address, - alloy::sol_types::private::U256, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferFromCall) -> Self { - (value.from, value.to, value.id) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferFromCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - from: tuple.0, - to: tuple.1, - id: tuple.2, - } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferFromReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferFromReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for transferFromCall { - type Parameters<'a> = ( - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Uint<256>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = transferFromReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; - const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.from, - ), - ::tokenize( - &self.to, - ), - as alloy_sol_types::SolType>::tokenize( - &self.id, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - ///Container for all the [`MockERC721`](self) function calls. - pub enum MockERC721Calls { - approve(approveCall), - balanceOf(balanceOfCall), - getApproved(getApprovedCall), - initialize(initializeCall), - isApprovedForAll(isApprovedForAllCall), - name(nameCall), - ownerOf(ownerOfCall), - safeTransferFrom_0(safeTransferFrom_0Call), - safeTransferFrom_1(safeTransferFrom_1Call), - setApprovalForAll(setApprovalForAllCall), - supportsInterface(supportsInterfaceCall), - symbol(symbolCall), - tokenURI(tokenURICall), - transferFrom(transferFromCall), - } - #[automatically_derived] - impl MockERC721Calls { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = &[ - [1u8, 255u8, 201u8, 167u8], - [6u8, 253u8, 222u8, 3u8], - [8u8, 24u8, 18u8, 252u8], - [9u8, 94u8, 167u8, 179u8], - [35u8, 184u8, 114u8, 221u8], - [66u8, 132u8, 46u8, 14u8], - [76u8, 216u8, 139u8, 118u8], - [99u8, 82u8, 33u8, 30u8], - [112u8, 160u8, 130u8, 49u8], - [149u8, 216u8, 155u8, 65u8], - [162u8, 44u8, 180u8, 101u8], - [184u8, 141u8, 79u8, 222u8], - [200u8, 123u8, 86u8, 221u8], - [233u8, 133u8, 233u8, 197u8], - ]; - } - #[automatically_derived] - impl alloy_sol_types::SolInterface for MockERC721Calls { - const NAME: &'static str = "MockERC721Calls"; - const MIN_DATA_LENGTH: usize = 0usize; - const COUNT: usize = 14usize; - #[inline] - fn selector(&self) -> [u8; 4] { - match self { - Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => ::SELECTOR, - Self::getApproved(_) => ::SELECTOR, - Self::initialize(_) => ::SELECTOR, - Self::isApprovedForAll(_) => { - ::SELECTOR - } - Self::name(_) => ::SELECTOR, - Self::ownerOf(_) => ::SELECTOR, - Self::safeTransferFrom_0(_) => { - ::SELECTOR - } - Self::safeTransferFrom_1(_) => { - ::SELECTOR - } - Self::setApprovalForAll(_) => { - ::SELECTOR - } - Self::supportsInterface(_) => { - ::SELECTOR - } - Self::symbol(_) => ::SELECTOR, - Self::tokenURI(_) => ::SELECTOR, - Self::transferFrom(_) => ::SELECTOR, - } - } - #[inline] - fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { - Self::SELECTORS.get(i).copied() - } - #[inline] - fn valid_selector(selector: [u8; 4]) -> bool { - Self::SELECTORS.binary_search(&selector).is_ok() - } - #[inline] - #[allow(unsafe_code, non_snake_case)] - fn abi_decode_raw( - selector: [u8; 4], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = &[ - { - fn supportsInterface( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(MockERC721Calls::supportsInterface) - } - supportsInterface - }, - { - fn name( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(MockERC721Calls::name) - } - name - }, - { - fn getApproved( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(MockERC721Calls::getApproved) - } - getApproved - }, - { - fn approve( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(MockERC721Calls::approve) - } - approve - }, - { - fn transferFrom( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(MockERC721Calls::transferFrom) - } - transferFrom - }, - { - fn safeTransferFrom_0( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(MockERC721Calls::safeTransferFrom_0) - } - safeTransferFrom_0 - }, - { - fn initialize( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(MockERC721Calls::initialize) - } - initialize - }, - { - fn ownerOf( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(MockERC721Calls::ownerOf) - } - ownerOf - }, - { - fn balanceOf( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(MockERC721Calls::balanceOf) - } - balanceOf - }, - { - fn symbol( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(MockERC721Calls::symbol) - } - symbol - }, - { - fn setApprovalForAll( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(MockERC721Calls::setApprovalForAll) - } - setApprovalForAll - }, - { - fn safeTransferFrom_1( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(MockERC721Calls::safeTransferFrom_1) - } - safeTransferFrom_1 - }, - { - fn tokenURI( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(MockERC721Calls::tokenURI) - } - tokenURI - }, - { - fn isApprovedForAll( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(MockERC721Calls::isApprovedForAll) - } - isApprovedForAll - }, - ]; - let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err(alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - )); - }; - (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) - } - #[inline] - fn abi_encoded_size(&self) -> usize { - match self { - Self::approve(inner) => { - ::abi_encoded_size(inner) - } - Self::balanceOf(inner) => { - ::abi_encoded_size(inner) - } - Self::getApproved(inner) => { - ::abi_encoded_size(inner) - } - Self::initialize(inner) => { - ::abi_encoded_size(inner) - } - Self::isApprovedForAll(inner) => { - ::abi_encoded_size(inner) - } - Self::name(inner) => { - ::abi_encoded_size(inner) - } - Self::ownerOf(inner) => { - ::abi_encoded_size(inner) - } - Self::safeTransferFrom_0(inner) => { - ::abi_encoded_size(inner) - } - Self::safeTransferFrom_1(inner) => { - ::abi_encoded_size(inner) - } - Self::setApprovalForAll(inner) => { - ::abi_encoded_size(inner) - } - Self::supportsInterface(inner) => { - ::abi_encoded_size(inner) - } - Self::symbol(inner) => { - ::abi_encoded_size(inner) - } - Self::tokenURI(inner) => { - ::abi_encoded_size(inner) - } - Self::transferFrom(inner) => { - ::abi_encoded_size(inner) - } - } - } - #[inline] - fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { - match self { - Self::approve(inner) => { - ::abi_encode_raw(inner, out) - } - Self::balanceOf(inner) => { - ::abi_encode_raw(inner, out) - } - Self::getApproved(inner) => { - ::abi_encode_raw(inner, out) - } - Self::initialize(inner) => { - ::abi_encode_raw(inner, out) - } - Self::isApprovedForAll(inner) => { - ::abi_encode_raw(inner, out) - } - Self::name(inner) => { - ::abi_encode_raw(inner, out) - } - Self::ownerOf(inner) => { - ::abi_encode_raw(inner, out) - } - Self::safeTransferFrom_0(inner) => { - ::abi_encode_raw(inner, out) - } - Self::safeTransferFrom_1(inner) => { - ::abi_encode_raw(inner, out) - } - Self::setApprovalForAll(inner) => { - ::abi_encode_raw(inner, out) - } - Self::supportsInterface(inner) => { - ::abi_encode_raw(inner, out) - } - Self::symbol(inner) => { - ::abi_encode_raw(inner, out) - } - Self::tokenURI(inner) => { - ::abi_encode_raw(inner, out) - } - Self::transferFrom(inner) => { - ::abi_encode_raw(inner, out) - } - } - } - } - ///Container for all the [`MockERC721`](self) events. - pub enum MockERC721Events { - Approval(Approval), - ApprovalForAll(ApprovalForAll), - Transfer(Transfer), - } - #[automatically_derived] - impl MockERC721Events { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 32usize]] = &[ - [ - 23u8, 48u8, 126u8, 171u8, 57u8, 171u8, 97u8, 7u8, 232u8, 137u8, 152u8, 69u8, 173u8, - 61u8, 89u8, 189u8, 150u8, 83u8, 242u8, 0u8, 242u8, 32u8, 146u8, 4u8, 137u8, 202u8, - 43u8, 89u8, 55u8, 105u8, 108u8, 49u8, - ], - [ - 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, - 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, 91u8, - 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, - ], - [ - 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, 104u8, - 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, 161u8, 22u8, - 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, - ], - ]; - } - #[automatically_derived] - impl alloy_sol_types::SolEventInterface for MockERC721Events { - const NAME: &'static str = "MockERC721Events"; - const COUNT: usize = 3usize; - fn decode_raw_log( - topics: &[alloy_sol_types::Word], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - match topics.first().copied() { - Some(::SIGNATURE_HASH) => { - ::decode_raw_log(topics, data, validate) - .map(Self::Approval) - } - Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, data, validate, - ) - .map(Self::ApprovalForAll) - } - Some(::SIGNATURE_HASH) => { - ::decode_raw_log(topics, data, validate) - .map(Self::Transfer) - } - _ => alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { - name: ::NAME, - log: alloy_sol_types::private::Box::new( - alloy_sol_types::private::LogData::new_unchecked( - topics.to_vec(), - data.to_vec().into(), - ), - ), - }), - } - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for MockERC721Events { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - match self { - Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), - Self::ApprovalForAll(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } - Self::Transfer(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), - } - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - match self { - Self::Approval(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::ApprovalForAll(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::Transfer(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - } - } - } - use alloy::contract as alloy_contract; - /**Creates a new wrapper around an on-chain [`MockERC721`](self) contract instance. - - See the [wrapper's documentation](`MockERC721Instance`) for more details.*/ - #[inline] - pub const fn new< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - address: alloy_sol_types::private::Address, - provider: P, - ) -> MockERC721Instance { - MockERC721Instance::::new(address, provider) - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub fn deploy< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> impl ::core::future::Future>> - { - MockERC721Instance::::deploy(provider) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> alloy_contract::RawCallBuilder { - MockERC721Instance::::deploy_builder(provider) - } - /**A [`MockERC721`](self) instance. - - Contains type-safe methods for interacting with an on-chain instance of the - [`MockERC721`](self) contract located at a given `address`, using a given - provider `P`. - - If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) - documentation on how to provide it), the `deploy` and `deploy_builder` methods can - be used to deploy a new instance of the contract. - - See the [module-level documentation](self) for all the available methods.*/ - #[derive(Clone)] - pub struct MockERC721Instance { - address: alloy_sol_types::private::Address, - provider: P, - _network_transport: ::core::marker::PhantomData<(N, T)>, - } - #[automatically_derived] - impl ::core::fmt::Debug for MockERC721Instance { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("MockERC721Instance") - .field(&self.address) - .finish() - } - } - /// Instantiation and getters/setters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockERC721Instance - { - /**Creates a new wrapper around an on-chain [`MockERC721`](self) contract instance. - - See the [wrapper's documentation](`MockERC721Instance`) for more details.*/ - #[inline] - pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { - Self { - address, - provider, - _network_transport: ::core::marker::PhantomData, - } - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub async fn deploy(provider: P) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder(provider); - let contract_address = call_builder.deploy().await?; - Ok(Self::new(contract_address, call_builder.provider)) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { - alloy_contract::RawCallBuilder::new_raw_deploy( - provider, - ::core::clone::Clone::clone(&BYTECODE), - ) - } - /// Returns a reference to the address. - #[inline] - pub const fn address(&self) -> &alloy_sol_types::private::Address { - &self.address - } - /// Sets the address. - #[inline] - pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { - self.address = address; - } - /// Sets the address and returns `self`. - pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { - self.set_address(address); - self - } - /// Returns a reference to the provider. - #[inline] - pub const fn provider(&self) -> &P { - &self.provider - } - } - impl MockERC721Instance { - /// Clones the provider and returns a new instance with the cloned provider. - #[inline] - pub fn with_cloned_provider(self) -> MockERC721Instance { - MockERC721Instance { - address: self.address, - provider: ::core::clone::Clone::clone(&self.provider), - _network_transport: ::core::marker::PhantomData, - } - } - } - /// Function calls. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockERC721Instance - { - /// Creates a new call builder using this contract instance's provider and address. - /// - /// Note that the call can be any function call, not just those defined in this - /// contract. Prefer using the other methods for building type-safe contract calls. - pub fn call_builder( - &self, - call: &C, - ) -> alloy_contract::SolCallBuilder { - alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) - } - ///Creates a new call builder for the [`approve`] function. - pub fn approve( - &self, - spender: alloy::sol_types::private::Address, - id: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&approveCall { spender, id }) - } - ///Creates a new call builder for the [`balanceOf`] function. - pub fn balanceOf( - &self, - owner: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&balanceOfCall { owner }) - } - ///Creates a new call builder for the [`getApproved`] function. - pub fn getApproved( - &self, - id: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&getApprovedCall { id }) - } - ///Creates a new call builder for the [`initialize`] function. - pub fn initialize( - &self, - name_: alloy::sol_types::private::String, - symbol_: alloy::sol_types::private::String, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&initializeCall { name_, symbol_ }) - } - ///Creates a new call builder for the [`isApprovedForAll`] function. - pub fn isApprovedForAll( - &self, - owner: alloy::sol_types::private::Address, - operator: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&isApprovedForAllCall { owner, operator }) - } - ///Creates a new call builder for the [`name`] function. - pub fn name(&self) -> alloy_contract::SolCallBuilder { - self.call_builder(&nameCall {}) - } - ///Creates a new call builder for the [`ownerOf`] function. - pub fn ownerOf( - &self, - id: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&ownerOfCall { id }) - } - ///Creates a new call builder for the [`safeTransferFrom_0`] function. - pub fn safeTransferFrom_0( - &self, - from: alloy::sol_types::private::Address, - to: alloy::sol_types::private::Address, - id: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&safeTransferFrom_0Call { from, to, id }) - } - ///Creates a new call builder for the [`safeTransferFrom_1`] function. - pub fn safeTransferFrom_1( - &self, - from: alloy::sol_types::private::Address, - to: alloy::sol_types::private::Address, - id: alloy::sol_types::private::U256, - data: alloy::sol_types::private::Bytes, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&safeTransferFrom_1Call { from, to, id, data }) - } - ///Creates a new call builder for the [`setApprovalForAll`] function. - pub fn setApprovalForAll( - &self, - operator: alloy::sol_types::private::Address, - approved: bool, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&setApprovalForAllCall { operator, approved }) - } - ///Creates a new call builder for the [`supportsInterface`] function. - pub fn supportsInterface( - &self, - interfaceId: alloy::sol_types::private::FixedBytes<4>, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&supportsInterfaceCall { interfaceId }) - } - ///Creates a new call builder for the [`symbol`] function. - pub fn symbol(&self) -> alloy_contract::SolCallBuilder { - self.call_builder(&symbolCall {}) - } - ///Creates a new call builder for the [`tokenURI`] function. - pub fn tokenURI( - &self, - id: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&tokenURICall { id }) - } - ///Creates a new call builder for the [`transferFrom`] function. - pub fn transferFrom( - &self, - from: alloy::sol_types::private::Address, - to: alloy::sol_types::private::Address, - id: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&transferFromCall { from, to, id }) - } - } - /// Event filters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockERC721Instance - { - /// Creates a new event filter using this contract instance's provider and address. - /// - /// Note that the type can be any event, not just those defined in this contract. - /// Prefer using the other methods for building type-safe event filters. - pub fn event_filter( - &self, - ) -> alloy_contract::Event { - alloy_contract::Event::new_sol(&self.provider, &self.address) - } - ///Creates a new event filter for the [`Approval`] event. - pub fn Approval_filter(&self) -> alloy_contract::Event { - self.event_filter::() - } - ///Creates a new event filter for the [`ApprovalForAll`] event. - pub fn ApprovalForAll_filter(&self) -> alloy_contract::Event { - self.event_filter::() - } - ///Creates a new event filter for the [`Transfer`] event. - pub fn Transfer_filter(&self) -> alloy_contract::Event { - self.event_filter::() - } - } -} diff --git a/crates/bindings/src/ownable.rs b/crates/bindings/src/ownable.rs deleted file mode 100644 index b6ba09f..0000000 --- a/crates/bindings/src/ownable.rs +++ /dev/null @@ -1,1148 +0,0 @@ -/** - -Generated by the following Solidity interface... -```solidity -interface Ownable { - error OwnableInvalidOwner(address owner); - error OwnableUnauthorizedAccount(address account); - - event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); - - function owner() external view returns (address); - function renounceOwnership() external; - function transferOwnership(address newOwner) external; -} -``` - -...which was generated by the following JSON ABI: -```json -[ - { - "type": "function", - "name": "owner", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "renounceOwnership", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transferOwnership", - "inputs": [ - { - "name": "newOwner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "OwnershipTransferred", - "inputs": [ - { - "name": "previousOwner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newOwner", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "OwnableInvalidOwner", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "OwnableUnauthorizedAccount", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] - } -] -```*/ -#[allow(non_camel_case_types, non_snake_case, clippy::style)] -pub mod Ownable { - use super::*; - use alloy::sol_types as alloy_sol_types; - /// The creation / init bytecode of the contract. - /// - /// ```text - ///0x - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"", - ); - /// The runtime bytecode of the contract, as deployed on the network. - /// - /// ```text - ///0x - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"", - ); - /**Custom error with signature `OwnableInvalidOwner(address)` and selector `0x1e4fbdf7`. - ```solidity - error OwnableInvalidOwner(address owner); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct OwnableInvalidOwner { - pub owner: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: OwnableInvalidOwner) -> Self { - (value.owner,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for OwnableInvalidOwner { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { owner: tuple.0 } - } - } - #[automatically_derived] - impl alloy_sol_types::SolError for OwnableInvalidOwner { - type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "OwnableInvalidOwner(address)"; - const SELECTOR: [u8; 4] = [30u8, 79u8, 189u8, 247u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.owner, - ), - ) - } - } - }; - /**Custom error with signature `OwnableUnauthorizedAccount(address)` and selector `0x118cdaa7`. - ```solidity - error OwnableUnauthorizedAccount(address account); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct OwnableUnauthorizedAccount { - pub account: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: OwnableUnauthorizedAccount) -> Self { - (value.account,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for OwnableUnauthorizedAccount { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { account: tuple.0 } - } - } - #[automatically_derived] - impl alloy_sol_types::SolError for OwnableUnauthorizedAccount { - type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "OwnableUnauthorizedAccount(address)"; - const SELECTOR: [u8; 4] = [17u8, 140u8, 218u8, 167u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.account, - ), - ) - } - } - }; - /**Event with signature `OwnershipTransferred(address,address)` and selector `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0`. - ```solidity - event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct OwnershipTransferred { - #[allow(missing_docs)] - pub previousOwner: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub newOwner: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for OwnershipTransferred { - type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = ( - alloy_sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - const SIGNATURE: &'static str = "OwnershipTransferred(address,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 139u8, 224u8, 7u8, 156u8, 83u8, 22u8, 89u8, 20u8, 19u8, 68u8, 205u8, 31u8, - 208u8, 164u8, 242u8, 132u8, 25u8, 73u8, 127u8, 151u8, 34u8, 163u8, 218u8, - 175u8, 227u8, 180u8, 24u8, 111u8, 107u8, 100u8, 87u8, 224u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { - previousOwner: topics.1, - newOwner: topics.2, - } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - () - } - #[inline] - fn topics(&self) -> ::RustType { - ( - Self::SIGNATURE_HASH.into(), - self.previousOwner.clone(), - self.newOwner.clone(), - ) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - out[1usize] = ::encode_topic( - &self.previousOwner, - ); - out[2usize] = ::encode_topic( - &self.newOwner, - ); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for OwnershipTransferred { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&OwnershipTransferred> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &OwnershipTransferred) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Function with signature `owner()` and selector `0x8da5cb5b`. - ```solidity - function owner() external view returns (address); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct ownerCall {} - ///Container type for the return parameters of the [`owner()`](ownerCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct ownerReturn { - pub _0: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: ownerCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for ownerCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: ownerReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for ownerReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for ownerCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = ownerReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "owner()"; - const SELECTOR: [u8; 4] = [141u8, 165u8, 203u8, 91u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `renounceOwnership()` and selector `0x715018a6`. - ```solidity - function renounceOwnership() external; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct renounceOwnershipCall {} - ///Container type for the return parameters of the [`renounceOwnership()`](renounceOwnershipCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct renounceOwnershipReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: renounceOwnershipCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for renounceOwnershipCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: renounceOwnershipReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for renounceOwnershipReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for renounceOwnershipCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = renounceOwnershipReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "renounceOwnership()"; - const SELECTOR: [u8; 4] = [113u8, 80u8, 24u8, 166u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `transferOwnership(address)` and selector `0xf2fde38b`. - ```solidity - function transferOwnership(address newOwner) external; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferOwnershipCall { - pub newOwner: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`transferOwnership(address)`](transferOwnershipCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferOwnershipReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferOwnershipCall) -> Self { - (value.newOwner,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferOwnershipCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { newOwner: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferOwnershipReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferOwnershipReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for transferOwnershipCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = transferOwnershipReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "transferOwnership(address)"; - const SELECTOR: [u8; 4] = [242u8, 253u8, 227u8, 139u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.newOwner, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - ///Container for all the [`Ownable`](self) function calls. - pub enum OwnableCalls { - owner(ownerCall), - renounceOwnership(renounceOwnershipCall), - transferOwnership(transferOwnershipCall), - } - #[automatically_derived] - impl OwnableCalls { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = &[ - [113u8, 80u8, 24u8, 166u8], - [141u8, 165u8, 203u8, 91u8], - [242u8, 253u8, 227u8, 139u8], - ]; - } - #[automatically_derived] - impl alloy_sol_types::SolInterface for OwnableCalls { - const NAME: &'static str = "OwnableCalls"; - const MIN_DATA_LENGTH: usize = 0usize; - const COUNT: usize = 3usize; - #[inline] - fn selector(&self) -> [u8; 4] { - match self { - Self::owner(_) => ::SELECTOR, - Self::renounceOwnership(_) => { - ::SELECTOR - } - Self::transferOwnership(_) => { - ::SELECTOR - } - } - } - #[inline] - fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { - Self::SELECTORS.get(i).copied() - } - #[inline] - fn valid_selector(selector: [u8; 4]) -> bool { - Self::SELECTORS.binary_search(&selector).is_ok() - } - #[inline] - #[allow(unsafe_code, non_snake_case)] - fn abi_decode_raw( - selector: [u8; 4], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = &[ - { - fn renounceOwnership( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(OwnableCalls::renounceOwnership) - } - renounceOwnership - }, - { - fn owner(data: &[u8], validate: bool) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(OwnableCalls::owner) - } - owner - }, - { - fn transferOwnership( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(OwnableCalls::transferOwnership) - } - transferOwnership - }, - ]; - let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err(alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - )); - }; - (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) - } - #[inline] - fn abi_encoded_size(&self) -> usize { - match self { - Self::owner(inner) => { - ::abi_encoded_size(inner) - } - Self::renounceOwnership(inner) => { - ::abi_encoded_size(inner) - } - Self::transferOwnership(inner) => { - ::abi_encoded_size(inner) - } - } - } - #[inline] - fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { - match self { - Self::owner(inner) => { - ::abi_encode_raw(inner, out) - } - Self::renounceOwnership(inner) => { - ::abi_encode_raw(inner, out) - } - Self::transferOwnership(inner) => { - ::abi_encode_raw(inner, out) - } - } - } - } - ///Container for all the [`Ownable`](self) custom errors. - pub enum OwnableErrors { - OwnableInvalidOwner(OwnableInvalidOwner), - OwnableUnauthorizedAccount(OwnableUnauthorizedAccount), - } - #[automatically_derived] - impl OwnableErrors { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = - &[[17u8, 140u8, 218u8, 167u8], [30u8, 79u8, 189u8, 247u8]]; - } - #[automatically_derived] - impl alloy_sol_types::SolInterface for OwnableErrors { - const NAME: &'static str = "OwnableErrors"; - const MIN_DATA_LENGTH: usize = 32usize; - const COUNT: usize = 2usize; - #[inline] - fn selector(&self) -> [u8; 4] { - match self { - Self::OwnableInvalidOwner(_) => { - ::SELECTOR - } - Self::OwnableUnauthorizedAccount(_) => { - ::SELECTOR - } - } - } - #[inline] - fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { - Self::SELECTORS.get(i).copied() - } - #[inline] - fn valid_selector(selector: [u8; 4]) -> bool { - Self::SELECTORS.binary_search(&selector).is_ok() - } - #[inline] - #[allow(unsafe_code, non_snake_case)] - fn abi_decode_raw( - selector: [u8; 4], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = &[ - { - fn OwnableUnauthorizedAccount( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(OwnableErrors::OwnableUnauthorizedAccount) - } - OwnableUnauthorizedAccount - }, - { - fn OwnableInvalidOwner( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(OwnableErrors::OwnableInvalidOwner) - } - OwnableInvalidOwner - }, - ]; - let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err(alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - )); - }; - (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) - } - #[inline] - fn abi_encoded_size(&self) -> usize { - match self { - Self::OwnableInvalidOwner(inner) => { - ::abi_encoded_size(inner) - } - Self::OwnableUnauthorizedAccount(inner) => { - ::abi_encoded_size( - inner, - ) - } - } - } - #[inline] - fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { - match self { - Self::OwnableInvalidOwner(inner) => { - ::abi_encode_raw(inner, out) - } - Self::OwnableUnauthorizedAccount(inner) => { - ::abi_encode_raw( - inner, out, - ) - } - } - } - } - ///Container for all the [`Ownable`](self) events. - pub enum OwnableEvents { - OwnershipTransferred(OwnershipTransferred), - } - #[automatically_derived] - impl OwnableEvents { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 32usize]] = &[[ - 139u8, 224u8, 7u8, 156u8, 83u8, 22u8, 89u8, 20u8, 19u8, 68u8, 205u8, 31u8, 208u8, - 164u8, 242u8, 132u8, 25u8, 73u8, 127u8, 151u8, 34u8, 163u8, 218u8, 175u8, 227u8, 180u8, - 24u8, 111u8, 107u8, 100u8, 87u8, 224u8, - ]]; - } - #[automatically_derived] - impl alloy_sol_types::SolEventInterface for OwnableEvents { - const NAME: &'static str = "OwnableEvents"; - const COUNT: usize = 1usize; - fn decode_raw_log( - topics: &[alloy_sol_types::Word], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - match topics.first().copied() { - Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, data, validate, - ) - .map(Self::OwnershipTransferred) - } - _ => alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { - name: ::NAME, - log: alloy_sol_types::private::Box::new( - alloy_sol_types::private::LogData::new_unchecked( - topics.to_vec(), - data.to_vec().into(), - ), - ), - }), - } - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for OwnableEvents { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - match self { - Self::OwnershipTransferred(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } - } - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - match self { - Self::OwnershipTransferred(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - } - } - } - use alloy::contract as alloy_contract; - /**Creates a new wrapper around an on-chain [`Ownable`](self) contract instance. - - See the [wrapper's documentation](`OwnableInstance`) for more details.*/ - #[inline] - pub const fn new< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - address: alloy_sol_types::private::Address, - provider: P, - ) -> OwnableInstance { - OwnableInstance::::new(address, provider) - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub fn deploy< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> impl ::core::future::Future>> - { - OwnableInstance::::deploy(provider) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> alloy_contract::RawCallBuilder { - OwnableInstance::::deploy_builder(provider) - } - /**A [`Ownable`](self) instance. - - Contains type-safe methods for interacting with an on-chain instance of the - [`Ownable`](self) contract located at a given `address`, using a given - provider `P`. - - If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) - documentation on how to provide it), the `deploy` and `deploy_builder` methods can - be used to deploy a new instance of the contract. - - See the [module-level documentation](self) for all the available methods.*/ - #[derive(Clone)] - pub struct OwnableInstance { - address: alloy_sol_types::private::Address, - provider: P, - _network_transport: ::core::marker::PhantomData<(N, T)>, - } - #[automatically_derived] - impl ::core::fmt::Debug for OwnableInstance { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("OwnableInstance") - .field(&self.address) - .finish() - } - } - /// Instantiation and getters/setters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > OwnableInstance - { - /**Creates a new wrapper around an on-chain [`Ownable`](self) contract instance. - - See the [wrapper's documentation](`OwnableInstance`) for more details.*/ - #[inline] - pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { - Self { - address, - provider, - _network_transport: ::core::marker::PhantomData, - } - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub async fn deploy(provider: P) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder(provider); - let contract_address = call_builder.deploy().await?; - Ok(Self::new(contract_address, call_builder.provider)) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { - alloy_contract::RawCallBuilder::new_raw_deploy( - provider, - ::core::clone::Clone::clone(&BYTECODE), - ) - } - /// Returns a reference to the address. - #[inline] - pub const fn address(&self) -> &alloy_sol_types::private::Address { - &self.address - } - /// Sets the address. - #[inline] - pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { - self.address = address; - } - /// Sets the address and returns `self`. - pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { - self.set_address(address); - self - } - /// Returns a reference to the provider. - #[inline] - pub const fn provider(&self) -> &P { - &self.provider - } - } - impl OwnableInstance { - /// Clones the provider and returns a new instance with the cloned provider. - #[inline] - pub fn with_cloned_provider(self) -> OwnableInstance { - OwnableInstance { - address: self.address, - provider: ::core::clone::Clone::clone(&self.provider), - _network_transport: ::core::marker::PhantomData, - } - } - } - /// Function calls. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > OwnableInstance - { - /// Creates a new call builder using this contract instance's provider and address. - /// - /// Note that the call can be any function call, not just those defined in this - /// contract. Prefer using the other methods for building type-safe contract calls. - pub fn call_builder( - &self, - call: &C, - ) -> alloy_contract::SolCallBuilder { - alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) - } - ///Creates a new call builder for the [`owner`] function. - pub fn owner(&self) -> alloy_contract::SolCallBuilder { - self.call_builder(&ownerCall {}) - } - ///Creates a new call builder for the [`renounceOwnership`] function. - pub fn renounceOwnership( - &self, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&renounceOwnershipCall {}) - } - ///Creates a new call builder for the [`transferOwnership`] function. - pub fn transferOwnership( - &self, - newOwner: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&transferOwnershipCall { newOwner }) - } - } - /// Event filters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > OwnableInstance - { - /// Creates a new event filter using this contract instance's provider and address. - /// - /// Note that the type can be any event, not just those defined in this contract. - /// Prefer using the other methods for building type-safe event filters. - pub fn event_filter( - &self, - ) -> alloy_contract::Event { - alloy_contract::Event::new_sol(&self.provider, &self.address) - } - ///Creates a new event filter for the [`OwnershipTransferred`] event. - pub fn OwnershipTransferred_filter( - &self, - ) -> alloy_contract::Event { - self.event_filter::() - } - } -} diff --git a/crates/bindings/src/sckeystore.rs b/crates/bindings/src/sckeystore.rs deleted file mode 100644 index 09b7b21..0000000 --- a/crates/bindings/src/sckeystore.rs +++ /dev/null @@ -1,2087 +0,0 @@ -/** - -Generated by the following Solidity interface... -```solidity -interface ScKeystore { - error OwnableInvalidOwner(address owner); - error OwnableUnauthorizedAccount(address account); - error UserAlreadyExists(); - error UserDoesNotExist(); - - event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); - event UserAdded(address user); - event UserRemoved(address user); - - constructor(address initialOwner); - - function addUser(address user) external; - function owner() external view returns (address); - function removeUser(address user) external; - function renounceOwnership() external; - function transferOwnership(address newOwner) external; - function userExists(address user) external view returns (bool); -} -``` - -...which was generated by the following JSON ABI: -```json -[ - { - "type": "constructor", - "inputs": [ - { - "name": "initialOwner", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "addUser", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "owner", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "removeUser", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "renounceOwnership", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transferOwnership", - "inputs": [ - { - "name": "newOwner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "userExists", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "event", - "name": "OwnershipTransferred", - "inputs": [ - { - "name": "previousOwner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newOwner", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "UserAdded", - "inputs": [ - { - "name": "user", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "UserRemoved", - "inputs": [ - { - "name": "user", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "OwnableInvalidOwner", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "OwnableUnauthorizedAccount", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "UserAlreadyExists", - "inputs": [] - }, - { - "type": "error", - "name": "UserDoesNotExist", - "inputs": [] - } -] -```*/ -#[allow(non_camel_case_types, non_snake_case, clippy::style)] -pub mod ScKeystore { - use super::*; - use alloy::sol_types as alloy_sol_types; - /// The creation / init bytecode of the contract. - /// - /// ```text - ///0x608060405234801561001057600080fd5b5060405161055638038061055683398101604081905261002f916100be565b806001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161006e565b50506100ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100d057600080fd5b81516001600160a01b03811681146100e757600080fd5b9392505050565b610459806100fd6000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c80638da5cb5b116100505780638da5cb5b146100e2578063985751881461010a578063f2fde38b1461011d57600080fd5b80630e666e4914610077578063421b2d8b146100c5578063715018a6146100da575b600080fd5b6100b061008536600461041c565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205460ff1690565b60405190151581526020015b60405180910390f35b6100d86100d336600461041c565b610130565b005b6100d861021f565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100bc565b6100d861011836600461041c565b610233565b6100d861012b36600461041c565b6102eb565b610138610354565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1615610198576040517fc344397e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660008181526001602081815260409283902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690921790915590519182527f19ef9a4877199f89440a26acb26895ec02ed86f2df1aeaa90dc18041b892f71f91015b60405180910390a150565b610227610354565b61023160006103a7565b565b61023b610354565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1661029a576040517f907b361f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000819052600160209081526040519182527fe9dce8c992623ce791725b21e857e33248d1f190a25b5168313420eebdaae99d9101610214565b6102f3610354565b73ffffffffffffffffffffffffffffffffffffffff8116610348576040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600060048201526024015b60405180910390fd5b610351816103a7565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610231576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161033f565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561042e57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461045257600080fd5b939250505056 - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`@Qa\x05V8\x03\x80a\x05V\x839\x81\x01`@\x81\x90Ra\0/\x91a\0\xBEV[\x80`\x01`\x01`\xA0\x1B\x03\x81\x16a\0^W`@Qc\x1EO\xBD\xF7`\xE0\x1B\x81R`\0`\x04\x82\x01R`$\x01`@Q\x80\x91\x03\x90\xFD[a\0g\x81a\0nV[PPa\0\xEEV[`\0\x80T`\x01`\x01`\xA0\x1B\x03\x83\x81\x16`\x01`\x01`\xA0\x1B\x03\x19\x83\x16\x81\x17\x84U`@Q\x91\x90\x92\x16\x92\x83\x91\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x91\x90\xA3PPV[`\0` \x82\x84\x03\x12\x15a\0\xD0W`\0\x80\xFD[\x81Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\0\xE7W`\0\x80\xFD[\x93\x92PPPV[a\x04Y\x80a\0\xFD`\09`\0\xF3\xFE`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0rW`\x005`\xE0\x1C\x80c\x8D\xA5\xCB[\x11a\0PW\x80c\x8D\xA5\xCB[\x14a\0\xE2W\x80c\x98WQ\x88\x14a\x01\nW\x80c\xF2\xFD\xE3\x8B\x14a\x01\x1DW`\0\x80\xFD[\x80c\x0EfnI\x14a\0wW\x80cB\x1B-\x8B\x14a\0\xC5W\x80cqP\x18\xA6\x14a\0\xDAW[`\0\x80\xFD[a\0\xB0a\0\x856`\x04a\x04\x1CV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16\x90V[`@Q\x90\x15\x15\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\0\xD8a\0\xD36`\x04a\x04\x1CV[a\x010V[\0[a\0\xD8a\x02\x1FV[`\0T`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\0\xBCV[a\0\xD8a\x01\x186`\x04a\x04\x1CV[a\x023V[a\0\xD8a\x01+6`\x04a\x04\x1CV[a\x02\xEBV[a\x018a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16\x15a\x01\x98W`@Q\x7F\xC3D9~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x81\x81R`\x01` \x81\x81R`@\x92\x83\x90 \x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16\x90\x92\x17\x90\x91U\x90Q\x91\x82R\x7F\x19\xEF\x9AHw\x19\x9F\x89D\n&\xAC\xB2h\x95\xEC\x02\xED\x86\xF2\xDF\x1A\xEA\xA9\r\xC1\x80A\xB8\x92\xF7\x1F\x91\x01[`@Q\x80\x91\x03\x90\xA1PV[a\x02'a\x03TV[a\x021`\0a\x03\xA7V[V[a\x02;a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16a\x02\x9AW`@Q\x7F\x90{6\x1F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x81\x90R`\x01` \x90\x81R`@Q\x91\x82R\x7F\xE9\xDC\xE8\xC9\x92b<\xE7\x91r[!\xE8W\xE32H\xD1\xF1\x90\xA2[Qh14 \xEE\xBD\xAA\xE9\x9D\x91\x01a\x02\x14V[a\x02\xF3a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16a\x03HW`@Q\x7F\x1EO\xBD\xF7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\0`\x04\x82\x01R`$\x01[`@Q\x80\x91\x03\x90\xFD[a\x03Q\x81a\x03\xA7V[PV[`\0Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x163\x14a\x021W`@Q\x7F\x11\x8C\xDA\xA7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R3`\x04\x82\x01R`$\x01a\x03?V[`\0\x80Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x81\x16\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83\x16\x81\x17\x84U`@Q\x91\x90\x92\x16\x92\x83\x91\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x91\x90\xA3PPV[`\0` \x82\x84\x03\x12\x15a\x04.W`\0\x80\xFD[\x815s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x04RW`\0\x80\xFD[\x93\x92PPPV", - ); - /// The runtime bytecode of the contract, as deployed on the network. - /// - /// ```text - ///0x608060405234801561001057600080fd5b50600436106100725760003560e01c80638da5cb5b116100505780638da5cb5b146100e2578063985751881461010a578063f2fde38b1461011d57600080fd5b80630e666e4914610077578063421b2d8b146100c5578063715018a6146100da575b600080fd5b6100b061008536600461041c565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205460ff1690565b60405190151581526020015b60405180910390f35b6100d86100d336600461041c565b610130565b005b6100d861021f565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100bc565b6100d861011836600461041c565b610233565b6100d861012b36600461041c565b6102eb565b610138610354565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1615610198576040517fc344397e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660008181526001602081815260409283902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690921790915590519182527f19ef9a4877199f89440a26acb26895ec02ed86f2df1aeaa90dc18041b892f71f91015b60405180910390a150565b610227610354565b61023160006103a7565b565b61023b610354565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1661029a576040517f907b361f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000819052600160209081526040519182527fe9dce8c992623ce791725b21e857e33248d1f190a25b5168313420eebdaae99d9101610214565b6102f3610354565b73ffffffffffffffffffffffffffffffffffffffff8116610348576040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600060048201526024015b60405180910390fd5b610351816103a7565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610231576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161033f565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561042e57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461045257600080fd5b939250505056 - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0rW`\x005`\xE0\x1C\x80c\x8D\xA5\xCB[\x11a\0PW\x80c\x8D\xA5\xCB[\x14a\0\xE2W\x80c\x98WQ\x88\x14a\x01\nW\x80c\xF2\xFD\xE3\x8B\x14a\x01\x1DW`\0\x80\xFD[\x80c\x0EfnI\x14a\0wW\x80cB\x1B-\x8B\x14a\0\xC5W\x80cqP\x18\xA6\x14a\0\xDAW[`\0\x80\xFD[a\0\xB0a\0\x856`\x04a\x04\x1CV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16\x90V[`@Q\x90\x15\x15\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\0\xD8a\0\xD36`\x04a\x04\x1CV[a\x010V[\0[a\0\xD8a\x02\x1FV[`\0T`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\0\xBCV[a\0\xD8a\x01\x186`\x04a\x04\x1CV[a\x023V[a\0\xD8a\x01+6`\x04a\x04\x1CV[a\x02\xEBV[a\x018a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16\x15a\x01\x98W`@Q\x7F\xC3D9~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x81\x81R`\x01` \x81\x81R`@\x92\x83\x90 \x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16\x90\x92\x17\x90\x91U\x90Q\x91\x82R\x7F\x19\xEF\x9AHw\x19\x9F\x89D\n&\xAC\xB2h\x95\xEC\x02\xED\x86\xF2\xDF\x1A\xEA\xA9\r\xC1\x80A\xB8\x92\xF7\x1F\x91\x01[`@Q\x80\x91\x03\x90\xA1PV[a\x02'a\x03TV[a\x021`\0a\x03\xA7V[V[a\x02;a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16a\x02\x9AW`@Q\x7F\x90{6\x1F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x81\x90R`\x01` \x90\x81R`@Q\x91\x82R\x7F\xE9\xDC\xE8\xC9\x92b<\xE7\x91r[!\xE8W\xE32H\xD1\xF1\x90\xA2[Qh14 \xEE\xBD\xAA\xE9\x9D\x91\x01a\x02\x14V[a\x02\xF3a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16a\x03HW`@Q\x7F\x1EO\xBD\xF7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\0`\x04\x82\x01R`$\x01[`@Q\x80\x91\x03\x90\xFD[a\x03Q\x81a\x03\xA7V[PV[`\0Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x163\x14a\x021W`@Q\x7F\x11\x8C\xDA\xA7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R3`\x04\x82\x01R`$\x01a\x03?V[`\0\x80Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x81\x16\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83\x16\x81\x17\x84U`@Q\x91\x90\x92\x16\x92\x83\x91\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x91\x90\xA3PPV[`\0` \x82\x84\x03\x12\x15a\x04.W`\0\x80\xFD[\x815s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x04RW`\0\x80\xFD[\x93\x92PPPV", - ); - /**Custom error with signature `OwnableInvalidOwner(address)` and selector `0x1e4fbdf7`. - ```solidity - error OwnableInvalidOwner(address owner); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct OwnableInvalidOwner { - pub owner: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: OwnableInvalidOwner) -> Self { - (value.owner,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for OwnableInvalidOwner { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { owner: tuple.0 } - } - } - #[automatically_derived] - impl alloy_sol_types::SolError for OwnableInvalidOwner { - type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "OwnableInvalidOwner(address)"; - const SELECTOR: [u8; 4] = [30u8, 79u8, 189u8, 247u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.owner, - ), - ) - } - } - }; - /**Custom error with signature `OwnableUnauthorizedAccount(address)` and selector `0x118cdaa7`. - ```solidity - error OwnableUnauthorizedAccount(address account); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct OwnableUnauthorizedAccount { - pub account: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: OwnableUnauthorizedAccount) -> Self { - (value.account,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for OwnableUnauthorizedAccount { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { account: tuple.0 } - } - } - #[automatically_derived] - impl alloy_sol_types::SolError for OwnableUnauthorizedAccount { - type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "OwnableUnauthorizedAccount(address)"; - const SELECTOR: [u8; 4] = [17u8, 140u8, 218u8, 167u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.account, - ), - ) - } - } - }; - /**Custom error with signature `UserAlreadyExists()` and selector `0xc344397e`. - ```solidity - error UserAlreadyExists(); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct UserAlreadyExists {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: UserAlreadyExists) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for UserAlreadyExists { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - #[automatically_derived] - impl alloy_sol_types::SolError for UserAlreadyExists { - type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "UserAlreadyExists()"; - const SELECTOR: [u8; 4] = [195u8, 68u8, 57u8, 126u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - } - }; - /**Custom error with signature `UserDoesNotExist()` and selector `0x907b361f`. - ```solidity - error UserDoesNotExist(); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct UserDoesNotExist {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: UserDoesNotExist) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for UserDoesNotExist { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - #[automatically_derived] - impl alloy_sol_types::SolError for UserDoesNotExist { - type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "UserDoesNotExist()"; - const SELECTOR: [u8; 4] = [144u8, 123u8, 54u8, 31u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - } - }; - /**Event with signature `OwnershipTransferred(address,address)` and selector `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0`. - ```solidity - event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct OwnershipTransferred { - #[allow(missing_docs)] - pub previousOwner: alloy::sol_types::private::Address, - #[allow(missing_docs)] - pub newOwner: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for OwnershipTransferred { - type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = ( - alloy_sol_types::sol_data::FixedBytes<32>, - alloy::sol_types::sol_data::Address, - alloy::sol_types::sol_data::Address, - ); - const SIGNATURE: &'static str = "OwnershipTransferred(address,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 139u8, 224u8, 7u8, 156u8, 83u8, 22u8, 89u8, 20u8, 19u8, 68u8, 205u8, 31u8, - 208u8, 164u8, 242u8, 132u8, 25u8, 73u8, 127u8, 151u8, 34u8, 163u8, 218u8, - 175u8, 227u8, 180u8, 24u8, 111u8, 107u8, 100u8, 87u8, 224u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { - previousOwner: topics.1, - newOwner: topics.2, - } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - () - } - #[inline] - fn topics(&self) -> ::RustType { - ( - Self::SIGNATURE_HASH.into(), - self.previousOwner.clone(), - self.newOwner.clone(), - ) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - out[1usize] = ::encode_topic( - &self.previousOwner, - ); - out[2usize] = ::encode_topic( - &self.newOwner, - ); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for OwnershipTransferred { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&OwnershipTransferred> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &OwnershipTransferred) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Event with signature `UserAdded(address)` and selector `0x19ef9a4877199f89440a26acb26895ec02ed86f2df1aeaa90dc18041b892f71f`. - ```solidity - event UserAdded(address user); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct UserAdded { - #[allow(missing_docs)] - pub user: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for UserAdded { - type DataTuple<'a> = (alloy::sol_types::sol_data::Address,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "UserAdded(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 25u8, 239u8, 154u8, 72u8, 119u8, 25u8, 159u8, 137u8, 68u8, 10u8, 38u8, 172u8, - 178u8, 104u8, 149u8, 236u8, 2u8, 237u8, 134u8, 242u8, 223u8, 26u8, 234u8, - 169u8, 13u8, 193u8, 128u8, 65u8, 184u8, 146u8, 247u8, 31u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { user: data.0 } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - ( - ::tokenize( - &self.user, - ), - ) - } - #[inline] - fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(),) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for UserAdded { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&UserAdded> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &UserAdded) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Event with signature `UserRemoved(address)` and selector `0xe9dce8c992623ce791725b21e857e33248d1f190a25b5168313420eebdaae99d`. - ```solidity - event UserRemoved(address user); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - #[derive(Clone)] - pub struct UserRemoved { - #[allow(missing_docs)] - pub user: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - #[automatically_derived] - impl alloy_sol_types::SolEvent for UserRemoved { - type DataTuple<'a> = (alloy::sol_types::sol_data::Address,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "UserRemoved(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = - alloy_sol_types::private::B256::new([ - 233u8, 220u8, 232u8, 201u8, 146u8, 98u8, 60u8, 231u8, 145u8, 114u8, 91u8, 33u8, - 232u8, 87u8, 227u8, 50u8, 72u8, 209u8, 241u8, 144u8, 162u8, 91u8, 81u8, 104u8, - 49u8, 52u8, 32u8, 238u8, 189u8, 170u8, 233u8, 157u8, - ]); - const ANONYMOUS: bool = false; - #[allow(unused_variables)] - #[inline] - fn new( - topics: ::RustType, - data: as alloy_sol_types::SolType>::RustType, - ) -> Self { - Self { user: data.0 } - } - #[inline] - fn tokenize_body(&self) -> Self::DataToken<'_> { - ( - ::tokenize( - &self.user, - ), - ) - } - #[inline] - fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(),) - } - #[inline] - fn encode_topics_raw( - &self, - out: &mut [alloy_sol_types::abi::token::WordToken], - ) -> alloy_sol_types::Result<()> { - if out.len() < ::COUNT { - return Err(alloy_sol_types::Error::Overrun); - } - out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); - Ok(()) - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for UserRemoved { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - From::from(self) - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - From::from(&self) - } - } - #[automatically_derived] - impl From<&UserRemoved> for alloy_sol_types::private::LogData { - #[inline] - fn from(this: &UserRemoved) -> alloy_sol_types::private::LogData { - alloy_sol_types::SolEvent::encode_log_data(this) - } - } - }; - /**Constructor`. - ```solidity - constructor(address initialOwner); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct constructorCall { - pub initialOwner: alloy::sol_types::private::Address, - } - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: constructorCall) -> Self { - (value.initialOwner,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for constructorCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - initialOwner: tuple.0, - } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolConstructor for constructorCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.initialOwner, - ), - ) - } - } - }; - /**Function with signature `addUser(address)` and selector `0x421b2d8b`. - ```solidity - function addUser(address user) external; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct addUserCall { - pub user: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`addUser(address)`](addUserCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct addUserReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: addUserCall) -> Self { - (value.user,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for addUserCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { user: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: addUserReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for addUserReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for addUserCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = addUserReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "addUser(address)"; - const SELECTOR: [u8; 4] = [66u8, 27u8, 45u8, 139u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.user, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `owner()` and selector `0x8da5cb5b`. - ```solidity - function owner() external view returns (address); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct ownerCall {} - ///Container type for the return parameters of the [`owner()`](ownerCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct ownerReturn { - pub _0: alloy::sol_types::private::Address, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: ownerCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for ownerCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: ownerReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for ownerReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for ownerCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = ownerReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "owner()"; - const SELECTOR: [u8; 4] = [141u8, 165u8, 203u8, 91u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `removeUser(address)` and selector `0x98575188`. - ```solidity - function removeUser(address user) external; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct removeUserCall { - pub user: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`removeUser(address)`](removeUserCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct removeUserReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: removeUserCall) -> Self { - (value.user,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for removeUserCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { user: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: removeUserReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for removeUserReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for removeUserCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = removeUserReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "removeUser(address)"; - const SELECTOR: [u8; 4] = [152u8, 87u8, 81u8, 136u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.user, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `renounceOwnership()` and selector `0x715018a6`. - ```solidity - function renounceOwnership() external; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct renounceOwnershipCall {} - ///Container type for the return parameters of the [`renounceOwnership()`](renounceOwnershipCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct renounceOwnershipReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: renounceOwnershipCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for renounceOwnershipCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: renounceOwnershipReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for renounceOwnershipReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for renounceOwnershipCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = renounceOwnershipReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "renounceOwnership()"; - const SELECTOR: [u8; 4] = [113u8, 80u8, 24u8, 166u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `transferOwnership(address)` and selector `0xf2fde38b`. - ```solidity - function transferOwnership(address newOwner) external; - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferOwnershipCall { - pub newOwner: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`transferOwnership(address)`](transferOwnershipCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct transferOwnershipReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferOwnershipCall) -> Self { - (value.newOwner,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferOwnershipCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { newOwner: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: transferOwnershipReturn) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for transferOwnershipReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self {} - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for transferOwnershipCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = transferOwnershipReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "transferOwnership(address)"; - const SELECTOR: [u8; 4] = [242u8, 253u8, 227u8, 139u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.newOwner, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - /**Function with signature `userExists(address)` and selector `0x0e666e49`. - ```solidity - function userExists(address user) external view returns (bool); - ```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct userExistsCall { - pub user: alloy::sol_types::private::Address, - } - ///Container type for the return parameters of the [`userExists(address)`](userExistsCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct userExistsReturn { - pub _0: bool, - } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] - const _: () = { - use alloy::sol_types as alloy_sol_types; - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: userExistsCall) -> Self { - (value.user,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for userExistsCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { user: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: userExistsReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for userExistsReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for userExistsCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = userExistsReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "userExists(address)"; - const SELECTOR: [u8; 4] = [14u8, 102u8, 110u8, 73u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.user, - ), - ) - } - #[inline] - fn abi_decode_returns( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence( - data, validate, - ) - .map(Into::into) - } - } - }; - ///Container for all the [`ScKeystore`](self) function calls. - pub enum ScKeystoreCalls { - addUser(addUserCall), - owner(ownerCall), - removeUser(removeUserCall), - renounceOwnership(renounceOwnershipCall), - transferOwnership(transferOwnershipCall), - userExists(userExistsCall), - } - #[automatically_derived] - impl ScKeystoreCalls { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = &[ - [14u8, 102u8, 110u8, 73u8], - [66u8, 27u8, 45u8, 139u8], - [113u8, 80u8, 24u8, 166u8], - [141u8, 165u8, 203u8, 91u8], - [152u8, 87u8, 81u8, 136u8], - [242u8, 253u8, 227u8, 139u8], - ]; - } - #[automatically_derived] - impl alloy_sol_types::SolInterface for ScKeystoreCalls { - const NAME: &'static str = "ScKeystoreCalls"; - const MIN_DATA_LENGTH: usize = 0usize; - const COUNT: usize = 6usize; - #[inline] - fn selector(&self) -> [u8; 4] { - match self { - Self::addUser(_) => ::SELECTOR, - Self::owner(_) => ::SELECTOR, - Self::removeUser(_) => ::SELECTOR, - Self::renounceOwnership(_) => { - ::SELECTOR - } - Self::transferOwnership(_) => { - ::SELECTOR - } - Self::userExists(_) => ::SELECTOR, - } - } - #[inline] - fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { - Self::SELECTORS.get(i).copied() - } - #[inline] - fn valid_selector(selector: [u8; 4]) -> bool { - Self::SELECTORS.binary_search(&selector).is_ok() - } - #[inline] - #[allow(unsafe_code, non_snake_case)] - fn abi_decode_raw( - selector: [u8; 4], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = &[ - { - fn userExists( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(ScKeystoreCalls::userExists) - } - userExists - }, - { - fn addUser( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(ScKeystoreCalls::addUser) - } - addUser - }, - { - fn renounceOwnership( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(ScKeystoreCalls::renounceOwnership) - } - renounceOwnership - }, - { - fn owner( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(ScKeystoreCalls::owner) - } - owner - }, - { - fn removeUser( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data, validate) - .map(ScKeystoreCalls::removeUser) - } - removeUser - }, - { - fn transferOwnership( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(ScKeystoreCalls::transferOwnership) - } - transferOwnership - }, - ]; - let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err(alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - )); - }; - (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) - } - #[inline] - fn abi_encoded_size(&self) -> usize { - match self { - Self::addUser(inner) => { - ::abi_encoded_size(inner) - } - Self::owner(inner) => { - ::abi_encoded_size(inner) - } - Self::removeUser(inner) => { - ::abi_encoded_size(inner) - } - Self::renounceOwnership(inner) => { - ::abi_encoded_size(inner) - } - Self::transferOwnership(inner) => { - ::abi_encoded_size(inner) - } - Self::userExists(inner) => { - ::abi_encoded_size(inner) - } - } - } - #[inline] - fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { - match self { - Self::addUser(inner) => { - ::abi_encode_raw(inner, out) - } - Self::owner(inner) => { - ::abi_encode_raw(inner, out) - } - Self::removeUser(inner) => { - ::abi_encode_raw(inner, out) - } - Self::renounceOwnership(inner) => { - ::abi_encode_raw(inner, out) - } - Self::transferOwnership(inner) => { - ::abi_encode_raw(inner, out) - } - Self::userExists(inner) => { - ::abi_encode_raw(inner, out) - } - } - } - } - ///Container for all the [`ScKeystore`](self) custom errors. - pub enum ScKeystoreErrors { - OwnableInvalidOwner(OwnableInvalidOwner), - OwnableUnauthorizedAccount(OwnableUnauthorizedAccount), - UserAlreadyExists(UserAlreadyExists), - UserDoesNotExist(UserDoesNotExist), - } - #[automatically_derived] - impl ScKeystoreErrors { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = &[ - [17u8, 140u8, 218u8, 167u8], - [30u8, 79u8, 189u8, 247u8], - [144u8, 123u8, 54u8, 31u8], - [195u8, 68u8, 57u8, 126u8], - ]; - } - #[automatically_derived] - impl alloy_sol_types::SolInterface for ScKeystoreErrors { - const NAME: &'static str = "ScKeystoreErrors"; - const MIN_DATA_LENGTH: usize = 0usize; - const COUNT: usize = 4usize; - #[inline] - fn selector(&self) -> [u8; 4] { - match self { - Self::OwnableInvalidOwner(_) => { - ::SELECTOR - } - Self::OwnableUnauthorizedAccount(_) => { - ::SELECTOR - } - Self::UserAlreadyExists(_) => { - ::SELECTOR - } - Self::UserDoesNotExist(_) => { - ::SELECTOR - } - } - } - #[inline] - fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { - Self::SELECTORS.get(i).copied() - } - #[inline] - fn valid_selector(selector: [u8; 4]) -> bool { - Self::SELECTORS.binary_search(&selector).is_ok() - } - #[inline] - #[allow(unsafe_code, non_snake_case)] - fn abi_decode_raw( - selector: [u8; 4], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = - &[ - { - fn OwnableUnauthorizedAccount( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) - .map(ScKeystoreErrors::OwnableUnauthorizedAccount) - } - OwnableUnauthorizedAccount - }, - { - fn OwnableInvalidOwner( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(ScKeystoreErrors::OwnableInvalidOwner) - } - OwnableInvalidOwner - }, - { - fn UserDoesNotExist( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(ScKeystoreErrors::UserDoesNotExist) - } - UserDoesNotExist - }, - { - fn UserAlreadyExists( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, validate, - ) - .map(ScKeystoreErrors::UserAlreadyExists) - } - UserAlreadyExists - }, - ]; - let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err(alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - )); - }; - (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) - } - #[inline] - fn abi_encoded_size(&self) -> usize { - match self { - Self::OwnableInvalidOwner(inner) => { - ::abi_encoded_size(inner) - } - Self::OwnableUnauthorizedAccount(inner) => { - ::abi_encoded_size( - inner, - ) - } - Self::UserAlreadyExists(inner) => { - ::abi_encoded_size(inner) - } - Self::UserDoesNotExist(inner) => { - ::abi_encoded_size(inner) - } - } - } - #[inline] - fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { - match self { - Self::OwnableInvalidOwner(inner) => { - ::abi_encode_raw(inner, out) - } - Self::OwnableUnauthorizedAccount(inner) => { - ::abi_encode_raw( - inner, out, - ) - } - Self::UserAlreadyExists(inner) => { - ::abi_encode_raw(inner, out) - } - Self::UserDoesNotExist(inner) => { - ::abi_encode_raw(inner, out) - } - } - } - } - ///Container for all the [`ScKeystore`](self) events. - pub enum ScKeystoreEvents { - OwnershipTransferred(OwnershipTransferred), - UserAdded(UserAdded), - UserRemoved(UserRemoved), - } - #[automatically_derived] - impl ScKeystoreEvents { - /// All the selectors of this enum. - /// - /// Note that the selectors might not be in the same order as the variants. - /// No guarantees are made about the order of the selectors. - /// - /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 32usize]] = &[ - [ - 25u8, 239u8, 154u8, 72u8, 119u8, 25u8, 159u8, 137u8, 68u8, 10u8, 38u8, 172u8, - 178u8, 104u8, 149u8, 236u8, 2u8, 237u8, 134u8, 242u8, 223u8, 26u8, 234u8, 169u8, - 13u8, 193u8, 128u8, 65u8, 184u8, 146u8, 247u8, 31u8, - ], - [ - 139u8, 224u8, 7u8, 156u8, 83u8, 22u8, 89u8, 20u8, 19u8, 68u8, 205u8, 31u8, 208u8, - 164u8, 242u8, 132u8, 25u8, 73u8, 127u8, 151u8, 34u8, 163u8, 218u8, 175u8, 227u8, - 180u8, 24u8, 111u8, 107u8, 100u8, 87u8, 224u8, - ], - [ - 233u8, 220u8, 232u8, 201u8, 146u8, 98u8, 60u8, 231u8, 145u8, 114u8, 91u8, 33u8, - 232u8, 87u8, 227u8, 50u8, 72u8, 209u8, 241u8, 144u8, 162u8, 91u8, 81u8, 104u8, - 49u8, 52u8, 32u8, 238u8, 189u8, 170u8, 233u8, 157u8, - ], - ]; - } - #[automatically_derived] - impl alloy_sol_types::SolEventInterface for ScKeystoreEvents { - const NAME: &'static str = "ScKeystoreEvents"; - const COUNT: usize = 3usize; - fn decode_raw_log( - topics: &[alloy_sol_types::Word], - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - match topics.first().copied() { - Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, data, validate, - ) - .map(Self::OwnershipTransferred) - } - Some(::SIGNATURE_HASH) => { - ::decode_raw_log(topics, data, validate) - .map(Self::UserAdded) - } - Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, data, validate, - ) - .map(Self::UserRemoved) - } - _ => alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { - name: ::NAME, - log: alloy_sol_types::private::Box::new( - alloy_sol_types::private::LogData::new_unchecked( - topics.to_vec(), - data.to_vec().into(), - ), - ), - }), - } - } - } - #[automatically_derived] - impl alloy_sol_types::private::IntoLogData for ScKeystoreEvents { - fn to_log_data(&self) -> alloy_sol_types::private::LogData { - match self { - Self::OwnershipTransferred(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } - Self::UserAdded(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), - Self::UserRemoved(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } - } - } - fn into_log_data(self) -> alloy_sol_types::private::LogData { - match self { - Self::OwnershipTransferred(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::UserAdded(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::UserRemoved(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - } - } - } - use alloy::contract as alloy_contract; - /**Creates a new wrapper around an on-chain [`ScKeystore`](self) contract instance. - - See the [wrapper's documentation](`ScKeystoreInstance`) for more details.*/ - #[inline] - pub const fn new< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - address: alloy_sol_types::private::Address, - provider: P, - ) -> ScKeystoreInstance { - ScKeystoreInstance::::new(address, provider) - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub fn deploy< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - initialOwner: alloy::sol_types::private::Address, - ) -> impl ::core::future::Future>> - { - ScKeystoreInstance::::deploy(provider, initialOwner) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - initialOwner: alloy::sol_types::private::Address, - ) -> alloy_contract::RawCallBuilder { - ScKeystoreInstance::::deploy_builder(provider, initialOwner) - } - /**A [`ScKeystore`](self) instance. - - Contains type-safe methods for interacting with an on-chain instance of the - [`ScKeystore`](self) contract located at a given `address`, using a given - provider `P`. - - If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) - documentation on how to provide it), the `deploy` and `deploy_builder` methods can - be used to deploy a new instance of the contract. - - See the [module-level documentation](self) for all the available methods.*/ - #[derive(Clone)] - pub struct ScKeystoreInstance { - address: alloy_sol_types::private::Address, - provider: P, - _network_transport: ::core::marker::PhantomData<(N, T)>, - } - #[automatically_derived] - impl ::core::fmt::Debug for ScKeystoreInstance { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("ScKeystoreInstance") - .field(&self.address) - .finish() - } - } - /// Instantiation and getters/setters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ScKeystoreInstance - { - /**Creates a new wrapper around an on-chain [`ScKeystore`](self) contract instance. - - See the [wrapper's documentation](`ScKeystoreInstance`) for more details.*/ - #[inline] - pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { - Self { - address, - provider, - _network_transport: ::core::marker::PhantomData, - } - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - - Returns a new instance of the contract, if the deployment was successful. - - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub async fn deploy( - provider: P, - initialOwner: alloy::sol_types::private::Address, - ) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder(provider, initialOwner); - let contract_address = call_builder.deploy().await?; - Ok(Self::new(contract_address, call_builder.provider)) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. - - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder( - provider: P, - initialOwner: alloy::sol_types::private::Address, - ) -> alloy_contract::RawCallBuilder { - alloy_contract::RawCallBuilder::new_raw_deploy( - provider, - [ - &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { initialOwner }) - [..], - ] - .concat() - .into(), - ) - } - /// Returns a reference to the address. - #[inline] - pub const fn address(&self) -> &alloy_sol_types::private::Address { - &self.address - } - /// Sets the address. - #[inline] - pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { - self.address = address; - } - /// Sets the address and returns `self`. - pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { - self.set_address(address); - self - } - /// Returns a reference to the provider. - #[inline] - pub const fn provider(&self) -> &P { - &self.provider - } - } - impl ScKeystoreInstance { - /// Clones the provider and returns a new instance with the cloned provider. - #[inline] - pub fn with_cloned_provider(self) -> ScKeystoreInstance { - ScKeystoreInstance { - address: self.address, - provider: ::core::clone::Clone::clone(&self.provider), - _network_transport: ::core::marker::PhantomData, - } - } - } - /// Function calls. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ScKeystoreInstance - { - /// Creates a new call builder using this contract instance's provider and address. - /// - /// Note that the call can be any function call, not just those defined in this - /// contract. Prefer using the other methods for building type-safe contract calls. - pub fn call_builder( - &self, - call: &C, - ) -> alloy_contract::SolCallBuilder { - alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) - } - ///Creates a new call builder for the [`addUser`] function. - pub fn addUser( - &self, - user: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&addUserCall { user }) - } - ///Creates a new call builder for the [`owner`] function. - pub fn owner(&self) -> alloy_contract::SolCallBuilder { - self.call_builder(&ownerCall {}) - } - ///Creates a new call builder for the [`removeUser`] function. - pub fn removeUser( - &self, - user: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&removeUserCall { user }) - } - ///Creates a new call builder for the [`renounceOwnership`] function. - pub fn renounceOwnership( - &self, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&renounceOwnershipCall {}) - } - ///Creates a new call builder for the [`transferOwnership`] function. - pub fn transferOwnership( - &self, - newOwner: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&transferOwnershipCall { newOwner }) - } - ///Creates a new call builder for the [`userExists`] function. - pub fn userExists( - &self, - user: alloy::sol_types::private::Address, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&userExistsCall { user }) - } - } - /// Event filters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ScKeystoreInstance - { - /// Creates a new event filter using this contract instance's provider and address. - /// - /// Note that the type can be any event, not just those defined in this contract. - /// Prefer using the other methods for building type-safe event filters. - pub fn event_filter( - &self, - ) -> alloy_contract::Event { - alloy_contract::Event::new_sol(&self.provider, &self.address) - } - ///Creates a new event filter for the [`OwnershipTransferred`] event. - pub fn OwnershipTransferred_filter( - &self, - ) -> alloy_contract::Event { - self.event_filter::() - } - ///Creates a new event filter for the [`UserAdded`] event. - pub fn UserAdded_filter(&self) -> alloy_contract::Event { - self.event_filter::() - } - ///Creates a new event filter for the [`UserRemoved`] event. - pub fn UserRemoved_filter(&self) -> alloy_contract::Event { - self.event_filter::() - } - } -} diff --git a/docker-compose.yml b/docker-compose.yml index d6f155d..6d17b16 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,31 +1,23 @@ -version: "3.8" +name: ${NAME} services: - redis: - image: redis@sha256:0c6f34a2d41992ee1e02d52d712c12ac46c4d5a63efdab74915141a52c529586 - entrypoint: ["redis-server", "--port", "${REDIS_PORT}"] + frontend: + build: + context: frontend + dockerfile: Dockerfile ports: - - "${REDIS_PORT}:${REDIS_PORT}" - healthcheck: - test: ["CMD", "redis-cli", "--raw", "incr", "ping"] - interval: 1s - timeout: 3s - retries: 5 + - ${FRONTEND_PORT}:5173 + environment: + - PUBLIC_API_URL=http://127.0.0.1:${BACKEND_PORT} + - PUBLIC_WEBSOCKET_URL=ws://127.0.0.1:${BACKEND_PORT} + depends_on: + - backend - anvil: - image: ghcr.io/foundry-rs/foundry:latest - healthcheck: - test: - [ - "CMD", - "cast", - "chain-id", - "--rpc-url", - "http://localhost:${ANVIL_PORT}", - ] - interval: 5s - timeout: 3s - retries: 5 + backend: + build: + context: . + dockerfile: Dockerfile ports: - - "${ANVIL_PORT}:${ANVIL_PORT}" - entrypoint: ["anvil", "--host", "0.0.0.0"] - platform: linux/amd64 + - ${BACKEND_PORT}:3000 + environment: + - RUST_LOG=info + - NODE=${NODE} diff --git a/ds/Cargo.toml b/ds/Cargo.toml index 242e789..2e99bca 100644 --- a/ds/Cargo.toml +++ b/ds/Cargo.toml @@ -1,39 +1,29 @@ [package] name = "ds" -version = "0.1.0" +version = "1.0.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -# chrono = "=0.4.38" -# waku-bindings = "=0.6.0" -bus = "=2.4.1" -fred = { version = "=9.0.3", features = ["subscriber-client"] } -tokio = { version = "=1.38.0", features = ["full"] } -tokio-tungstenite = "0.15" -tungstenite = "0.14" -futures-util = "0.3" -tokio-stream = "0.1" -alloy = { git = "https://github.com/alloy-rs/alloy", features = [ - "providers", - "node-bindings", - "network", - "transports", - "k256", - "rlp", -] } -tokio-util = "=0.7.11" +waku-bindings = { git = "https://github.com/waku-org/waku-rust-bindings.git", branch = "force-cluster-15", subdir = "waku-bindings" } +waku-sys = { git = "https://github.com/waku-org/waku-rust-bindings.git", branch = "force-cluster-15", subdir = "waku-sys" } -openmls = { version = "=0.5.0", features = ["test-utils"] } -rand = { version = "^0.8" } +tokio = { version = "=1.38.0", features = ["full"] } +kameo = "=0.13.0" + +chrono = "=0.4.38" +uuid = { version = "=1.11.0", features = [ + "v4", + "fast-rng", + "macro-diagnostics", +] } anyhow = "=1.0.81" thiserror = "=1.0.61" -tls_codec = "=0.3.0" serde_json = "=1.0" serde = "=1.0.204" -sc_key_store = { path = "../sc_key_store" } -url = "2.5.2" +env_logger = "=0.11.5" +log = "=0.4.22" diff --git a/ds/src/chat_client.rs b/ds/src/chat_client.rs deleted file mode 100644 index 8c31f02..0000000 --- a/ds/src/chat_client.rs +++ /dev/null @@ -1,206 +0,0 @@ -use alloy::primitives::Address; -use alloy::signers::Signature; -use futures_util::{SinkExt, StreamExt}; -use serde::{Deserialize, Serialize}; -use std::str::FromStr; -use std::sync::Arc; -use tokio::sync::{mpsc, Mutex}; -use tokio_tungstenite::tungstenite::protocol::Message; - -use crate::chat_server::ServerMessage; -use crate::DeliveryServiceError; - -#[derive(Serialize, Deserialize, Debug, PartialEq)] -pub enum ChatMessages { - Request(RequestMLSPayload), - Response(ResponseMLSPayload), - Welcome(String), -} - -#[derive(Serialize, Deserialize, Debug, PartialEq)] -pub enum ReqMessageType { - InviteToGroup, - RemoveFromGroup, -} - -#[derive(Serialize, Deserialize, Debug, PartialEq)] -pub struct RequestMLSPayload { - sc_address: String, - group_name: String, - pub msg_type: ReqMessageType, -} - -impl RequestMLSPayload { - pub fn new(sc_address: String, group_name: String, msg_type: ReqMessageType) -> Self { - RequestMLSPayload { - sc_address, - group_name, - msg_type, - } - } - - pub fn msg_to_sign(&self) -> String { - self.sc_address.to_owned() + &self.group_name - } - - pub fn group_name(&self) -> String { - self.group_name.clone() - } -} - -#[derive(Serialize, Deserialize, Debug, PartialEq)] -pub struct ResponseMLSPayload { - signature: String, - user_address: String, - pub group_name: String, - key_package: Vec, -} - -impl ResponseMLSPayload { - pub fn new( - signature: String, - user_address: String, - group_name: String, - key_package: Vec, - ) -> Self { - Self { - signature, - user_address, - group_name, - key_package, - } - } - - pub fn validate( - &self, - sc_address: String, - group_name: String, - ) -> Result<(String, Vec), DeliveryServiceError> { - let recover_sig: Signature = serde_json::from_str(&self.signature)?; - let addr = Address::from_str(&self.user_address)?; - // Recover the signer from the message. - let recovered = - recover_sig.recover_address_from_msg(sc_address.to_owned() + &group_name)?; - - if recovered.ne(&addr) { - return Err(DeliveryServiceError::ValidationError(recovered.to_string())); - } - Ok((self.user_address.clone(), self.key_package.clone())) - } -} - -pub struct ChatClient { - sender: mpsc::UnboundedSender, -} - -impl ChatClient { - pub async fn connect( - server_addr: &str, - username: String, - ) -> Result<(Self, mpsc::UnboundedReceiver), DeliveryServiceError> { - let (ws_stream, _) = tokio_tungstenite::connect_async(server_addr).await?; - let (mut write, read) = ws_stream.split(); - let (sender, receiver) = mpsc::unbounded_channel(); - let (msg_sender, msg_receiver) = mpsc::unbounded_channel(); - - let receiver = Arc::new(Mutex::new(receiver)); - - // Spawn a task to handle outgoing messages - tokio::spawn(async move { - while let Some(message) = receiver.lock().await.recv().await { - if let Err(err) = write.send(message).await { - return Err(DeliveryServiceError::SenderError(err.to_string())); - } - } - Ok(()) - }); - - // Spawn a task to handle incoming messages - tokio::spawn(async move { - let mut read = read; - while let Some(Ok(message)) = read.next().await { - if let Err(err) = msg_sender.send(message) { - return Err(DeliveryServiceError::SenderError(err.to_string())); - } - } - Ok(()) - }); - - // Send a SystemJoin message when registering - let join_msg = ServerMessage::SystemJoin { - username: username.to_string(), - }; - let join_json = serde_json::to_string(&join_msg).unwrap(); - sender - .send(Message::Text(join_json)) - .map_err(|err| DeliveryServiceError::SenderError(err.to_string()))?; - - Ok((ChatClient { sender }, msg_receiver)) - } - - pub fn send_message(&self, msg: ServerMessage) -> Result<(), DeliveryServiceError> { - let msg_json = serde_json::to_string(&msg).unwrap(); - self.sender - .send(Message::Text(msg_json)) - .map_err(|err| DeliveryServiceError::SenderError(err.to_string()))?; - Ok(()) - } -} - -#[test] -fn test_sign() { - use alloy::signers::SignerSync; - let signer = alloy::signers::local::PrivateKeySigner::from_str( - "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d", - ) - .unwrap(); - - // Sign a message. - let message = "You are joining the group with smart contract: ".to_owned() - + "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512"; - let signature = signer.sign_message_sync(message.as_bytes()).unwrap(); - - let json = serde_json::to_string(&signature).unwrap(); - let recover_sig: Signature = serde_json::from_str(&json).unwrap(); - - // Recover the signer from the message. - let recovered = recover_sig.recover_address_from_msg(message).unwrap(); - assert_eq!(recovered, signer.address()); -} - -#[test] -fn json_test() { - let inner_msg = ChatMessages::Request(RequestMLSPayload::new( - "sc_address".to_string(), - "group_name".to_string(), - ReqMessageType::InviteToGroup, - )); - - let res = serde_json::to_string(&inner_msg); - assert!(res.is_ok()); - let json_inner_msg = res.unwrap(); - - let server_msg = ServerMessage::InMessage { - from: "alice".to_string(), - to: vec!["bob".to_string()], - msg: json_inner_msg, - }; - - let res = serde_json::to_string(&server_msg); - assert!(res.is_ok()); - let json_server_msg = res.unwrap(); - - //// - - if let Ok(chat_message) = serde_json::from_str::(&json_server_msg) { - assert_eq!(chat_message, server_msg); - match chat_message { - ServerMessage::InMessage { from, to, msg } => { - if let Ok(chat_msg) = serde_json::from_str::(&msg) { - assert_eq!(chat_msg, inner_msg); - } - } - ServerMessage::SystemJoin { username } => {} - } - } -} diff --git a/ds/src/chat_server.rs b/ds/src/chat_server.rs deleted file mode 100644 index 9703bdd..0000000 --- a/ds/src/chat_server.rs +++ /dev/null @@ -1,114 +0,0 @@ -use futures_util::{SinkExt, StreamExt}; -use serde::{Deserialize, Serialize}; -use std::collections::HashMap; -use std::sync::Arc; -use tokio::{ - net::TcpListener, - sync::{mpsc, Mutex}, -}; -use tokio_tungstenite::{accept_async, tungstenite::protocol::Message}; - -use crate::DeliveryServiceError; - -type Tx = mpsc::UnboundedSender; -type PeerMap = Arc>>; - -#[derive(Serialize, Deserialize, Debug, PartialEq)] -#[serde(tag = "type")] -pub enum ServerMessage { - InMessage { - from: String, - to: Vec, - msg: String, - }, - SystemJoin { - username: String, - }, -} - -pub async fn start_server(addr: &str) -> Result<(), DeliveryServiceError> { - let listener = TcpListener::bind(addr).await?; - let peers = PeerMap::new(Mutex::new(HashMap::new())); - - while let Ok((stream, _)) = listener.accept().await { - let peers = peers.clone(); - - tokio::spawn(async move { - if let Err(e) = handle_connection(peers, stream).await { - eprintln!("Error in connection handling: {:?}", e); - } - }); - } - - Ok(()) -} - -async fn handle_connection( - peers: PeerMap, - stream: tokio::net::TcpStream, -) -> Result<(), DeliveryServiceError> { - let ws_stream = accept_async(stream).await?; - let (mut write, mut read) = ws_stream.split(); - let (sender, receiver) = mpsc::unbounded_channel(); - let receiver = Arc::new(Mutex::new(receiver)); - - let mut username = String::new(); - - // Spawn a task to handle outgoing messages - tokio::spawn(async move { - while let Some(message) = receiver.lock().await.recv().await { - if let Err(err) = write.send(message).await { - return Err(DeliveryServiceError::SenderError(err.to_string())); - } - } - Ok(()) - }); - - // Handle incoming messages - while let Some(Ok(Message::Text(text))) = read.next().await { - if let Ok(chat_message) = serde_json::from_str::(&text) { - match chat_message { - ServerMessage::SystemJoin { - username: join_username, - } => { - username = join_username.clone(); - peers - .lock() - .await - .insert(join_username.clone(), sender.clone()); - println!("{} joined the chat", join_username); - } - ServerMessage::InMessage { from, to, msg } => { - println!("Received message from {} to {:?}: {}", from, to, msg); - for recipient in to { - if let Some(recipient_sender) = peers.lock().await.get(&recipient) { - let message = ServerMessage::InMessage { - from: from.clone(), - to: vec![recipient.clone()], - msg: msg.clone(), - }; - let message_json = serde_json::to_string(&message).unwrap(); - recipient_sender - .send(Message::Text(message_json)) - .map_err(|err| { - DeliveryServiceError::SenderError(err.to_string()) - })?; - } - } - } - } - } - } - - // Remove the user from the map when they disconnect - if !username.is_empty() { - peers.lock().await.remove(&username); - println!("{} left the chat", username); - } - Ok(()) -} - -#[tokio::test] -async fn start_test() { - start_server("127.0.0.1:8080").await.unwrap() -} diff --git a/ds/src/ds.rs b/ds/src/ds.rs deleted file mode 100644 index b7b9992..0000000 --- a/ds/src/ds.rs +++ /dev/null @@ -1,60 +0,0 @@ -use fred::{ - clients::{RedisClient, SubscriberClient}, - prelude::*, - types::Message, -}; -use serde::{Deserialize, Serialize}; -use tokio::sync::broadcast::Receiver; - -use crate::DeliveryServiceError; -// use waku_bindings::*; - -pub struct RClient { - client: RedisClient, - sub_client: SubscriberClient, - // broadcaster: Receiver, -} - -#[derive(Serialize, Deserialize, Debug)] -pub struct SenderStruct { - pub sender: String, - pub msg: Vec, -} - -impl RClient { - pub async fn new_with_group( - group_id: String, - ) -> Result<(Self, Receiver), DeliveryServiceError> { - let redis_client = RedisClient::default(); - let subscriber: SubscriberClient = - Builder::default_centralized().build_subscriber_client()?; - redis_client.init().await?; - subscriber.init().await?; - subscriber.subscribe(group_id.clone()).await?; - Ok(( - RClient { - client: redis_client, - sub_client: subscriber.clone(), - }, - subscriber.message_rx(), - )) - } - - pub async fn remove_group(&mut self, group_id: String) -> Result<(), DeliveryServiceError> { - self.sub_client.unsubscribe(group_id).await?; - Ok(()) - } - - pub async fn msg_send( - &mut self, - msg: Vec, - sender: String, - group_id: String, - ) -> Result<(), DeliveryServiceError> { - let json_value = SenderStruct { sender, msg }; - let bytes = serde_json::to_vec(&json_value)?; - self.client.publish(group_id, bytes.as_slice()).await?; - - Ok(()) - } -} diff --git a/ds/src/ds_waku.rs b/ds/src/ds_waku.rs new file mode 100644 index 0000000..5055d90 --- /dev/null +++ b/ds/src/ds_waku.rs @@ -0,0 +1,123 @@ +use core::result::Result; +use std::{ + borrow::Cow, + str::FromStr, + sync::{Arc, Mutex as SyncMutex}, + thread, + time::Duration, +}; +use waku_bindings::*; + +use crate::DeliveryServiceError; + +pub const GROUP_VERSION: &str = "1"; +pub const APP_MSG_SUBTOPIC: &str = "app_msg"; +pub const COMMIT_MSG_SUBTOPIC: &str = "commit_msg"; +pub const WELCOME_SUBTOPIC: &str = "welcome"; +pub const SUBTOPICS: [&str; 3] = [APP_MSG_SUBTOPIC, COMMIT_MSG_SUBTOPIC, WELCOME_SUBTOPIC]; + +/// The pubsub topic for the Waku Node +/// Fixed for now because nodes on the network would need to be subscribed to existing pubsub topics +pub fn pubsub_topic() -> WakuPubSubTopic { + "/waku/2/rs/15/0".to_string() +} + +/// Build the content topics for a group. Subtopics are fixed for de-mls group communication. +/// +/// Input: +/// - group_name: The name of the group +/// - group_version: The version of the group +/// +/// Returns: +/// - content_topics: The content topics of the group +pub fn build_content_topics(group_name: &str, group_version: &str) -> Vec { + SUBTOPICS + .iter() + .map(|subtopic| build_content_topic(group_name, group_version, subtopic)) + .collect::>() +} + +/// Build the content topic for the given group and subtopic +/// Input: +/// - group_name: The name of the group +/// - group_version: The version of the group +/// - subtopic: The subtopic of the group +/// +/// Returns: +/// - content_topic: The content topic of the subtopic +pub fn build_content_topic( + group_name: &str, + group_version: &str, + subtopic: &str, +) -> WakuContentTopic { + WakuContentTopic { + application_name: Cow::from(group_name.to_string()), + version: Cow::from(group_version.to_string()), + content_topic_name: Cow::from(subtopic.to_string()), + encoding: Encoding::Proto, + } +} + +/// Build the content filter for the given pubsub topic and content topics +/// Input: +/// - pubsub_topic: The pubsub topic of the Waku Node +/// - content_topics: The content topics of the group +/// +/// Returns: +/// - content_filter: The content filter of the group +pub fn content_filter( + pubsub_topic: &WakuPubSubTopic, + content_topics: &[WakuContentTopic], +) -> ContentFilter { + ContentFilter::new(Some(pubsub_topic.to_string()), content_topics.to_vec()) +} + +/// Setup the Waku Node Handle +/// Input: +/// - nodes_addresses: The addresses of the nodes to connect to +/// +/// Returns: +/// - node_handle: The Waku Node Handle +#[allow(clippy::field_reassign_with_default)] +pub fn setup_node_handle( + nodes_addresses: Vec, +) -> Result, DeliveryServiceError> { + let mut config = WakuNodeConfig::default(); + // Set the port to 0 to let the system choose a random port + config.port = Some(0); + config.log_level = Some(WakuLogLevel::Panic); + let node_handle = waku_new(Some(config)) + .map_err(|e| DeliveryServiceError::WakuNodeAlreadyInitialized(e.to_string()))?; + let node_handle = node_handle + .start() + .map_err(|e| DeliveryServiceError::WakuNodeAlreadyInitialized(e.to_string()))?; + let content_filter = ContentFilter::new(Some(pubsub_topic()), vec![]); + node_handle + .relay_subscribe(&content_filter) + .map_err(|e| DeliveryServiceError::WakuSubscribeToContentFilterError(e.to_string()))?; + for address in nodes_addresses + .iter() + .map(|a| Multiaddr::from_str(a.as_str())) + { + let address = + address.map_err(|e| DeliveryServiceError::FailedToParseMultiaddr(e.to_string()))?; + let peerid = node_handle + .add_peer(&address, ProtocolId::Relay) + .map_err(|e| DeliveryServiceError::WakuAddPeerError(e.to_string()))?; + node_handle + .connect_peer_with_id(&peerid, None) + .map_err(|e| DeliveryServiceError::WakuConnectPeerError(e.to_string()))?; + thread::sleep(Duration::from_secs(2)); + } + + Ok(node_handle) +} + +/// Check if a content topic exists in a list of topics or if the list is empty +pub fn match_content_topic( + content_topics: &Arc>>, + topic: &WakuContentTopic, +) -> bool { + let locked_topics = content_topics.lock().unwrap(); + locked_topics.is_empty() || locked_topics.iter().any(|t| t == topic) +} diff --git a/ds/src/lib.rs b/ds/src/lib.rs index debb230..afaf975 100644 --- a/ds/src/lib.rs +++ b/ds/src/lib.rs @@ -1,33 +1,27 @@ -use alloy::{hex::FromHexError, primitives::SignatureError}; -use fred::error::RedisError; - -pub mod chat_client; -pub mod chat_server; -pub mod ds; +pub mod ds_waku; +pub mod waku_actor; #[derive(Debug, thiserror::Error)] pub enum DeliveryServiceError { - #[error("Validation failed: {0}")] - ValidationError(String), + #[error("Waku publish message error: {0}")] + WakuPublishMessageError(String), + #[error("Waku relay topics error: {0}")] + WakuRelayTopicsError(String), + #[error("Waku subscribe to group error: {0}")] + WakuSubscribeToGroupError(String), + #[error("Waku receive message error: {0}")] + WakuReceiveMessageError(String), + #[error("Waku node already initialized: {0}")] + WakuNodeAlreadyInitialized(String), + #[error("Waku subscribe to content filter error: {0}")] + WakuSubscribeToContentFilterError(String), + #[error("Waku add peer error: {0}")] + WakuAddPeerError(String), + #[error("Waku connect peer error: {0}")] + WakuConnectPeerError(String), - #[error("Redis operation failed: {0}")] - RedisError(#[from] RedisError), - #[error("Failed to send message to channel: {0}")] - SenderError(String), - #[error("WebSocket handshake failed.")] - HandshakeError(#[from] tokio_tungstenite::tungstenite::Error), - - #[error("Serialization error: {0}")] - TlsError(#[from] tls_codec::Error), - #[error("JSON processing error: {0}")] - JsonError(#[from] serde_json::Error), - #[error("Failed to bind to the address.")] - BindError(#[from] std::io::Error), - - #[error("Failed to parse address: {0}")] - AlloyFromHexError(#[from] FromHexError), - #[error("Failed to recover signature: {0}")] - AlloySignatureError(#[from] SignatureError), + #[error("Failed to parse multiaddr: {0}")] + FailedToParseMultiaddr(String), #[error("An unknown error occurred: {0}")] Other(anyhow::Error), diff --git a/ds/src/waku_actor.rs b/ds/src/waku_actor.rs new file mode 100644 index 0000000..4d579d1 --- /dev/null +++ b/ds/src/waku_actor.rs @@ -0,0 +1,151 @@ +use chrono::Utc; +use core::result::Result; +use kameo::{ + message::{Context, Message}, + Actor, +}; +use log::debug; +use serde::{Deserialize, Serialize}; +use std::sync::Arc; +use waku_bindings::{Running, WakuContentTopic, WakuMessage, WakuNodeHandle}; + +use crate::ds_waku::{pubsub_topic, GROUP_VERSION}; +use crate::{ + ds_waku::{build_content_topic, build_content_topics, content_filter}, + DeliveryServiceError, +}; + +/// WakuActor is the actor that handles the Waku Node +#[derive(Actor)] +pub struct WakuActor { + node: Arc>, +} + +impl WakuActor { + /// Create a new WakuActor + /// Input: + /// - node: The Waku Node to handle. Waku Node is already running + pub fn new(node: Arc>) -> Self { + Self { node } + } +} + +/// Message to send to the Waku Node +/// This message is used to send a message to the Waku Node +/// Input: +/// - msg: The message to send +/// - subtopic: The subtopic to send the message to +/// - group_id: The group to send the message to +/// - app_id: The app is unique identifier for the application that is sending the message for filtering own messages +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +pub struct ProcessMessageToSend { + pub msg: Vec, + pub subtopic: String, + pub group_id: String, + pub app_id: Vec, +} + +impl ProcessMessageToSend { + /// Build a WakuMessage from the message to send + /// Input: + /// - msg: The message to send + /// + /// Returns: + /// - WakuMessage: The WakuMessage to send + pub fn build_waku_message(&self) -> Result { + let content_topic = build_content_topic(&self.group_id, GROUP_VERSION, &self.subtopic); + Ok(WakuMessage::new( + self.msg.clone(), + content_topic, + 2, + Utc::now().timestamp() as usize, + self.app_id.clone(), + true, + )) + } +} + +/// Handle the message to send to the Waku Node +/// Input: +/// - msg: The message to send +/// +/// Returns: +/// - msg_id: The message id of the message sent to the Waku Node +impl Message for WakuActor { + type Reply = Result; + + async fn handle( + &mut self, + msg: ProcessMessageToSend, + _ctx: Context<'_, Self, Self::Reply>, + ) -> Self::Reply { + let waku_message = msg.build_waku_message()?; + let msg_id = self + .node + .relay_publish_message(&waku_message, Some(pubsub_topic()), None) + .map_err(|e| { + debug!("Failed to relay publish the message: {:?}", e); + DeliveryServiceError::WakuPublishMessageError(e) + })?; + Ok(msg_id) + } +} + +/// Message for actor to subscribe to a group +/// It contains the group name to subscribe to +pub struct ProcessSubscribeToGroup { + pub group_name: String, +} + +/// Handle the message for actor to subscribe to a group +/// Input: +/// - group_name: The group to subscribe to +/// +/// Returns: +/// - content_topics: The content topics of the group +impl Message for WakuActor { + type Reply = Result, DeliveryServiceError>; + + async fn handle( + &mut self, + msg: ProcessSubscribeToGroup, + _ctx: Context<'_, Self, Self::Reply>, + ) -> Self::Reply { + let content_topics = build_content_topics(&msg.group_name, GROUP_VERSION); + let content_filter = content_filter(&pubsub_topic(), &content_topics); + self.node.relay_subscribe(&content_filter).map_err(|e| { + debug!("Failed to relay subscribe to the group: {:?}", e); + DeliveryServiceError::WakuSubscribeToGroupError(e) + })?; + Ok(content_topics) + } +} + +/// Message for actor to unsubscribe from a group +/// It contains the group name to unsubscribe from +pub struct ProcessUnsubscribeFromGroup { + pub group_name: String, +} + +/// Handle the message for actor to unsubscribe from a group +/// Input: +/// - group_name: The group to unsubscribe from +/// +/// Returns: +/// - () +impl Message for WakuActor { + type Reply = Result<(), DeliveryServiceError>; + + async fn handle( + &mut self, + msg: ProcessUnsubscribeFromGroup, + _ctx: Context<'_, Self, Self::Reply>, + ) -> Self::Reply { + let content_topics = build_content_topics(&msg.group_name, GROUP_VERSION); + let content_filter = content_filter(&pubsub_topic(), &content_topics); + self.node + .relay_unsubscribe(&content_filter) + .map_err(|e| DeliveryServiceError::WakuRelayTopicsError(e.to_string()))?; + Ok(()) + } +} diff --git a/ds/tests/ds_waku_test.rs b/ds/tests/ds_waku_test.rs new file mode 100644 index 0000000..233efc6 --- /dev/null +++ b/ds/tests/ds_waku_test.rs @@ -0,0 +1,132 @@ +use kameo::{ + actor::pubsub::PubSub, + message::{Context, Message}, + Actor, +}; +use log::{error, info}; +use std::{ + sync::{Arc, Mutex}, + time::Duration, +}; +use tokio::sync::mpsc::channel; +use waku_bindings::WakuMessage; + +use ds::{ + ds_waku::{ + build_content_topics, match_content_topic, setup_node_handle, APP_MSG_SUBTOPIC, + GROUP_VERSION, + }, + waku_actor::{ProcessMessageToSend, ProcessSubscribeToGroup, WakuActor}, + DeliveryServiceError, +}; +use waku_bindings::waku_set_event_callback; + +#[derive(Debug, Clone, Actor)] +pub struct ActorA { + pub app_id: String, +} + +impl ActorA { + pub fn new() -> Self { + let app_id = uuid::Uuid::new_v4().to_string(); + Self { app_id } + } +} + +impl Message for ActorA { + type Reply = Result; + + async fn handle( + &mut self, + msg: WakuMessage, + _ctx: Context<'_, Self, Self::Reply>, + ) -> Self::Reply { + println!("ActorA received message: {:?}", msg.timestamp()); + Ok(msg) + } +} + +#[tokio::test] +async fn test_waku_client() { + let group_name = "new_group".to_string(); + let mut pubsub = PubSub::::new(); + let (sender_alice, mut receiver_alice) = channel(100); + // TODO: get node from env + let res = setup_node_handle(vec![]); + assert!(res.is_ok()); + let node = res.unwrap(); + let uuid = uuid::Uuid::new_v4().as_bytes().to_vec(); + let waku_actor = WakuActor::new(Arc::new(node)); + let actor_ref = kameo::spawn(waku_actor); + + let actor_a = ActorA::new(); + let actor_a_ref = kameo::spawn(actor_a); + + pubsub.subscribe(actor_a_ref); + + let content_topics = Arc::new(Mutex::new(build_content_topics(&group_name, GROUP_VERSION))); + + assert!(actor_ref + .ask(ProcessSubscribeToGroup { + group_name: group_name.clone(), + }) + .await + .is_ok()); + + waku_set_event_callback(move |signal| { + match signal.event() { + waku_bindings::Event::WakuMessage(event) => { + let content_topic = event.waku_message().content_topic(); + // Check if message belongs to a relevant topic + assert!(match_content_topic(&content_topics, content_topic)); + let msg = event.waku_message().clone(); + info!("msg: {:?}", msg.timestamp()); + assert!(sender_alice.blocking_send(msg).is_ok()); + } + + waku_bindings::Event::Unrecognized(data) => { + error!("Unrecognized event!\n {data:?}"); + } + _ => { + error!( + "Unrecognized signal!\n {:?}", + serde_json::to_string(&signal) + ); + } + } + }); + + let sender = tokio::spawn(async move { + for _ in 0..10 { + assert!(actor_ref + .ask(ProcessMessageToSend { + msg: format!("test_message").as_bytes().to_vec(), + subtopic: APP_MSG_SUBTOPIC.to_string(), + group_id: group_name.clone(), + app_id: uuid.clone(), + }) + .await + .is_ok()); + + tokio::time::sleep(Duration::from_secs(1)).await; + } + info!("sender handle is finished"); + }); + + let receiver = tokio::spawn(async move { + while let Some(msg) = receiver_alice.recv().await { + info!("msg received: {:?}", msg.timestamp()); + pubsub.publish(msg).await; + } + info!("receiver handle is finished"); + }); + + tokio::select! { + x = sender => { + info!("get from sender: {:?}", x); + } + w = receiver => { + info!("get from receiver: {:?}", w); + } + } +} diff --git a/frontend/.gitignore b/frontend/.gitignore new file mode 100644 index 0000000..6635cf5 --- /dev/null +++ b/frontend/.gitignore @@ -0,0 +1,10 @@ +.DS_Store +node_modules +/build +/.svelte-kit +/package +.env +.env.* +!.env.example +vite.config.js.timestamp-* +vite.config.ts.timestamp-* diff --git a/frontend/.npmrc b/frontend/.npmrc new file mode 100644 index 0000000..b6f27f1 --- /dev/null +++ b/frontend/.npmrc @@ -0,0 +1 @@ +engine-strict=true diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 0000000..81f8a02 --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,11 @@ +FROM node:18-alpine + +WORKDIR /app + +COPY package.json package-lock.json ./ +RUN npm install + +COPY . . + +EXPOSE 5173 +CMD [ "npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "5173"] diff --git a/frontend/package-lock.json b/frontend/package-lock.json new file mode 100644 index 0000000..8035f5a --- /dev/null +++ b/frontend/package-lock.json @@ -0,0 +1,2656 @@ +{ + "name": "client", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "client", + "version": "0.0.1", + "dependencies": { + "@sveltejs/adapter-static": "^2.0.1", + "svelte-french-toast": "^1.0.4-beta.0", + "svelte-preprocess": "^5.0.1" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^2.0.0", + "@sveltejs/adapter-netlify": "^1.0.0-next.88", + "@sveltejs/kit": "^1.15.2", + "@tailwindcss/typography": "^0.5.9", + "autoprefixer": "^10.4.14", + "daisyui": "^2.51.3", + "postcss": "^8.4.21", + "svelte": "^3.54.0", + "svelte-check": "^3.0.1", + "tailwindcss": "^3.2.7", + "tslib": "^2.4.1", + "typescript": "^4.9.3", + "vite": "^4.5.2" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.17.tgz", + "integrity": "sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz", + "integrity": "sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.17.tgz", + "integrity": "sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz", + "integrity": "sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.17.tgz", + "integrity": "sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.17.tgz", + "integrity": "sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.17.tgz", + "integrity": "sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.17.tgz", + "integrity": "sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.17.tgz", + "integrity": "sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.17.tgz", + "integrity": "sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.17.tgz", + "integrity": "sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.17.tgz", + "integrity": "sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.17.tgz", + "integrity": "sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.17.tgz", + "integrity": "sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.17.tgz", + "integrity": "sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.17.tgz", + "integrity": "sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.17.tgz", + "integrity": "sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.17.tgz", + "integrity": "sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.17.tgz", + "integrity": "sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.17.tgz", + "integrity": "sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.17.tgz", + "integrity": "sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz", + "integrity": "sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@iarna/toml": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz", + "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==", + "dev": true + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@polka/url": { + "version": "1.0.0-next.21", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", + "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==" + }, + "node_modules/@sveltejs/adapter-auto": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-2.0.0.tgz", + "integrity": "sha512-b+gkHFZgD771kgV3aO4avHFd7y1zhmMYy9i6xOK7m/rwmwaRO8gnF5zBc0Rgca80B2PMU1bKNxyBTHA14OzUAQ==", + "dev": true, + "dependencies": { + "import-meta-resolve": "^2.2.0" + }, + "peerDependencies": { + "@sveltejs/kit": "^1.0.0" + } + }, + "node_modules/@sveltejs/adapter-netlify": { + "version": "1.0.0-next.88", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-netlify/-/adapter-netlify-1.0.0-next.88.tgz", + "integrity": "sha512-vUuG1++iQJvNPR6E9S9eYSRRudQnrDHEyLzV9c4dWQjQ4u12papwag4EAqTSxXxWiE4d1MEtH0p0p25W55uKNQ==", + "dev": true, + "dependencies": { + "@iarna/toml": "^2.2.5", + "esbuild": "^0.16.3", + "set-cookie-parser": "^2.5.1" + }, + "peerDependencies": { + "@sveltejs/kit": "^1.0.0-next.587" + } + }, + "node_modules/@sveltejs/adapter-static": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-static/-/adapter-static-2.0.1.tgz", + "integrity": "sha512-o5/q3YwD/ErxYCFlK1v3ydvldyNKk1lh3oeyxn4mhz+Pkbx/uuxhzmbOpytTlp5aVqNHDVsb04xadUzOFCDDzw==", + "peerDependencies": { + "@sveltejs/kit": "^1.5.0" + } + }, + "node_modules/@sveltejs/kit": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.15.2.tgz", + "integrity": "sha512-rLNxZrjbrlPf8AWW8GAU4L/Vvu17e9v8EYl7pUip7x72lTft7RcxeP3z7tsrHpMSBBxC9o4XdKzFvz1vMZyXZw==", + "hasInstallScript": true, + "dependencies": { + "@sveltejs/vite-plugin-svelte": "^2.0.0", + "@types/cookie": "^0.5.1", + "cookie": "^0.5.0", + "devalue": "^4.3.0", + "esm-env": "^1.0.0", + "kleur": "^4.1.5", + "magic-string": "^0.30.0", + "mime": "^3.0.0", + "sade": "^1.8.1", + "set-cookie-parser": "^2.5.1", + "sirv": "^2.0.2", + "tiny-glob": "^0.2.9", + "undici": "5.20.0" + }, + "bin": { + "svelte-kit": "svelte-kit.js" + }, + "engines": { + "node": "^16.14 || >=18" + }, + "peerDependencies": { + "svelte": "^3.54.0", + "vite": "^4.0.0" + } + }, + "node_modules/@sveltejs/vite-plugin-svelte": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-2.0.3.tgz", + "integrity": "sha512-o+cguBFdwIGtRbNkYOyqTM7KvRUffxh5bfK4oJsWKG2obu+v/cbpT03tJrGl58C7tRXo/aEC0/axN5FVHBj0nA==", + "dependencies": { + "debug": "^4.3.4", + "deepmerge": "^4.3.0", + "kleur": "^4.1.5", + "magic-string": "^0.29.0", + "svelte-hmr": "^0.15.1", + "vitefu": "^0.2.4" + }, + "engines": { + "node": "^14.18.0 || >= 16" + }, + "peerDependencies": { + "svelte": "^3.54.0", + "vite": "^4.0.0" + } + }, + "node_modules/@sveltejs/vite-plugin-svelte/node_modules/magic-string": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.29.0.tgz", + "integrity": "sha512-WcfidHrDjMY+eLjlU+8OvwREqHwpgCeKVBUpQ3OhYYuvfaYCUgcbuBzappNzZvg/v8onU3oQj+BYpkOJe9Iw4Q==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.13" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@tailwindcss/typography": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.9.tgz", + "integrity": "sha512-t8Sg3DyynFysV9f4JDOVISGsjazNb48AeIYQwcL+Bsq5uf4RYL75C1giZ43KISjeDGBaTN3Kxh7Xj/vRSMJUUg==", + "dev": true, + "dependencies": { + "lodash.castarray": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2", + "postcss-selector-parser": "6.0.10" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || insiders" + } + }, + "node_modules/@tailwindcss/typography/node_modules/postcss-selector-parser": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", + "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@types/cookie": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.5.1.tgz", + "integrity": "sha512-COUnqfB2+ckwXXSFInsFdOAWQzCCx+a5hq2ruyj+Vjund94RJQd4LG2u9hnvJrTgunKAaax7ancBYlDrNYxA0g==" + }, + "node_modules/@types/pug": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/pug/-/pug-2.0.6.tgz", + "integrity": "sha512-SnHmG9wN1UVmagJOnyo/qkk0Z7gejYxOYYmaAwr5u2yFYfsupN3sg10kyzN8Hep/2zbHxCnsumxOoRIRMBwKCg==" + }, + "node_modules/@types/sass": { + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/@types/sass/-/sass-1.45.0.tgz", + "integrity": "sha512-jn7qwGFmJHwUSphV8zZneO3GmtlgLsmhs/LQyVvQbIIa+fzGMUiHI4HXJZL3FT8MJmgXWbLGiVVY7ElvHq6vDA==", + "deprecated": "This is a stub types definition. sass provides its own type definitions, so you do not need this installed.", + "dependencies": { + "sass": "*" + } + }, + "node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-node": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", + "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", + "dev": true, + "dependencies": { + "acorn": "^7.0.0", + "acorn-walk": "^7.0.0", + "xtend": "^4.0.2" + } + }, + "node_modules/acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true + }, + "node_modules/autoprefixer": { + "version": "10.4.14", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.14.tgz", + "integrity": "sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + } + ], + "dependencies": { + "browserslist": "^4.21.5", + "caniuse-lite": "^1.0.30001464", + "fraction.js": "^4.2.0", + "normalize-range": "^0.1.2", + "picocolors": "^1.0.0", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.21.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", + "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001449", + "electron-to-chromium": "^1.4.284", + "node-releases": "^2.0.8", + "update-browserslist-db": "^1.0.10" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "engines": { + "node": "*" + } + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase-css": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001464", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001464.tgz", + "integrity": "sha512-oww27MtUmusatpRpCGSOneQk2/l5czXANDSFvsc7VuOQ86s3ANhZetpwXNf1zY/zdfP63Xvjz325DAdAoES13g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ] + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "dev": true, + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/css-selector-tokenizer": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.8.0.tgz", + "integrity": "sha512-Jd6Ig3/pe62/qe5SBPTN8h8LeUg/pT4lLgtavPf7updwwHpvFzxvOQBHYj2LZDMjUnBzgvIUSjRcf6oT5HzHFg==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "fastparse": "^1.1.2" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/daisyui": { + "version": "2.51.3", + "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-2.51.3.tgz", + "integrity": "sha512-AQa9exq/DsnvjyDi6bwOqHExQr9LJJag0iKRXNvRRtHXPo1gaAQ3ASJWylUB8J8KMH2M9zIpr7cvPHc7yGckyQ==", + "dev": true, + "dependencies": { + "color": "^4.2", + "css-selector-tokenizer": "^0.8.0", + "postcss-js": "^4.0.0", + "tailwindcss": "^3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/daisyui" + }, + "peerDependencies": { + "autoprefixer": "^10.0.2", + "postcss": "^8.1.6" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deepmerge": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.0.tgz", + "integrity": "sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/defined": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.1.tgz", + "integrity": "sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/detect-indent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", + "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/detective": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz", + "integrity": "sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==", + "dev": true, + "dependencies": { + "acorn-node": "^1.8.2", + "defined": "^1.0.0", + "minimist": "^1.2.6" + }, + "bin": { + "detective": "bin/detective.js" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/devalue": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.3.0.tgz", + "integrity": "sha512-n94yQo4LI3w7erwf84mhRUkUJfhLoCZiLyoOZ/QFsDbcWNZePrLwbQpvZBUG2TNxwV3VjCKPxkiiQA6pe3TrTA==" + }, + "node_modules/didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "dev": true + }, + "node_modules/dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "dev": true + }, + "node_modules/electron-to-chromium": { + "version": "1.4.328", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.328.tgz", + "integrity": "sha512-DE9tTy2PNmy1v55AZAO542ui+MLC2cvINMK4P2LXGsJdput/ThVG9t+QGecPuAZZSgC8XoI+Jh9M1OG9IoNSCw==", + "dev": true + }, + "node_modules/es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==" + }, + "node_modules/esbuild": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz", + "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.16.17", + "@esbuild/android-arm64": "0.16.17", + "@esbuild/android-x64": "0.16.17", + "@esbuild/darwin-arm64": "0.16.17", + "@esbuild/darwin-x64": "0.16.17", + "@esbuild/freebsd-arm64": "0.16.17", + "@esbuild/freebsd-x64": "0.16.17", + "@esbuild/linux-arm": "0.16.17", + "@esbuild/linux-arm64": "0.16.17", + "@esbuild/linux-ia32": "0.16.17", + "@esbuild/linux-loong64": "0.16.17", + "@esbuild/linux-mips64el": "0.16.17", + "@esbuild/linux-ppc64": "0.16.17", + "@esbuild/linux-riscv64": "0.16.17", + "@esbuild/linux-s390x": "0.16.17", + "@esbuild/linux-x64": "0.16.17", + "@esbuild/netbsd-x64": "0.16.17", + "@esbuild/openbsd-x64": "0.16.17", + "@esbuild/sunos-x64": "0.16.17", + "@esbuild/win32-arm64": "0.16.17", + "@esbuild/win32-ia32": "0.16.17", + "@esbuild/win32-x64": "0.16.17" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/esm-env": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.0.0.tgz", + "integrity": "sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==" + }, + "node_modules/fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fastparse": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", + "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fraction.js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", + "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==", + "dev": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://www.patreon.com/infusion" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globalyzer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", + "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==" + }, + "node_modules/globrex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==" + }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/immutable": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz", + "integrity": "sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg==" + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-meta-resolve": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-2.2.2.tgz", + "integrity": "sha512-f8KcQ1D80V7RnqVm+/lirO9zkOxjGxhaTC1IPrBGd3MEfNgmNG67tSUO9gTi2F3Blr2Az6g1vocaxzkVnWl9MA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/lilconfig": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", + "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "devOptional": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/lodash.castarray": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz", + "integrity": "sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==", + "dev": true + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/magic-string": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.0.tgz", + "integrity": "sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.13" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/mrmime": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", + "integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==", + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", + "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss": { + "version": "8.4.33", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", + "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-import": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-14.1.0.tgz", + "integrity": "sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-js": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", + "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", + "dev": true, + "dependencies": { + "camelcase-css": "^2.0.1" + }, + "engines": { + "node": "^12 || ^14 || >= 16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.4.21" + } + }, + "node_modules/postcss-load-config": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", + "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", + "devOptional": true, + "dependencies": { + "lilconfig": "^2.0.5", + "yaml": "^1.10.2" + }, + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/postcss-nested": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.0.tgz", + "integrity": "sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.10" + }, + "engines": { + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz", + "integrity": "sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "dev": true, + "dependencies": { + "pify": "^2.3.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/rollup": { + "version": "3.29.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz", + "integrity": "sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==", + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/sade": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", + "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", + "dependencies": { + "mri": "^1.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/sander": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", + "integrity": "sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==", + "dependencies": { + "es6-promise": "^3.1.2", + "graceful-fs": "^4.1.3", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.2" + } + }, + "node_modules/sass": { + "version": "1.59.2", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.59.2.tgz", + "integrity": "sha512-jJyO6SmbzkJexF8MUorHx5tAilcgabioYxT/BHbY4+OvoqmbHxsYlrjZ8Adhqcgl6Zqwie0TgMXLCAmPFxXOuw==", + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/set-cookie-parser": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.5.1.tgz", + "integrity": "sha512-1jeBGaKNGdEq4FgIrORu/N570dwoPYio8lSoYLWmX7sQ//0JY08Xh9o5pBcgmHQ/MbsYp/aZnOe1s1lIsbLprQ==" + }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/sirv": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.2.tgz", + "integrity": "sha512-4Qog6aE29nIjAOKe/wowFTxOdmbEZKb+3tsLljaBRzJwtqto0BChD2zzH0LhgCSXiI+V7X+Y45v14wBZQ1TK3w==", + "dependencies": { + "@polka/url": "^1.0.0-next.20", + "mrmime": "^1.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/sorcery": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.11.0.tgz", + "integrity": "sha512-J69LQ22xrQB1cIFJhPfgtLuI6BpWRiWu1Y3vSsIwK/eAScqJxd/+CJlUuHQRdX2C9NGFamq+KqNywGgaThwfHw==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.14", + "buffer-crc32": "^0.2.5", + "minimist": "^1.2.0", + "sander": "^0.5.0" + }, + "bin": { + "sorcery": "bin/sorcery" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/svelte": { + "version": "3.57.0", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.57.0.tgz", + "integrity": "sha512-WMXEvF+RtAaclw0t3bPDTUe19pplMlfyKDsixbHQYgCWi9+O9VN0kXU1OppzrB9gPAvz4NALuoca2LfW2bOjTQ==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/svelte-check": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.1.2.tgz", + "integrity": "sha512-8nIPXPe8TiUiWPCAoegU+l1NaL5DKLnN6+H1dJqbjkD6IkhpDTMj2q8Z88lhCOsq1F3E7st5/Vn7eGeGkSo/aA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.17", + "chokidar": "^3.4.1", + "fast-glob": "^3.2.7", + "import-fresh": "^3.2.1", + "picocolors": "^1.0.0", + "sade": "^1.7.4", + "svelte-preprocess": "^5.0.0", + "typescript": "^4.9.4" + }, + "bin": { + "svelte-check": "bin/svelte-check" + }, + "peerDependencies": { + "svelte": "^3.55.0" + } + }, + "node_modules/svelte-french-toast": { + "version": "1.0.4-beta.0", + "resolved": "https://registry.npmjs.org/svelte-french-toast/-/svelte-french-toast-1.0.4-beta.0.tgz", + "integrity": "sha512-PkYNukEQAPZyV5ei+JzeYEsbaXFSbJS8/SDTdC8giYa5Atxp2SRepFnPDWx6mu7rV53g886FNLktPMLwRljkpw==", + "dependencies": { + "svelte-writable-derived": "^3.0.1" + }, + "peerDependencies": { + "svelte": "^3.57.0" + } + }, + "node_modules/svelte-hmr": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.15.1.tgz", + "integrity": "sha512-BiKB4RZ8YSwRKCNVdNxK/GfY+r4Kjgp9jCLEy0DuqAKfmQtpL38cQK3afdpjw4sqSs4PLi3jIPJIFp259NkZtA==", + "engines": { + "node": "^12.20 || ^14.13.1 || >= 16" + }, + "peerDependencies": { + "svelte": ">=3.19.0" + } + }, + "node_modules/svelte-preprocess": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-5.0.1.tgz", + "integrity": "sha512-0HXyhCoc9rsW4zGOgtInylC6qj259E1hpFnJMJWTf+aIfeqh4O/QHT31KT2hvPEqQfdjmqBR/kO2JDkkciBLrQ==", + "hasInstallScript": true, + "dependencies": { + "@types/pug": "^2.0.6", + "@types/sass": "^1.43.1", + "detect-indent": "^6.1.0", + "magic-string": "^0.27.0", + "sorcery": "^0.11.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">= 14.10.0" + }, + "peerDependencies": { + "@babel/core": "^7.10.2", + "coffeescript": "^2.5.1", + "less": "^3.11.3 || ^4.0.0", + "postcss": "^7 || ^8", + "postcss-load-config": "^2.1.0 || ^3.0.0 || ^4.0.0", + "pug": "^3.0.0", + "sass": "^1.26.8", + "stylus": "^0.55.0", + "sugarss": "^2.0.0 || ^3.0.0 || ^4.0.0", + "svelte": "^3.23.0", + "typescript": "^3.9.5 || ^4.0.0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "coffeescript": { + "optional": true + }, + "less": { + "optional": true + }, + "postcss": { + "optional": true + }, + "postcss-load-config": { + "optional": true + }, + "pug": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/svelte-preprocess/node_modules/magic-string": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz", + "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.13" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/svelte-writable-derived": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-3.0.1.tgz", + "integrity": "sha512-zBWCS5c3MA9o4NT/UJHP3KoPOhtmH2ZQ/QRK31w9LzLdPP7MNncUcBGIu4iH2RVt17iRfR6agm7nEqwNvsYuMw==", + "funding": { + "url": "https://ko-fi.com/pixievoltno1" + }, + "peerDependencies": { + "svelte": "^3.2.1" + } + }, + "node_modules/tailwindcss": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.7.tgz", + "integrity": "sha512-B6DLqJzc21x7wntlH/GsZwEXTBttVSl1FtCzC8WP4oBc/NKef7kaax5jeihkkCEWc831/5NDJ9gRNDK6NEioQQ==", + "dev": true, + "dependencies": { + "arg": "^5.0.2", + "chokidar": "^3.5.3", + "color-name": "^1.1.4", + "detective": "^5.2.1", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.2.12", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "lilconfig": "^2.0.6", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.0.0", + "postcss": "^8.0.9", + "postcss-import": "^14.1.0", + "postcss-js": "^4.0.0", + "postcss-load-config": "^3.1.4", + "postcss-nested": "6.0.0", + "postcss-selector-parser": "^6.0.11", + "postcss-value-parser": "^4.2.0", + "quick-lru": "^5.1.1", + "resolve": "^1.22.1" + }, + "bin": { + "tailwind": "lib/cli.js", + "tailwindcss": "lib/cli.js" + }, + "engines": { + "node": ">=12.13.0" + }, + "peerDependencies": { + "postcss": "^8.0.9" + } + }, + "node_modules/tailwindcss/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/tiny-glob": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", + "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==", + "dependencies": { + "globalyzer": "0.1.0", + "globrex": "^0.1.2" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/totalist": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.0.tgz", + "integrity": "sha512-eM+pCBxXO/njtF7vdFsHuqb+ElbxqtI4r5EAvk6grfAFyJ6IvWlSkfZ5T9ozC6xWw3Fj1fGoSmrl0gUs46JVIw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "dev": true + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "devOptional": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/undici": { + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.20.0.tgz", + "integrity": "sha512-J3j60dYzuo6Eevbawwp1sdg16k5Tf768bxYK4TUJRH7cBM4kFCbf3mOnM/0E3vQYXvpxITbbWmBafaDbxLDz3g==", + "dependencies": { + "busboy": "^1.6.0" + }, + "engines": { + "node": ">=12.18" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/vite": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.2.tgz", + "integrity": "sha512-tBCZBNSBbHQkaGyhGCDUGqeo2ph8Fstyp6FMSvTtsXeZSPpSMGlviAOav2hxVTqFcx8Hj/twtWKsMJXNY0xI8w==", + "dependencies": { + "esbuild": "^0.18.10", + "postcss": "^8.4.27", + "rollup": "^3.27.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "cpu": [ + "loong64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, + "node_modules/vitefu": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.4.tgz", + "integrity": "sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==", + "peerDependencies": { + "vite": "^3.0.0 || ^4.0.0" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + } + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "devOptional": true, + "engines": { + "node": ">= 6" + } + } + } +} diff --git a/frontend/package.json b/frontend/package.json new file mode 100644 index 0000000..7615d03 --- /dev/null +++ b/frontend/package.json @@ -0,0 +1,33 @@ +{ + "name": "client", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^2.0.0", + "@sveltejs/adapter-netlify": "^1.0.0-next.88", + "@sveltejs/kit": "^1.15.2", + "@tailwindcss/typography": "^0.5.9", + "autoprefixer": "^10.4.14", + "daisyui": "^2.51.3", + "postcss": "^8.4.21", + "svelte": "^3.54.0", + "svelte-check": "^3.0.1", + "tailwindcss": "^3.2.7", + "tslib": "^2.4.1", + "typescript": "^4.9.3", + "vite": "^4.5.2" + }, + "type": "module", + "dependencies": { + "@sveltejs/adapter-static": "^2.0.1", + "svelte-french-toast": "^1.0.4-beta.0", + "svelte-preprocess": "^5.0.1" + } +} diff --git a/frontend/postcss.config.cjs b/frontend/postcss.config.cjs new file mode 100644 index 0000000..33ad091 --- /dev/null +++ b/frontend/postcss.config.cjs @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/frontend/src/app.css b/frontend/src/app.css new file mode 100644 index 0000000..bd6213e --- /dev/null +++ b/frontend/src/app.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; \ No newline at end of file diff --git a/frontend/src/app.d.ts b/frontend/src/app.d.ts new file mode 100644 index 0000000..f59b884 --- /dev/null +++ b/frontend/src/app.d.ts @@ -0,0 +1,12 @@ +// See https://kit.svelte.dev/docs/types#app +// for information about these interfaces +declare global { + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface Platform {} + } +} + +export {}; diff --git a/frontend/src/app.html b/frontend/src/app.html new file mode 100644 index 0000000..effe0d0 --- /dev/null +++ b/frontend/src/app.html @@ -0,0 +1,12 @@ + + + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ + diff --git a/frontend/src/lib/stores/user.ts b/frontend/src/lib/stores/user.ts new file mode 100644 index 0000000..f9ac443 --- /dev/null +++ b/frontend/src/lib/stores/user.ts @@ -0,0 +1,7 @@ +import { writable } from "svelte/store"; + +export const user = writable(""); +export const channel = writable(""); +export const eth_private_key = writable(""); +export const group = writable(""); +export const createNewRoom = writable(false); diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte new file mode 100644 index 0000000..f616b92 --- /dev/null +++ b/frontend/src/routes/+layout.svelte @@ -0,0 +1,11 @@ + + + +
+
+ +
+
\ No newline at end of file diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte new file mode 100644 index 0000000..ccb5e07 --- /dev/null +++ b/frontend/src/routes/+page.svelte @@ -0,0 +1,99 @@ + + +
+
+

Chatr: a Websocket chatroom

+
+
+
+
+
+

+ List of active chatroom's +

+ +
+ {#if status && rooms.length < 1} +
+
+

{status}

+
+
+ {/if} + {#if rooms} + {#each rooms as room} +
+
+
+

{room}

+ +
+
+
+ {/each} + {/if} +
+
+
+ + +
+
+ + +
+
+ +
+ +
+
+

+ Check out Chatr, to view the source code! +

+
+
diff --git a/frontend/src/routes/+page.ts b/frontend/src/routes/+page.ts new file mode 100644 index 0000000..b73fb26 --- /dev/null +++ b/frontend/src/routes/+page.ts @@ -0,0 +1,18 @@ +import type {PageLoad} from './$types'; +import {env} from "$env/dynamic/public"; + +export const load: PageLoad = async ({fetch}) => { + try { + let url = `${env.PUBLIC_API_URL}`; + if (url.endsWith("/")) { + url = url.slice(0, -1); + } + const res = await fetch(`${url}/rooms`); + return await res.json(); + } catch (e) { + return { + status: "API offline (try again in a min)", + rooms: [] + } + } +} \ No newline at end of file diff --git a/frontend/src/routes/chat/+page.svelte b/frontend/src/routes/chat/+page.svelte new file mode 100644 index 0000000..90287fb --- /dev/null +++ b/frontend/src/routes/chat/+page.svelte @@ -0,0 +1,117 @@ + +
+

Chat Room {status} +

+ +
+
+
+
+ {#each messages as msg} +
{msg}
+ {/each} +
+
+
+ +
+
+ + +
+
diff --git a/frontend/static/favicon.png b/frontend/static/favicon.png new file mode 100644 index 0000000..825b9e6 Binary files /dev/null and b/frontend/static/favicon.png differ diff --git a/frontend/svelte.config.js b/frontend/svelte.config.js new file mode 100644 index 0000000..e94eb7b --- /dev/null +++ b/frontend/svelte.config.js @@ -0,0 +1,16 @@ +import adapter from '@sveltejs/adapter-netlify'; +import preprocess from 'svelte-preprocess'; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + preprocess: preprocess({ + postcss: true + }), + + kit: { + adapter: adapter() + } +}; + +export default config; + diff --git a/frontend/tailwind.config.cjs b/frontend/tailwind.config.cjs new file mode 100644 index 0000000..c604c59 --- /dev/null +++ b/frontend/tailwind.config.cjs @@ -0,0 +1,8 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: ['./src/**/*.{html,js,svelte,ts}'], + theme: { + extend: {} + }, + plugins: [require('@tailwindcss/typography'), require('daisyui')], +}; \ No newline at end of file diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json new file mode 100644 index 0000000..9da8f86 --- /dev/null +++ b/frontend/tsconfig.json @@ -0,0 +1,21 @@ +{ + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "paths": { + "$lib": ["src/lib"], + "$lib/*": ["src/lib/*"] + } + } + // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias + // + // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes + // from the referenced tsconfig.json - TypeScript does not merge them in +} diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts new file mode 100644 index 0000000..15787f7 --- /dev/null +++ b/frontend/vite.config.ts @@ -0,0 +1,6 @@ +import {sveltekit} from '@sveltejs/kit/vite'; +import {defineConfig} from 'vite'; + +export default defineConfig({ + plugins: [sveltekit()], +}); diff --git a/sc_key_store/Cargo.toml b/sc_key_store/Cargo.toml deleted file mode 100644 index 11dcefa..0000000 --- a/sc_key_store/Cargo.toml +++ /dev/null @@ -1,32 +0,0 @@ -[package] -name = "sc_key_store" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -foundry-contracts.workspace = true -openmls = { version = "=0.5.0", features = ["test-utils"] } -openmls_basic_credential = "=0.2.0" - -thiserror = "=1.0.61" -anyhow = "=1.0.81" - -tls_codec = "=0.3.0" -hex = "0.4.3" -url = "2.5.2" - -eyre = "=0.6" -tokio = { version = "=1.38.0", features = ["macros", "rt-multi-thread"] } -alloy = { git = "https://github.com/alloy-rs/alloy", features = [ - "providers", - "node-bindings", - "network", - "signer-local", - "transports", - "transport-http", - "k256", -] } - -mls_crypto = { path = "../mls_crypto" } diff --git a/sc_key_store/src/lib.rs b/sc_key_store/src/lib.rs deleted file mode 100644 index f5d2a7a..0000000 --- a/sc_key_store/src/lib.rs +++ /dev/null @@ -1,36 +0,0 @@ -pub mod sc_ks; - -use alloy::hex::FromHexError; - -pub trait SCKeyStoreService { - fn does_user_exist( - &self, - address: &str, - ) -> impl std::future::Future>; - fn add_user( - &mut self, - address: &str, - ) -> impl std::future::Future>; - fn remove_user( - &self, - address: &str, - ) -> impl std::future::Future>; -} - -#[derive(Debug, thiserror::Error)] -pub enum KeyStoreError { - #[error("User already exists.")] - UserAlreadyExistsError, - - #[error("User not found.")] - UserNotFoundError, - - #[error("Alloy contract operation failed: {0}")] - AlloyContractError(#[from] alloy::contract::Error), - - #[error("Failed to parse address: {0}")] - AddressParseError(#[from] FromHexError), - - #[error("An unexpected error occurred: {0}")] - UnexpectedError(anyhow::Error), -} diff --git a/sc_key_store/src/sc_ks.rs b/sc_key_store/src/sc_ks.rs deleted file mode 100644 index 434218d..0000000 --- a/sc_key_store/src/sc_ks.rs +++ /dev/null @@ -1,67 +0,0 @@ -use alloy::{network::Network, primitives::Address, providers::Provider, transports::Transport}; -use foundry_contracts::sckeystore::ScKeystore::{self, ScKeystoreInstance}; -use std::str::FromStr; - -use crate::{KeyStoreError, SCKeyStoreService}; - -pub struct ScKeyStorage { - instance: ScKeystoreInstance, - address: String, -} - -impl ScKeyStorage -where - T: Transport + Clone, - P: Provider, - N: Network, -{ - pub fn new(provider: P, address: Address) -> Self { - Self { - instance: ScKeystore::new(address, provider), - address: address.to_string(), - } - } - - pub fn sc_adsress(&self) -> String { - self.address.clone() - } -} - -impl, N: Network> SCKeyStoreService - for ScKeyStorage -{ - async fn does_user_exist(&self, address: &str) -> Result { - let address = Address::from_str(address)?; - let res = self.instance.userExists(address).call().await; - match res { - Ok(is_exist) => Ok(is_exist._0), - Err(err) => Err(KeyStoreError::AlloyContractError(err)), - } - } - - async fn add_user(&mut self, address: &str) -> Result<(), KeyStoreError> { - if self.does_user_exist(address).await? { - return Err(KeyStoreError::UserAlreadyExistsError); - } - - let add_to_acl_binding = self.instance.addUser(Address::from_str(address)?); - let res = add_to_acl_binding.send().await; - match res { - Ok(_) => Ok(()), - Err(err) => Err(KeyStoreError::AlloyContractError(err)), - } - } - - async fn remove_user(&self, address: &str) -> Result<(), KeyStoreError> { - if !self.does_user_exist(address).await? { - return Err(KeyStoreError::UserNotFoundError); - } - - let remove_user_binding = self.instance.removeUser(Address::from_str(address)?); - let res = remove_user_binding.send().await; - match res { - Ok(_) => Ok(()), - Err(err) => Err(KeyStoreError::AlloyContractError(err)), - } - } -} diff --git a/src/cli.rs b/src/cli.rs deleted file mode 100644 index 65a3f54..0000000 --- a/src/cli.rs +++ /dev/null @@ -1,242 +0,0 @@ -use clap::{arg, command, Parser, Subcommand}; -use crossterm::{ - event::{self, Event, KeyCode}, - execute, - terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen}, -}; -use ratatui::{ - backend::CrosstermBackend, - layout::{Constraint, Direction, Layout}, - style::{Color, Modifier, Style}, - text::Text, - widgets::{Block, Borders, List, ListItem, Paragraph, Wrap}, - Frame, Terminal, -}; -use std::{ - io::{stdout, Read, Write}, - sync::Arc, -}; -use tokio::{ - sync::mpsc::{Receiver, Sender}, - sync::Mutex, -}; -use tokio_util::sync::CancellationToken; -use url::Url; - -use crate::CliError; - -#[derive(Parser, Debug)] -#[command(version, about, long_about = None)] -pub struct Args { - /// User private key that correspond to Ethereum wallet - #[arg(short = 'K', long)] - pub user_priv_key: String, - // /// Rpc url - // #[arg(short = 'U', long, - // default_value_t = Url::from_str("http://localhost:8545").unwrap())] - // pub storage_url: Url, - - // /// Storage contract address - // #[arg(short = 'S', long)] - // pub storage_addr: String, -} - -pub enum Msg { - Input(Message), - Refresh(String), - Exit, -} - -#[derive(Clone)] -pub enum Message { - Incoming(String, String, String), - Mine(String, String, String), - System(String), - Error(String), -} - -#[derive(Debug, Parser)] -#[command(multicall = true)] -pub struct Cli { - #[command(subcommand)] - pub command: Commands, -} - -#[derive(Debug, Subcommand, Clone)] -pub enum Commands { - CreateGroup { - group_name: String, - storage_address: String, - storage_url: Url, - }, - Invite { - group_name: String, - users_wallet_addrs: Vec, - }, - SendMessage { - group_name: String, - msg: Vec, - }, - // RemoveUser { user_wallet: String }, - Exit, -} - -pub fn readline() -> Result { - write!(std::io::stdout(), "$ ")?; - std::io::stdout().flush()?; - let mut buffer = String::new(); - std::io::stdin().read_to_string(&mut buffer)?; - Ok(buffer) -} - -pub async fn event_handler( - messages_tx: Sender, - cli_tx: Sender, - token: CancellationToken, -) -> Result<(), CliError> { - let mut input = String::new(); - loop { - if let Event::Key(key) = tokio::task::spawn_blocking(event::read).await?? { - match key.code { - KeyCode::Char(c) => { - input.push(c); - } - KeyCode::Backspace => { - input.pop(); - } - KeyCode::Enter => { - let line: String = std::mem::take(&mut input); - let args = shlex::split(&line).ok_or(CliError::SplitLineError)?; - let cli = Cli::try_parse_from(args); - if cli.is_err() { - messages_tx - .send(Msg::Input(Message::System("Unknown command".to_string()))) - .await - .map_err(|err| CliError::SenderError(err.to_string()))?; - continue; - } - cli_tx - .send(cli.unwrap().command) - .await - .map_err(|err| CliError::SenderError(err.to_string()))?; - } - KeyCode::Esc => { - messages_tx - .send(Msg::Exit) - .await - .map_err(|err| CliError::SenderError(err.to_string()))?; - token.cancel(); - break; - } - _ => {} - } - messages_tx - .send(Msg::Refresh(input.clone())) - .await - .map_err(|err| CliError::SenderError(err.to_string()))?; - } - } - Ok::<_, CliError>(()) -} - -pub fn ui(f: &mut Frame, messages: &[Message], input: &str) { - let chunks = Layout::default() - .direction(Direction::Vertical) - .constraints([Constraint::Min(1), Constraint::Length(3)].as_ref()) - .split(f.size()); - - let message_items: Vec = messages - .iter() - .map(|message| { - let (content, style) = match message { - Message::Incoming(group, from, msg) => ( - format!("[0x{}]@{}: {}", from, group, msg), - Style::default().fg(Color::LightGreen), - ), - Message::Mine(group, from, msg) => ( - format!("[0x{}]@{}: {}", from, group, msg), - Style::default() - .fg(Color::LightGreen) - .add_modifier(Modifier::BOLD), - ), - Message::System(msg) => (format!("[System]: {}", msg), Style::default()), - Message::Error(msg) => (msg.clone(), Style::default().fg(Color::LightRed)), - }; - ListItem::new(content).style(style) - }) - .collect(); - - let messages_history = List::new(message_items).block( - Block::default() - .borders(Borders::ALL) - .title("messages history"), - ); - - let input_line = Paragraph::new(Text::raw(input)) - .style( - Style::default() - .fg(Color::Yellow) - .add_modifier(Modifier::BOLD), - ) - .block(Block::default().borders(Borders::ALL).title("input line")) - .wrap(Wrap { trim: false }); - - f.render_widget(messages_history, chunks[0]); - f.render_widget(input_line, chunks[1]); -} - -pub async fn terminal_handler( - mut messages_rx: Receiver, - token: CancellationToken, -) -> Result<(), CliError> { - enable_raw_mode()?; - let mut stdout = stdout(); - execute!(stdout, EnterAlternateScreen)?; - let backend = CrosstermBackend::new(stdout); - let terminal = Arc::new(Mutex::new(Terminal::new(backend)?)); - - let messages = Arc::new(Mutex::new(vec![])); - let input = Arc::new(Mutex::new(String::new())); - - let messages_clone = Arc::clone(&messages); - let input_clone = Arc::clone(&input); - while let Some(msg) = messages_rx.recv().await { - match msg { - Msg::Input(m) => { - let mut messages = messages_clone.lock().await; - messages.push(m); - if messages.len() == 100 { - messages.remove(0); - } - } - Msg::Refresh(i) => { - let mut input = input_clone.lock().await; - *input = i; - } - Msg::Exit => { - token.cancel(); - break; - } - }; - - let messages = Arc::clone(&messages_clone); - let input = Arc::clone(&input_clone); - let terminal = Arc::clone(&terminal); - tokio::task::spawn_blocking(move || { - let messages = messages.blocking_lock(); - let input = input.blocking_lock(); - terminal - .blocking_lock() - .draw(|f| ui(f, &messages, &input)) - .unwrap(); - }) - .await?; - } - - // Restore terminal - disable_raw_mode()?; - let mut terminal_lock = terminal.lock().await; - execute!(terminal_lock.backend_mut(), LeaveAlternateScreen)?; - terminal_lock.show_cursor()?; - Ok(()) -} diff --git a/src/contact.rs b/src/contact.rs deleted file mode 100644 index 825fb8f..0000000 --- a/src/contact.rs +++ /dev/null @@ -1,213 +0,0 @@ -use alloy::hex::ToHexExt; -use ds::{ - chat_client::{ - ChatClient, ChatMessages, ReqMessageType, RequestMLSPayload, ResponseMLSPayload, - }, - chat_server::ServerMessage, -}; -// use waku_bindings::*; - -use openmls::prelude::MlsMessageOut; -use std::{collections::HashMap, sync::Arc}; -use tls_codec::Serialize; -use tokio::sync::Mutex; -use tokio_util::sync::CancellationToken; - -use crate::ContactError; - -pub const CHAT_SERVER_ADDR: &str = "ws://127.0.0.1:8080"; - -pub struct ContactsList { - contacts: Arc>>, - group_id2sc: HashMap, - pub future_req: HashMap, - pub chat_client: ChatClient, -} - -pub struct Contact { - // map group_name to key_package bytes - group_id2user_kp: HashMap>, - // user_p2p_addr: WakuPeers, -} - -impl Contact { - pub fn get_relevant_kp(&mut self, group_name: String) -> Result, ContactError> { - match self.group_id2user_kp.remove(&group_name) { - Some(kp) => Ok(kp.clone()), - None => Err(ContactError::MissingKeyPackageForGroup), - } - } - - pub fn add_key_package( - &mut self, - key_package: Vec, - group_name: String, - ) -> Result<(), ContactError> { - match self.group_id2user_kp.insert(group_name, key_package) { - Some(_) => Err(ContactError::DuplicateUserError), - None => Ok(()), - } - } -} - -impl ContactsList { - pub async fn new(chat_client: ChatClient) -> Result { - Ok(ContactsList { - contacts: Arc::new(Mutex::new(HashMap::new())), - group_id2sc: HashMap::new(), - future_req: HashMap::new(), - chat_client, - }) - } - - pub fn send_welcome_msg_to_users( - &mut self, - self_address: String, - users_address: Vec, - welcome: MlsMessageOut, - ) -> Result<(), ContactError> { - let bytes = welcome.tls_serialize_detached()?; - let welcome_str: String = bytes.encode_hex(); - - let msg = ChatMessages::Welcome(welcome_str); - self.chat_client.send_message(ServerMessage::InMessage { - from: self_address, - to: users_address, - msg: serde_json::to_string(&msg)?, - })?; - - Ok(()) - } - - pub fn send_msg_req( - &mut self, - self_address: String, - user_address: String, - group_name: String, - msg_type: ReqMessageType, - ) -> Result<(), ContactError> { - self.future_req - .insert(user_address.clone(), CancellationToken::new()); - - let sc_address = match self.group_id2sc.get(&group_name).cloned() { - Some(sc) => sc, - None => return Err(ContactError::MissingSmartContractForGroup), - }; - - let req = ChatMessages::Request(RequestMLSPayload::new(sc_address, group_name, msg_type)); - self.chat_client.send_message(ServerMessage::InMessage { - from: self_address, - to: vec![user_address], - msg: serde_json::to_string(&req)?, - })?; - - Ok(()) - } - - pub fn send_resp_msg_to_user( - &mut self, - self_address: String, - user_address: &str, - resp: ResponseMLSPayload, - ) -> Result<(), ContactError> { - let resp_j = ChatMessages::Response(resp); - self.chat_client.send_message(ServerMessage::InMessage { - from: self_address, - to: vec![user_address.to_string()], - msg: serde_json::to_string(&resp_j)?, - })?; - Ok(()) - } - - pub async fn add_new_contact(&mut self, user_address: &str) -> Result<(), ContactError> { - let mut contacts = self.contacts.lock().await; - if contacts.contains_key(user_address) { - return Err(ContactError::DuplicateUserError); - } - - match contacts.insert( - user_address.to_string(), - Contact { - group_id2user_kp: HashMap::new(), - }, - ) { - Some(_) => Err(ContactError::DuplicateUserError), - None => Ok(()), - } - } - - pub async fn add_key_package_to_contact( - &mut self, - user_wallet: &str, - key_package: Vec, - group_name: String, - ) -> Result<(), ContactError> { - let mut contacts = self.contacts.lock().await; - match contacts.get_mut(user_wallet) { - Some(user) => user.add_key_package(key_package, group_name)?, - None => return Err(ContactError::UserNotFoundError), - } - Ok(()) - } - - pub async fn does_user_in_contacts(&self, user_wallet: &str) -> bool { - let contacts = self.contacts.lock().await; - contacts.get(user_wallet).is_some() - } - - pub async fn prepare_joiners( - &mut self, - user_wallets: Vec, - group_name: String, - ) -> Result>, ContactError> { - let mut joiners_kp = HashMap::with_capacity(user_wallets.len()); - - for user_wallet in user_wallets { - if joiners_kp.contains_key(&user_wallet) { - return Err(ContactError::DuplicateUserError); - } - - let mut contacts = self.contacts.lock().await; - match contacts.get_mut(&user_wallet) { - Some(contact) => match contact.get_relevant_kp(group_name.clone()) { - Ok(kp) => match joiners_kp.insert(user_wallet, kp) { - Some(_) => return Err(ContactError::DuplicateUserError), - None => continue, - }, - Err(err) => return Err(err), - }, - None => return Err(ContactError::UserNotFoundError), - } - } - - Ok(joiners_kp) - } - - pub fn handle_response(&mut self, user_address: &str) -> Result<(), ContactError> { - match self.future_req.get(user_address) { - Some(token) => { - token.cancel(); - Ok(()) - } - None => Err(ContactError::UserNotFoundError), - } - } - - pub fn insert_group2sc( - &mut self, - group_name: String, - sc_address: String, - ) -> Result<(), ContactError> { - match self.group_id2sc.insert(group_name, sc_address) { - Some(_) => Err(ContactError::GroupAlreadyExistsError), - None => Ok(()), - } - } - - pub fn group2sc(&self, group_name: String) -> Result { - match self.group_id2sc.get(&group_name).cloned() { - Some(addr) => Ok(addr), - None => Err(ContactError::GroupNotFoundError(group_name)), - } - } -} diff --git a/src/conversation.rs b/src/conversation.rs deleted file mode 100644 index b837027..0000000 --- a/src/conversation.rs +++ /dev/null @@ -1,52 +0,0 @@ -use std::fmt::Display; - -#[derive(Default, Debug)] -pub struct Conversation { - messages: Vec, -} - -#[derive(Clone, Debug)] -pub struct ConversationMessage { - pub group: String, - pub author: String, - pub message: String, -} - -impl Display for ConversationMessage { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - writeln!( - f, - "Group: {:#?}\nAuthor: {:#?}\nMessage: {:#?}", - self.group, self.author, self.message - ) - } -} - -impl Conversation { - /// Add a message string to the conversation list. - pub fn add(&mut self, conversation_message: ConversationMessage) { - self.messages.push(conversation_message) - } - - /// Get a list of messages in the conversation. - /// The function returns the `last_n` messages. - pub fn get(&self, last_n: usize) -> Option<&[ConversationMessage]> { - let num_messages = self.messages.len(); - let start = if last_n > num_messages { - 0 - } else { - num_messages - last_n - }; - self.messages.get(start..num_messages) - } -} - -impl ConversationMessage { - pub fn new(group: String, author: String, message: String) -> Self { - Self { - group, - author, - message, - } - } -} diff --git a/src/group_actor.rs b/src/group_actor.rs new file mode 100644 index 0000000..c8eafb9 --- /dev/null +++ b/src/group_actor.rs @@ -0,0 +1,359 @@ +use alloy::hex; +use chrono::Utc; +use ds::{ + ds_waku::{APP_MSG_SUBTOPIC, COMMIT_MSG_SUBTOPIC, WELCOME_SUBTOPIC}, + waku_actor::ProcessMessageToSend, +}; +use kameo::Actor; +use libsecp256k1::{PublicKey, SecretKey}; +use openmls::{group::*, prelude::*}; +use openmls_basic_credential::SignatureKeyPair; +use std::{fmt::Display, sync::Arc}; +use tokio::sync::Mutex; + +use crate::*; +use mls_crypto::openmls_provider::*; + +#[derive(Clone, Debug)] +pub enum GroupAction { + MessageToPrint(MessageToPrint), + RemoveGroup, + DoNothing, +} + +#[derive(Clone, Debug, Actor)] +pub struct Group { + group_name: String, + mls_group: Option>>, + admin: Option, + is_kp_shared: bool, + app_id: Vec, +} + +impl Group { + pub fn new( + group_name: String, + is_creation: bool, + provider: Option<&MlsCryptoProvider>, + signer: Option<&SignatureKeyPair>, + credential_with_key: Option<&CredentialWithKey>, + ) -> Result { + let uuid = uuid::Uuid::new_v4().as_bytes().to_vec(); + if is_creation { + let group_id = group_name.as_bytes(); + // Create a new MLS group instance + let group_config = MlsGroupConfig::builder() + .use_ratchet_tree_extension(true) + .build(); + let mls_group = MlsGroup::new_with_group_id( + provider.unwrap(), + signer.unwrap(), + &group_config, + GroupId::from_slice(group_id), + credential_with_key.unwrap().clone(), + )?; + Ok(Group { + group_name, + mls_group: Some(Arc::new(Mutex::new(mls_group))), + admin: Some(Admin::new()), + is_kp_shared: true, + app_id: uuid.clone(), + }) + } else { + Ok(Group { + group_name, + mls_group: None, + admin: None, + is_kp_shared: false, + app_id: uuid.clone(), + }) + } + } + + pub async fn members_identity(&self) -> Vec { + let mls_group = self.mls_group.as_ref().unwrap().lock().await; + mls_group + .members() + .map(|m| hex::encode(m.credential.identity())) + .collect() + } + + pub fn set_mls_group(&mut self, mls_group: MlsGroup) -> Result<(), GroupError> { + self.is_kp_shared = true; + self.mls_group = Some(Arc::new(Mutex::new(mls_group))); + Ok(()) + } + + pub fn is_mls_group_initialized(&self) -> bool { + self.mls_group.is_some() + } + + pub fn is_kp_shared(&self) -> bool { + self.is_kp_shared + } + + pub fn set_kp_shared(&mut self, is_kp_shared: bool) { + self.is_kp_shared = is_kp_shared; + } + + pub fn is_admin(&self) -> bool { + self.admin.is_some() + } + + pub fn app_id(&self) -> Vec { + self.app_id.clone() + } + + pub fn decrypt_admin_msg(&self, message: Vec) -> Result { + if !self.is_admin() { + return Err(GroupError::AdminNotSetError); + } + let msg: KeyPackage = self.admin.as_ref().unwrap().decrypt_msg(message)?; + Ok(msg) + } + + pub async fn add_members( + &mut self, + users_kp: Vec, + provider: &MlsCryptoProvider, + signer: &SignatureKeyPair, + ) -> Result, GroupError> { + if !self.is_mls_group_initialized() { + return Err(GroupError::MlsGroupNotInitializedError); + } + let mut mls_group = self.mls_group.as_mut().unwrap().lock().await; + let (out_messages, welcome, _group_info) = + mls_group.add_members(provider, signer, &users_kp)?; + + mls_group.merge_pending_commit(provider)?; + let msg_to_send_commit = ProcessMessageToSend { + msg: out_messages.tls_serialize_detached()?, + subtopic: COMMIT_MSG_SUBTOPIC.to_string(), + group_id: self.group_name.clone(), + app_id: self.app_id.clone(), + }; + + let welcome_serialized = welcome.tls_serialize_detached()?; + let welcome_msg: Vec = serde_json::to_vec(&WelcomeMessage { + message_type: WelcomeMessageType::WelcomeShare, + message_payload: welcome_serialized, + })?; + + let msg_to_send_welcome = ProcessMessageToSend { + msg: welcome_msg, + subtopic: WELCOME_SUBTOPIC.to_string(), + group_id: self.group_name.clone(), + app_id: self.app_id.clone(), + }; + + Ok(vec![msg_to_send_commit, msg_to_send_welcome]) + } + + pub async fn remove_members( + &mut self, + users: Vec, + provider: &MlsCryptoProvider, + signer: &SignatureKeyPair, + ) -> Result { + if !self.is_mls_group_initialized() { + return Err(GroupError::MlsGroupNotInitializedError); + } + let mut mls_group = self.mls_group.as_mut().unwrap().lock().await; + let mut leaf_indexs = Vec::new(); + let members = mls_group.members().collect::>(); + for user in users { + for m in members.iter() { + if hex::encode(m.credential.identity()) == user { + leaf_indexs.push(m.index); + } + } + } + // Remove operation on the mls group + let (remove_message, _welcome, _group_info) = + mls_group.remove_members(provider, signer, &leaf_indexs)?; + + // Second, process the removal on our end. + mls_group.merge_pending_commit(provider)?; + + let msg_to_send_commit = ProcessMessageToSend { + msg: remove_message.tls_serialize_detached()?, + subtopic: COMMIT_MSG_SUBTOPIC.to_string(), + group_id: self.group_name.clone(), + app_id: self.app_id.clone(), + }; + + Ok(msg_to_send_commit) + } + + pub async fn process_protocol_msg( + &mut self, + message: ProtocolMessage, + provider: &MlsCryptoProvider, + signature_key: Vec, + ) -> Result { + let group_id = message.group_id().as_slice().to_vec(); + if group_id != self.group_name.as_bytes().to_vec() { + return Ok(GroupAction::DoNothing); + } + if !self.is_mls_group_initialized() { + return Err(GroupError::MlsGroupNotInitializedError); + } + let mut mls_group = self.mls_group.as_mut().unwrap().lock().await; + + // If the message is from a previous epoch, we don't need to process it and it's a commit for welcome message + if message.epoch() < mls_group.epoch() && message.epoch() == 0.into() { + return Ok(GroupAction::DoNothing); + } + + let processed_message = mls_group.process_message(provider, message)?; + let processed_message_credential: Credential = processed_message.credential().clone(); + + match processed_message.into_content() { + ProcessedMessageContent::ApplicationMessage(application_message) => { + let sender_name = { + let user_id = mls_group.members().find_map(|m| { + if m.credential.identity() == processed_message_credential.identity() + && (signature_key != m.signature_key.as_slice()) + { + Some(hex::encode(m.credential.identity())) + } else { + None + } + }); + if user_id.is_none() { + return Ok(GroupAction::DoNothing); + } + user_id.unwrap() + }; + + let conversation_message = MessageToPrint::new( + sender_name, + String::from_utf8(application_message.into_bytes())?, + self.group_name.clone(), + ); + return Ok(GroupAction::MessageToPrint(conversation_message)); + } + ProcessedMessageContent::ProposalMessage(_proposal_ptr) => (), + ProcessedMessageContent::ExternalJoinProposalMessage(_external_proposal_ptr) => (), + ProcessedMessageContent::StagedCommitMessage(commit_ptr) => { + let mut remove_proposal: bool = false; + if commit_ptr.self_removed() { + remove_proposal = true; + } + mls_group.merge_staged_commit(provider, *commit_ptr)?; + if remove_proposal { + // here we need to remove group instance locally and + // also remove correspond key package from local storage ans sc storage + if mls_group.is_active() { + return Err(GroupError::GroupStillActiveError); + } + return Ok(GroupAction::RemoveGroup); + } + } + }; + Ok(GroupAction::DoNothing) + } + + pub fn generate_admin_message(&mut self) -> Result { + let admin = match self.admin.as_mut() { + Some(a) => a, + None => return Err(GroupError::AdminNotSetError), + }; + admin.generate_new_key_pair(); + let admin_msg = admin.generate_admin_message(); + + let wm = WelcomeMessage { + message_type: WelcomeMessageType::GroupAnnouncement, + message_payload: serde_json::to_vec(&admin_msg)?, + }; + let msg_to_send = ProcessMessageToSend { + msg: serde_json::to_vec(&wm)?, + subtopic: WELCOME_SUBTOPIC.to_string(), + group_id: self.group_name.clone(), + app_id: self.app_id.clone(), + }; + Ok(msg_to_send) + } + + pub async fn create_message( + &mut self, + provider: &MlsCryptoProvider, + signer: &SignatureKeyPair, + msg: &str, + identity: Vec, + ) -> Result { + let message_out = self + .mls_group + .as_mut() + .unwrap() + .lock() + .await + .create_message(provider, signer, msg.as_bytes())? + .tls_serialize_detached()?; + let app_msg = serde_json::to_vec(&AppMessage { + sender: identity, + message: message_out, + })?; + Ok(ProcessMessageToSend { + msg: app_msg, + subtopic: APP_MSG_SUBTOPIC.to_string(), + group_id: self.group_name.clone(), + app_id: self.app_id.clone(), + }) + } +} + +impl Display for Group { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + writeln!(f, "Group: {:#?}", self.group_name) + } +} + +#[derive(Clone, Debug)] +pub struct Admin { + current_key_pair: PublicKey, + current_key_pair_private: SecretKey, + key_pair_timestamp: u64, +} + +pub trait AdminTrait { + fn new() -> Self; + fn generate_new_key_pair(&mut self); + fn generate_admin_message(&self) -> GroupAnnouncement; + fn decrypt_msg(&self, message: Vec) -> Result; +} + +impl AdminTrait for Admin { + fn new() -> Self { + let (public_key, secret_key) = generate_keypair(); + Admin { + current_key_pair: public_key, + current_key_pair_private: secret_key, + key_pair_timestamp: Utc::now().timestamp() as u64, + } + } + + fn generate_new_key_pair(&mut self) { + let (public_key, secret_key) = generate_keypair(); + self.current_key_pair = public_key; + self.current_key_pair_private = secret_key; + self.key_pair_timestamp = Utc::now().timestamp() as u64; + } + + fn generate_admin_message(&self) -> GroupAnnouncement { + let signature = sign_message( + &self.current_key_pair.serialize_compressed(), + &self.current_key_pair_private, + ); + GroupAnnouncement::new( + self.current_key_pair.serialize_compressed().to_vec(), + signature, + ) + } + + fn decrypt_msg(&self, message: Vec) -> Result { + let msg: Vec = decrypt_message(&message, self.current_key_pair_private)?; + let key_package: KeyPackage = serde_json::from_slice(&msg)?; + Ok(key_package) + } +} diff --git a/src/identity.rs b/src/identity.rs index c5bff39..2492518 100644 --- a/src/identity.rs +++ b/src/identity.rs @@ -1,5 +1,5 @@ use alloy::primitives::Address; -use std::collections::HashMap; +use std::{collections::HashMap, fmt::Display}; use openmls::{credentials::CredentialWithKey, key_packages::*, prelude::*}; use openmls_basic_credential::SignatureKeyPair; @@ -72,13 +72,25 @@ impl Identity { self.credential_with_key.credential.identity().to_vec() } + pub fn identity_string(&self) -> String { + address_string(self.credential_with_key.credential.identity()) + } + pub fn signature_pub_key(&self) -> Vec { self.signer.public().to_vec() } } -impl ToString for Identity { - fn to_string(&self) -> String { - Address::from_slice(self.credential_with_key.credential.identity()).to_string() +impl Display for Identity { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, + "{}", + Address::from_slice(self.credential_with_key.credential.identity()) + ) } } + +pub fn address_string(identity: &[u8]) -> String { + Address::from_slice(identity).to_string() +} diff --git a/src/lib.rs b/src/lib.rs index bfd0a58..4498c86 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,66 +1,145 @@ -use alloy::{hex::FromHexError, primitives::SignatureError, signers::local::LocalSignerError}; -use ds::DeliveryServiceError; -use fred::error::RedisError; +use alloy::signers::local::LocalSignerError; +use ecies::{decrypt, encrypt}; +use kameo::{actor::ActorRef, error::SendError}; +use libsecp256k1::{sign, verify, Message, PublicKey, SecretKey, Signature as libSignature}; use openmls::{error::LibraryError, prelude::*}; use openmls_rust_crypto::MemoryKeyStoreError; -use sc_key_store::KeyStoreError; -use std::{str::Utf8Error, string::FromUtf8Error}; -use tokio::task::JoinError; +use rand::thread_rng; +use secp256k1::hashes::{sha256, Hash}; +use serde::{Deserialize, Serialize}; +use std::{ + collections::HashSet, + fmt::Display, + str::Utf8Error, + string::FromUtf8Error, + sync::{Arc, Mutex}, +}; +use waku_bindings::{WakuContentTopic, WakuMessage}; -pub mod cli; -pub mod contact; -pub mod conversation; +use ds::{ + waku_actor::{ProcessMessageToSend, ProcessSubscribeToGroup, WakuActor}, + DeliveryServiceError, +}; + +pub mod group_actor; pub mod identity; +pub mod main_loop; pub mod user; +pub mod ws_actor; -#[derive(Debug, thiserror::Error)] -pub enum CliError { - #[error("Can't split the line")] - SplitLineError, - #[error("Failed to cancel token")] - TokenCancellingError, - - #[error("Problem from std::io library: {0}")] - IoError(#[from] std::io::Error), - - #[error("Failed to send message to channel: {0}")] - SenderError(String), - - #[error("Redis error: {0}")] - RedisError(#[from] RedisError), - #[error("Failed from tokio join: {0}")] - TokioJoinError(#[from] JoinError), - - #[error("Unknown error: {0}")] - AnyHowError(anyhow::Error), +pub struct AppState { + pub waku_actor: ActorRef, + pub rooms: Mutex>, + pub content_topics: Arc>>, + pub pubsub: tokio::sync::broadcast::Sender, } -#[derive(Debug, thiserror::Error)] -pub enum ContactError { - #[error("Key package for the specified group does not exist.")] - MissingKeyPackageForGroup, - #[error("SmartContract address for the specified group does not exist.")] - MissingSmartContractForGroup, - #[error("User not found.")] - UserNotFoundError, - #[error("Group not found: {0}")] - GroupNotFoundError(String), - #[error("Duplicate user found in joiners list.")] - DuplicateUserError, - #[error("Group already exists")] - GroupAlreadyExistsError, - #[error("Invalid user address in signature.")] - InvalidUserSignatureError, +#[derive(Debug, Clone, Serialize, Deserialize)] +pub enum WelcomeMessageType { + GroupAnnouncement, + KeyPackageShare, + WelcomeShare, +} - #[error(transparent)] - DeliveryServiceError(#[from] DeliveryServiceError), +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct WelcomeMessage { + pub message_type: WelcomeMessageType, + pub message_payload: Vec, +} - #[error("Failed to parse signature: {0}")] - AlloySignatureParsingError(#[from] SignatureError), - #[error("JSON processing error: {0}")] - JsonProcessingError(#[from] serde_json::Error), - #[error("Serialization error: {0}")] - SerializationError(#[from] tls_codec::Error), +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct GroupAnnouncement { + pub_key: Vec, + signature: Vec, +} + +impl GroupAnnouncement { + pub fn new(pub_key: Vec, signature: Vec) -> Self { + GroupAnnouncement { pub_key, signature } + } + + pub fn verify(&self) -> Result { + let verified = verify_message(&self.pub_key, &self.signature, &self.pub_key)?; + Ok(verified) + } + + pub fn encrypt(&self, data: Vec) -> Result, MessageError> { + let encrypted = encrypt_message(&data, &self.pub_key)?; + Ok(encrypted) + } +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AppMessage { + pub sender: Vec, + pub message: Vec, +} + +impl AppMessage { + pub fn new(sender: Vec, message: Vec) -> Self { + AppMessage { sender, message } + } +} + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +pub struct MessageToPrint { + pub sender: String, + pub message: String, + pub group_name: String, +} + +impl MessageToPrint { + pub fn new(sender: String, message: String, group_name: String) -> Self { + MessageToPrint { + sender, + message, + group_name, + } + } +} + +impl Display for MessageToPrint { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}: {}", self.sender, self.message) + } +} + +pub fn generate_keypair() -> (PublicKey, SecretKey) { + let secret_key = SecretKey::random(&mut thread_rng()); + let public_key = PublicKey::from_secret_key(&secret_key); + (public_key, secret_key) +} + +pub fn sign_message(message: &[u8], secret_key: &SecretKey) -> Vec { + let digest = sha256::Hash::hash(message); + let msg = Message::parse(&digest.to_byte_array()); + let signature = sign(&msg, secret_key); + signature.0.serialize_der().as_ref().to_vec() +} + +pub fn verify_message( + message: &[u8], + signature: &[u8], + public_key: &[u8], +) -> Result { + let digest = sha256::Hash::hash(message); + let msg = Message::parse(&digest.to_byte_array()); + let signature = libSignature::parse_der(signature)?; + let mut pub_key_bytes: [u8; 33] = [0; 33]; + pub_key_bytes[..].copy_from_slice(public_key); + let public_key = PublicKey::parse_compressed(&pub_key_bytes)?; + Ok(verify(&msg, &signature, &public_key)) +} + +pub fn encrypt_message(message: &[u8], public_key: &[u8]) -> Result, MessageError> { + let encrypted = encrypt(public_key, message)?; + Ok(encrypted) +} + +pub fn decrypt_message(message: &[u8], secret_key: SecretKey) -> Result, MessageError> { + let secret_key_serialized = secret_key.serialize(); + let decrypted = decrypt(&secret_key_serialized, message)?; + Ok(decrypted) } #[derive(Debug, thiserror::Error)] @@ -80,34 +159,13 @@ pub enum IdentityError { } #[derive(Debug, thiserror::Error)] -pub enum UserError { - #[error("User lacks connection to the smart contract.")] - MissingSmartContractConnection, - #[error("Group not found: {0}")] - GroupNotFoundError(String), - #[error("Group already exists: {0}")] - GroupAlreadyExistsError(String), - #[error("Unsupported message type.")] - UnsupportedMessageType, - #[error("User already exists: {0}")] - UserAlreadyExistsError(String), - #[error("Welcome message cannot be empty.")] - EmptyWelcomeMessageError, - #[error("Message from user is invalid")] - InvalidChatMessageError, - #[error("Message from server is invalid")] - InvalidServerMessageError, - #[error("User not found.")] - UserNotFoundError, - +pub enum GroupError { + #[error("Admin not set")] + AdminNotSetError, #[error(transparent)] - DeliveryServiceError(#[from] DeliveryServiceError), - #[error(transparent)] - KeyStoreError(#[from] KeyStoreError), - #[error(transparent)] - IdentityError(#[from] IdentityError), - #[error(transparent)] - ContactError(#[from] ContactError), + MessageError(#[from] MessageError), + #[error("MLS group not initialized")] + MlsGroupNotInitializedError, #[error("Error while creating MLS group: {0}")] MlsGroupCreationError(#[from] NewGroupError), @@ -121,33 +179,100 @@ pub enum UserError { MlsProcessMessageError(#[from] ProcessMessageError), #[error("Error while creating message: {0}")] MlsCreateMessageError(#[from] CreateMessageError), - #[error("Failed to create staged join: {0}")] - MlsWelcomeError(#[from] WelcomeError), - #[error("Failed to remove member from MLS group: {0}")] - MlsRemoveMemberError(#[from] RemoveMembersError), - #[error("Failed to validate user key package: {0}")] - MlsKeyPackageVerificationError(#[from] KeyPackageVerifyError), + #[error("Failed to remove members: {0}")] + MlsRemoveMembersError(#[from] RemoveMembersError), + #[error("Group still active")] + GroupStillActiveError, #[error("UTF-8 parsing error: {0}")] Utf8ParsingError(#[from] FromUtf8Error), - #[error("UTF-8 string parsing error: {0}")] - Utf8StringParsingError(#[from] Utf8Error), - #[error("JSON processing error: {0}")] JsonError(#[from] serde_json::Error), #[error("Serialization error: {0}")] SerializationError(#[from] tls_codec::Error), - #[error("Failed to parse address: {0}")] - AddressParsingError(#[from] FromHexError), + #[error("An unknown error occurred: {0}")] + Other(anyhow::Error), +} + +#[derive(Debug, thiserror::Error)] +pub enum MessageError { + #[error("Failed to verify signature: {0}")] + SignatureVerificationError(#[from] libsecp256k1::Error), + #[error("JSON processing error: {0}")] + JsonError(#[from] serde_json::Error), +} + +#[derive(Debug, thiserror::Error)] +pub enum UserError { + #[error(transparent)] + DeliveryServiceError(#[from] DeliveryServiceError), + #[error(transparent)] + IdentityError(#[from] IdentityError), + #[error(transparent)] + GroupError(#[from] GroupError), + #[error(transparent)] + MessageError(#[from] MessageError), + + #[error("Group already exists: {0}")] + GroupAlreadyExistsError(String), + #[error("Group not found: {0}")] + GroupNotFoundError(String), + + #[error("Unsupported message type.")] + UnsupportedMessageType, + #[error("Welcome message cannot be empty.")] + EmptyWelcomeMessageError, + #[error("Message verification failed")] + MessageVerificationFailed, + + #[error("Unknown content topic type: {0}")] + UnknownContentTopicType(String), + + #[error("Failed to create staged join: {0}")] + MlsWelcomeError(#[from] WelcomeError), + + #[error("UTF-8 parsing error: {0}")] + Utf8ParsingError(#[from] FromUtf8Error), + #[error("UTF-8 string parsing error: {0}")] + Utf8StringParsingError(#[from] Utf8Error), + #[error("JSON processing error: {0}")] + JsonError(#[from] serde_json::Error), + #[error("Serialization error: {0}")] + SerializationError(#[from] tls_codec::Error), #[error("Failed to parse signer: {0}")] SignerParsingError(#[from] LocalSignerError), - #[error("Signing error: {0}")] - SigningError(#[from] alloy::signers::Error), - #[error("I/O error: {0}")] - IoError(#[from] std::io::Error), - - #[error("An unknown error occurred: {0}")] - UnknownError(anyhow::Error), + #[error("Failed to subscribe to group: {0}")] + KameoSubscribeToGroupError(#[from] SendError), + #[error("Failed to publish message: {0}")] + KameoPublishMessageError(#[from] SendError), + #[error("Failed to create group: {0}")] + KameoCreateGroupError(String), + #[error("Failed to send message to user: {0}")] + KameoSendMessageError(String), +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_verify_message() { + let message = b"Hello, world!"; + let (public_key, secret_key) = generate_keypair(); + let signature = sign_message(message, &secret_key); + let verified = verify_message(message, &signature, &public_key.serialize_compressed()); + assert!(verified.is_ok()); + assert!(verified.unwrap()); + } + + #[test] + fn test_encrypt_decrypt_message() { + let message = b"Hello, world!"; + let (public_key, secret_key) = generate_keypair(); + let encrypted = encrypt_message(message, &public_key.serialize_compressed()); + let decrypted = decrypt_message(&encrypted.unwrap(), secret_key); + assert_eq!(message, decrypted.unwrap().as_slice()); + } } diff --git a/src/main.rs b/src/main.rs index d0d2d04..cee92dc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,264 +1,337 @@ -use alloy::{providers::ProviderBuilder, signers::local::PrivateKeySigner}; -use clap::Parser; -use std::{error::Error, str::FromStr, sync::Arc}; -use tokio::sync::{mpsc, Mutex}; -use tokio_tungstenite::tungstenite::protocol::Message as TokioMessage; +use axum::{ + extract::ws::{Message, WebSocket, WebSocketUpgrade}, + extract::State, + http::Method, + response::IntoResponse, + routing::get, + Router, +}; +use bounded_vec_deque::BoundedVecDeque; +use futures::StreamExt; +use kameo::actor::ActorRef; +use log::{error, info}; +use serde_json::json; +use std::{ + collections::HashSet, + net::SocketAddr, + sync::{Arc, Mutex}, +}; +use tokio::sync::mpsc::{channel, Sender}; use tokio_util::sync::CancellationToken; +use tower_http::cors::{Any, CorsLayer}; +use waku_bindings::{waku_set_event_callback, WakuMessage}; -use de_mls::{cli::*, user::User, CliError, UserError}; +use de_mls::{ + main_loop::{main_loop, Connection}, + user::{ProcessLeaveGroup, ProcessRemoveUser, ProcessSendMessage, User, UserAction}, + ws_actor::{RawWsMessage, WsAction, WsActor}, + AppState, MessageToPrint, +}; use ds::{ - chat_client::{ChatClient, ChatMessages}, - chat_server::ServerMessage, + ds_waku::{match_content_topic, setup_node_handle}, + waku_actor::{ProcessUnsubscribeFromGroup, WakuActor}, }; #[tokio::main] -async fn main() -> Result<(), Box> { - let token = CancellationToken::new(); +async fn main() -> Result<(), Box> { + env_logger::init(); + let port = std::env::var("PORT") + .map(|val| val.parse::()) + .unwrap_or(Ok(3000))?; + let addr = SocketAddr::from(([0, 0, 0, 0], port)); - let (cli_tx, mut cli_gr_rx) = mpsc::channel::(100); - - let args = Args::parse(); - let signer = PrivateKeySigner::from_str(&args.user_priv_key)?; - let user_address = signer.address().to_string(); - let (client, mut client_recv) = - ChatClient::connect("ws://127.0.0.1:8080", user_address.clone()).await?; - //// Create user - let user_n = User::new(&args.user_priv_key, client).await?; - let user_arc = Arc::new(Mutex::new(user_n)); - - let (messages_tx, messages_rx) = mpsc::channel::(100); - messages_tx - .send(Msg::Input(Message::System(format!( - "Hello, {:}", - user_address.clone() - )))) - .await?; - - let messages_tx2 = messages_tx.clone(); - let event_token = token.clone(); - let h1 = tokio::spawn(async move { event_handler(messages_tx2, cli_tx, event_token).await }); - - let res_msg_tx = messages_tx.clone(); - let main_token = token.clone(); - let user = user_arc.clone(); - let h2 = tokio::spawn(async move { - let (redis_tx, mut redis_rx) = mpsc::channel::>(100); - loop { - tokio::select! { - Some(msg) = client_recv.recv() => { - if let TokioMessage::Text(text) = msg { - if let Ok(chat_message) = serde_json::from_str::(&text) { - if let ServerMessage::InMessage { from, to, msg } = chat_message { - if let Ok(chat_msg) = serde_json::from_str::(&msg) { - match chat_msg { - ChatMessages::Request(req) => { - let res = user.as_ref().lock().await.send_responce_on_request(req, &from); - if let Err(err) = res { - res_msg_tx - .send(Msg::Input(Message::Error(err.to_string()))) - .await.map_err(|err| CliError::SenderError(err.to_string()))?; - } - }, - ChatMessages::Response(resp) => { - let res = user.as_ref().lock().await.parce_responce(resp).await; - if let Err(err) = res { - res_msg_tx - .send(Msg::Input(Message::Error(err.to_string()))) - .await.map_err(|err| CliError::SenderError(err.to_string()))?; - } - }, - ChatMessages::Welcome(welcome) => { - let res = user.as_ref().lock().await.join_group(welcome).await; - match res { - Ok(mut buf) => { - let msg = format!("Succesfully join to the group: {:#?}", buf.1); - res_msg_tx.send(Msg::Input(Message::System(msg))).await.map_err(|err| CliError::SenderError(err.to_string()))?; - - let redis_tx = redis_tx.clone(); - tokio::spawn(async move { - while let Ok(msg) = buf.0.recv().await { - let bytes: Vec = msg.value.convert()?; - redis_tx.send(bytes).await.map_err(|err| CliError::SenderError(err.to_string()))?; - } - Ok::<_, CliError>(()) - }); - }, - Err(err) => { - res_msg_tx - .send(Msg::Input(Message::Error(err.to_string()))) - .await.map_err(|err| CliError::SenderError(err.to_string()))?; - }, - }; - }, - } - } else { - res_msg_tx - .send(Msg::Input(Message::Error(UserError::InvalidChatMessageError.to_string()))) - .await.map_err(|err| CliError::SenderError(err.to_string()))?; - } - }; - } else { - res_msg_tx - .send(Msg::Input(Message::Error(UserError::InvalidServerMessageError.to_string()))) - .await.map_err(|err| CliError::SenderError(err.to_string()))?; - } - } - } - Some(val) = redis_rx.recv() =>{ - let res = user.as_ref().lock().await.receive_msg(val).await; - match res { - Ok(msg) => { - match msg { - Some(m) => res_msg_tx.send(Msg::Input(Message::Incoming(m.group, m.author, m.message))).await.map_err(|err| CliError::SenderError(err.to_string()))?, - None => continue - } - }, - Err(err) => { - res_msg_tx - .send(Msg::Input(Message::Error(err.to_string()))) - .await.map_err(|err| CliError::SenderError(err.to_string()))?; - }, - }; - } - Some(command) = cli_gr_rx.recv() => { - // res_msg_tx.send(Msg::Input(Message::System(format!("Get command: {:?}", command)))).await?; - match command { - Commands::CreateGroup { group_name, storage_address, storage_url } => { - let client_provider = ProviderBuilder::new() - .with_recommended_fillers() - .wallet(user.as_ref().lock().await.wallet()) - .on_http(storage_url); - let res = user.as_ref().lock().await.connect_to_smart_contract(&storage_address, client_provider).await; - match res { - Ok(_) => { - let msg = format!("Successfully connect to Smart Contract on address {:}\n", storage_address); - res_msg_tx.send(Msg::Input(Message::System(msg))).await.map_err(|err| CliError::SenderError(err.to_string()))?; - }, - Err(err) => { - res_msg_tx - .send(Msg::Input(Message::Error(err.to_string()))) - .await.map_err(|err| CliError::SenderError(err.to_string()))?; - }, - }; - - let res = user.as_ref().lock().await.create_group(group_name.clone()).await; - match res { - Ok(mut br) => { - let msg = format!("Successfully create group: {:?}", group_name.clone()); - res_msg_tx.send(Msg::Input(Message::System(msg))).await.map_err(|err| CliError::SenderError(err.to_string()))?; - - let redis_tx = redis_tx.clone(); - tokio::spawn(async move { - while let Ok(msg) = br.recv().await { - let bytes: Vec = msg.value.convert()?; - redis_tx.send(bytes).await.map_err(|err| CliError::SenderError(err.to_string()))?; - } - Ok::<_, CliError>(()) - }); - }, - Err(err) => { - res_msg_tx - .send(Msg::Input(Message::Error(err.to_string()))) - .await.map_err(|err| CliError::SenderError(err.to_string()))?; - }, - }; - }, - Commands::Invite { group_name, users_wallet_addrs } => { - let user_clone = user.clone(); - let res_msg_tx_c = messages_tx.clone(); - tokio::spawn(async move { - for user_wallet in users_wallet_addrs.iter() { - let user_clone_ref = user_clone.as_ref(); - let opt_token = - { - let mut user_clone_ref_lock = user_clone_ref.lock().await; - let res = user_clone_ref_lock.handle_send_req(user_wallet, group_name.clone()).await; - match res { - Ok(token) => { - token - }, - Err(err) => { - res_msg_tx_c - .send(Msg::Input(Message::Error(err.to_string()))) - .await.map_err(|err| CliError::SenderError(err.to_string()))?; - None - }, - } - }; - - match opt_token { - Some(token) => token.cancelled().await, - None => return Err(CliError::TokenCancellingError), - }; - - { - let mut user_clone_ref_lock = user_clone.as_ref().lock().await; - user_clone_ref_lock.contacts.future_req.remove(user_wallet); - let res = user_clone_ref_lock.add_user_to_acl(user_wallet).await; - if let Err(err) = res { - res_msg_tx_c - .send(Msg::Input(Message::Error(err.to_string()))) - .await.map_err(|err| CliError::SenderError(err.to_string()))?; - }; - } - - } - - let res = user_clone.as_ref().lock().await.invite(users_wallet_addrs.clone(), group_name.clone()).await; - match res { - Ok(_) => { - let msg = format!("Invite {:?} to the group {:}\n", - users_wallet_addrs, group_name - ); - res_msg_tx_c.send(Msg::Input(Message::System(msg))).await.map_err(|err| CliError::SenderError(err.to_string()))?; - }, - Err(err) => { - res_msg_tx_c - .send(Msg::Input(Message::Error(err.to_string()))) - .await.map_err(|err| CliError::SenderError(err.to_string()))?; - }, - }; - Ok::<_, CliError>(()) - }); - }, - Commands::SendMessage { group_name, msg } => { - let message = msg.join(" "); - let res = user.as_ref().lock().await.send_msg(&message, group_name.clone(), user_address.clone()).await; - match res { - Ok(_) => { - res_msg_tx.send(Msg::Input(Message::Mine(group_name, user_address.clone(), message ))).await.map_err(|err| CliError::SenderError(err.to_string()))?; - }, - Err(err) => { - res_msg_tx - .send(Msg::Input(Message::Error(err.to_string()))) - .await.map_err(|err| CliError::SenderError(err.to_string()))?; - }, - }; - }, - Commands::Exit => { - res_msg_tx.send(Msg::Input(Message::System("Bye!".to_string()))).await.map_err(|err| CliError::SenderError(err.to_string()))?; - break - }, - } - } - _ = main_token.cancelled() => { - break; - } - else => { - res_msg_tx.send(Msg::Input(Message::System("Something went wrong".to_string()))).await.map_err(|err| CliError::SenderError(err.to_string()))?; - break - } - }; - } - Ok::<_, CliError>(()) + let node_name = std::env::var("NODE")?; + let node = setup_node_handle(vec![node_name])?; + let waku_actor = kameo::actor::spawn(WakuActor::new(Arc::new(node))); + let (tx, _) = tokio::sync::broadcast::channel(100); + let app_state = Arc::new(AppState { + waku_actor, + rooms: Mutex::new(HashSet::new()), + content_topics: Arc::new(Mutex::new(Vec::new())), + pubsub: tx.clone(), }); - let h3 = tokio::spawn(async move { terminal_handler(messages_rx, token).await }); + let (waku_sender, mut waku_receiver) = channel::(100); + handle_waku(waku_sender, app_state.clone()).await; - let handler_res = tokio::join!(h1, h2, h3); - handler_res.0??; - handler_res.1??; - handler_res.2??; + let recv_messages = tokio::spawn(async move { + info!("Running recv messages from waku"); + while let Some(msg) = waku_receiver.recv().await { + let _ = tx.send(msg); + } + }); + + let cors = CorsLayer::new() + .allow_origin(Any) + .allow_methods(vec![Method::GET]); + + let app = Router::new() + .route("/", get(|| async { "Hello World!" })) + .route("/ws", get(handler)) + .route("/rooms", get(get_rooms)) + .with_state(app_state) + .layer(cors); + + println!("Hosted on {:?}", addr); + let res = axum::Server::bind(&addr).serve(app.into_make_service()); + tokio::select! { + Err(x) = res => { + error!("Error hosting server: {}", x); + } + Err(w) = recv_messages => { + error!("Error receiving messages from waku: {}", w); + } + } + Ok(()) +} + +async fn handler(ws: WebSocketUpgrade, State(state): State>) -> impl IntoResponse { + ws.on_upgrade(|socket| handle_socket(socket, state)) +} + +async fn handle_waku(waku_sender: Sender, state: Arc) { + info!("Setting up waku event callback"); + let mut seen_messages = BoundedVecDeque::::new(40); + waku_set_event_callback(move |signal| { + match signal.event() { + waku_bindings::Event::WakuMessage(event) => { + let msg_id = event.message_id(); + if seen_messages.contains(msg_id) { + return; + } + seen_messages.push_back(msg_id.clone()); + let content_topic = event.waku_message().content_topic(); + // Check if message belongs to a relevant topic + if !match_content_topic(&state.content_topics, content_topic) { + error!("Content topic not match: {:?}", content_topic); + return; + }; + let msg = event.waku_message().clone(); + info!("Received message from waku: {:?}", event.message_id()); + waku_sender + .blocking_send(msg) + .expect("Failed to send message to waku"); + } + + waku_bindings::Event::Unrecognized(data) => { + error!("Unrecognized event!\n {data:?}"); + } + _ => { + error!( + "Unrecognized signal!\n {:?}", + serde_json::to_string(&signal) + ); + } + } + }); +} + +async fn handle_socket(socket: WebSocket, state: Arc) { + let (ws_sender, mut ws_receiver) = socket.split(); + let ws_actor = kameo::spawn(WsActor::new(ws_sender)); + let mut main_loop_connection = None::; + let cancel_token = CancellationToken::new(); + while let Some(Ok(Message::Text(data))) = ws_receiver.next().await { + let res = ws_actor.ask(RawWsMessage { message: data }).await; + match res { + Ok(WsAction::Connect(connect)) => { + info!("Got connect: {:?}", &connect); + main_loop_connection = Some(Connection { + eth_private_key: connect.eth_private_key.clone(), + group_id: connect.group_id.clone(), + should_create_group: connect.should_create, + }); + let mut rooms = state.rooms.lock().unwrap(); + if !rooms.contains(&connect.group_id.clone()) { + rooms.insert(connect.group_id.clone()); + } + info!("Prepare info for main loop: {:?}", main_loop_connection); + break; + } + Ok(_) => { + info!("Got chat message for non-existent user"); + } + + Err(e) => error!("Error handling message: {}", e), + } + } + + let user_actor = main_loop(main_loop_connection.unwrap().clone(), state.clone()) + .await + .expect("Failed to start main loop"); + + let user_actor_clone = user_actor.clone(); + let state_clone = state.clone(); + let ws_actor_clone = ws_actor.clone(); + let mut waku_receiver = state.pubsub.subscribe(); + let cancel_token_clone = cancel_token.clone(); + let mut recv_messages = tokio::spawn(async move { + info!("Running recv messages from waku"); + while let Ok(msg) = waku_receiver.recv().await { + let res = handle_user_actions( + msg, + state_clone.waku_actor.clone(), + ws_actor_clone.clone(), + user_actor_clone.clone(), + cancel_token_clone.clone(), + ) + .await; + if let Err(e) = res { + error!("Error handling waku message: {}", e); + } + } + }); + + let user_ref_clone = user_actor.clone(); + let mut send_messages = { + tokio::spawn(async move { + info!("Running recieve messages from websocket"); + while let Some(Ok(Message::Text(text))) = ws_receiver.next().await { + let res = handle_ws_message( + RawWsMessage { message: text }, + ws_actor.clone(), + user_ref_clone.clone(), + state.waku_actor.clone(), + ) + .await; + if let Err(e) = res { + error!("Error handling websocket message: {}", e); + } + } + }) + }; + + info!("Waiting for main loop to finish"); + tokio::select! { + _ = (&mut recv_messages) => { + info!("recv_messages finished"); + send_messages.abort(); + } + _ = (&mut send_messages) => { + info!("send_messages finished"); + send_messages.abort(); + } + _ = cancel_token.cancelled() => { + info!("Cancel token cancelled"); + send_messages.abort(); + recv_messages.abort(); + } + }; + + info!("Main loop finished"); +} + +async fn handle_user_actions( + msg: WakuMessage, + waku_actor: ActorRef, + ws_actor: ActorRef, + user_actor: ActorRef, + cancel_token: CancellationToken, +) -> Result<(), Box> { + let actions = user_actor.ask(msg).await?; + for action in actions { + match action { + UserAction::SendToWaku(msg) => { + let id = waku_actor.ask(msg).await?; + info!("Successfully publish message with id: {:?}", id); + } + UserAction::SendToGroup(msg) => { + info!("Send to group: {:?}", msg); + ws_actor.ask(msg).await?; + } + UserAction::RemoveGroup(group_name) => { + waku_actor + .ask(ProcessUnsubscribeFromGroup { + group_name: group_name.clone(), + }) + .await?; + user_actor + .ask(ProcessLeaveGroup { + group_name: group_name.clone(), + }) + .await?; + info!("Leave group: {:?}", &group_name); + ws_actor + .ask(MessageToPrint { + sender: "system".to_string(), + message: format!("Group {} removed you", group_name), + group_name: group_name.clone(), + }) + .await?; + cancel_token.cancel(); + } + UserAction::DoNothing => {} + } + } + Ok(()) +} + +async fn handle_ws_message( + msg: RawWsMessage, + ws_actor: ActorRef, + user_actor: ActorRef, + waku_actor: ActorRef, +) -> Result<(), Box> { + let action = ws_actor.ask(msg).await?; + match action { + WsAction::Connect(connect) => { + info!("Got unexpected connect: {:?}", &connect); + } + WsAction::UserMessage(msg) => { + info!("Got user message: {:?}", &msg); + let mtp = MessageToPrint { + message: msg.message.clone(), + group_name: msg.group_id.clone(), + sender: "me".to_string(), + }; + ws_actor.ask(mtp).await?; + + let pmt = user_actor + .ask(ProcessSendMessage { + msg: msg.message, + group_name: msg.group_id, + }) + .await?; + let id = waku_actor.ask(pmt).await?; + info!("Successfully publish message with id: {:?}", id); + } + WsAction::RemoveUser(user_to_ban, group_name) => { + info!("Got remove user: {:?}", &user_to_ban); + let pmt = user_actor + .ask(ProcessRemoveUser { + user_to_ban: user_to_ban.clone(), + group_name: group_name.clone(), + }) + .await?; + let id = waku_actor.ask(pmt).await?; + info!("Successfully publish message with id: {:?}", id); + ws_actor + .ask(MessageToPrint { + sender: "system".to_string(), + message: format!("User {} was removed from group", user_to_ban), + group_name: group_name.clone(), + }) + .await?; + } + WsAction::DoNothing => {} + } Ok(()) } + +async fn get_rooms(State(state): State>) -> String { + let rooms = state.rooms.lock().unwrap(); + let vec = rooms.iter().collect::>(); + match vec.len() { + 0 => json!({ + "status": "No rooms found yet!", + "rooms": [] + }) + .to_string(), + _ => json!({ + "status": "Success!", + "rooms": vec + }) + .to_string(), + } +} diff --git a/src/main_loop.rs b/src/main_loop.rs new file mode 100644 index 0000000..9ec3893 --- /dev/null +++ b/src/main_loop.rs @@ -0,0 +1,79 @@ +use alloy::signers::local::PrivateKeySigner; +use kameo::actor::ActorRef; +use log::{error, info}; +use std::{str::FromStr, sync::Arc, time::Duration}; + +use crate::user::{ProcessAdminMessage, ProcessCreateGroup, User}; +use crate::{AppState, UserError}; +use ds::waku_actor::ProcessSubscribeToGroup; + +#[derive(Debug, Clone)] +pub struct Connection { + pub eth_private_key: String, + pub group_id: String, + pub should_create_group: bool, +} + +pub async fn main_loop( + connection: Connection, + app_state: Arc, +) -> Result, UserError> { + let signer = PrivateKeySigner::from_str(&connection.eth_private_key)?; + let user_address = signer.address().to_string(); + let group_name: String = connection.group_id.clone(); + // Create user + let user = User::new(&connection.eth_private_key)?; + let user_ref = kameo::spawn(user); + user_ref + .ask(ProcessCreateGroup { + group_name: group_name.clone(), + is_creation: connection.should_create_group, + }) + .await + .map_err(|e| UserError::KameoCreateGroupError(e.to_string()))?; + + let mut content_topics = app_state + .waku_actor + .ask(ProcessSubscribeToGroup { + group_name: group_name.clone(), + }) + .await?; + app_state + .content_topics + .lock() + .unwrap() + .append(&mut content_topics); + + if connection.should_create_group { + info!( + "User {:?} start sending admin message for group {:?}", + user_address, group_name + ); + let user_clone = user_ref.clone(); + let group_name_clone = group_name.clone(); + let node_clone = app_state.waku_actor.clone(); + tokio::spawn(async move { + let mut interval = tokio::time::interval(Duration::from_secs(30)); + loop { + interval.tick().await; + let res = async { + let msg = user_clone + .ask(ProcessAdminMessage { + group_name: group_name_clone.clone(), + }) + .await + .map_err(|e| UserError::KameoSendMessageError(e.to_string()))?; + let id = node_clone.ask(msg).await?; + info!("Successfully publish admin message with id: {:?}", id); + Ok::<(), UserError>(()) + } + .await; + if let Err(e) = res { + error!("Error sending admin message to waku: {}", e); + } + } + }); + }; + + Ok(user_ref) +} diff --git a/src/user.rs b/src/user.rs index c93e58b..f8d8067 100644 --- a/src/user.rs +++ b/src/user.rs @@ -1,512 +1,511 @@ -use alloy::{ - hex::{self}, - network::{EthereumWallet, Network}, - primitives::Address, - providers::Provider, - signers::{local::PrivateKeySigner, SignerSync}, - transports::Transport, +use alloy::{network::EthereumWallet, signers::local::PrivateKeySigner}; +use kameo::{ + message::{Context, Message}, + Actor, }; -use fred::types::Message; +use log::info; use openmls::{group::*, prelude::*}; +use serde::{Deserialize, Serialize}; use std::{ - cell::RefCell, collections::HashMap, - fmt::Display, str::{from_utf8, FromStr}, }; -use tokio::sync::broadcast::Receiver; -use tokio_util::sync::CancellationToken; +use waku_bindings::WakuMessage; use ds::{ - chat_client::{ChatClient, ReqMessageType, RequestMLSPayload, ResponseMLSPayload}, - ds::*, + ds_waku::{APP_MSG_SUBTOPIC, COMMIT_MSG_SUBTOPIC, WELCOME_SUBTOPIC}, + waku_actor::ProcessMessageToSend, }; use mls_crypto::openmls_provider::*; -use sc_key_store::{sc_ks::ScKeyStorage, *}; -use crate::{contact::ContactsList, conversation::*}; +use crate::{ + group_actor::{Group, GroupAction}, + AppMessage, GroupAnnouncement, MessageToPrint, WelcomeMessage, WelcomeMessageType, +}; use crate::{identity::Identity, UserError}; -pub struct Group { - group_name: String, - conversation: Conversation, - mls_group: RefCell, - rc_client: RClient, - // pubsub_topic: WakuPubSubTopic, - // content_topics: Vec, +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +pub enum UserAction { + SendToWaku(ProcessMessageToSend), + SendToGroup(MessageToPrint), + RemoveGroup(String), + DoNothing, } -impl Display for Group { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - writeln!(f, "Group: {:#?}", self.group_name) + +#[derive(Actor)] +pub struct User { + identity: Identity, + groups: HashMap, + provider: MlsCryptoProvider, + eth_signer: PrivateKeySigner, +} + +impl Message for User { + type Reply = Result, UserError>; + + async fn handle( + &mut self, + msg: WakuMessage, + _ctx: Context<'_, Self, Self::Reply>, + ) -> Self::Reply { + let actions = self.process_waku_msg(msg).await?; + Ok(actions) } } -pub struct User { - pub identity: Identity, - pub groups: HashMap, - provider: MlsCryptoProvider, - eth_signer: PrivateKeySigner, - // we don't need on-chain connection if we don't create a group - sc_ks: Option>, - pub contacts: ContactsList, +pub struct ProcessCreateGroup { + pub group_name: String, + pub is_creation: bool, } -impl User -where - T: Transport + Clone, - P: Provider, - N: Network, -{ +impl Message for User { + type Reply = Result<(), UserError>; + + async fn handle( + &mut self, + msg: ProcessCreateGroup, + _ctx: Context<'_, Self, Self::Reply>, + ) -> Self::Reply { + self.create_group(msg.group_name.clone(), msg.is_creation) + .await?; + Ok(()) + } +} + +pub struct ProcessAdminMessage { + pub group_name: String, +} + +impl Message for User { + type Reply = Result; + + async fn handle( + &mut self, + msg: ProcessAdminMessage, + _ctx: Context<'_, Self, Self::Reply>, + ) -> Self::Reply { + self.prepare_admin_msg(msg.group_name.clone()).await + } +} + +pub struct ProcessLeaveGroup { + pub group_name: String, +} + +impl Message for User { + type Reply = Result<(), UserError>; + + async fn handle( + &mut self, + msg: ProcessLeaveGroup, + _ctx: Context<'_, Self, Self::Reply>, + ) -> Self::Reply { + self.leave_group(msg.group_name.clone()).await?; + Ok(()) + } +} + +pub struct ProcessSendMessage { + pub msg: String, + pub group_name: String, +} + +impl Message for User { + type Reply = Result; + + async fn handle( + &mut self, + msg: ProcessSendMessage, + _ctx: Context<'_, Self, Self::Reply>, + ) -> Self::Reply { + self.prepare_msg_to_send(&msg.msg, msg.group_name.clone()) + .await + } +} + +pub struct ProcessRemoveUser { + pub user_to_ban: String, + pub group_name: String, +} + +impl Message for User { + type Reply = Result; + + async fn handle( + &mut self, + msg: ProcessRemoveUser, + _ctx: Context<'_, Self, Self::Reply>, + ) -> Self::Reply { + self.remove_users_from_group(vec![msg.user_to_ban], msg.group_name.clone()) + .await + } +} + +impl User { /// Create a new user with the given name and a fresh set of credentials. - pub async fn new(user_eth_priv_key: &str, chat_client: ChatClient) -> Result { + pub fn new(user_eth_priv_key: &str) -> Result { let signer = PrivateKeySigner::from_str(user_eth_priv_key)?; let user_address = signer.address(); let crypto = MlsCryptoProvider::default(); let id = Identity::new(CIPHERSUITE, &crypto, user_address.as_slice())?; + let user = User { groups: HashMap::new(), identity: id, eth_signer: signer, provider: crypto, - sc_ks: None, - contacts: ContactsList::new(chat_client).await?, }; Ok(user) } - pub async fn connect_to_smart_contract( - &mut self, - sc_storage_address: &str, - provider: P, - ) -> Result<(), UserError> { - let storage_address = Address::from_str(sc_storage_address)?; - self.sc_ks = Some(ScKeyStorage::new(provider, storage_address)); - self.sc_ks - .as_mut() - .unwrap() - .add_user(&self.identity.to_string()) - .await?; - Ok(()) - } - pub async fn create_group( &mut self, group_name: String, - ) -> Result, UserError> { - let group_id = group_name.as_bytes(); - - if self.groups.contains_key(&group_name) { + is_creation: bool, + ) -> Result<(), UserError> { + if self.if_group_exists(group_name.clone()) { return Err(UserError::GroupAlreadyExistsError(group_name)); } - - let group_config = MlsGroupConfig::builder() - .use_ratchet_tree_extension(true) - .build(); - - let mls_group = MlsGroup::new_with_group_id( - &self.provider, - &self.identity.signer, - &group_config, - GroupId::from_slice(group_id), - self.identity.credential_with_key.clone(), - )?; - - let (rc, broadcaster) = RClient::new_with_group(group_name.clone()).await?; - let group = Group { - group_name: group_name.clone(), - conversation: Conversation::default(), - mls_group: RefCell::new(mls_group), - rc_client: rc, - // pubsub_topic: WakuPubSubTopic::new(), - // content_topics: Vec::new(), + let group = if is_creation { + Group::new( + group_name.clone(), + true, + Some(&self.provider), + Some(&self.identity.signer), + Some(&self.identity.credential_with_key), + )? + } else { + Group::new(group_name.clone(), false, None, None, None)? }; self.groups.insert(group_name.clone(), group); - self.contacts - .insert_group2sc(group_name, self.sc_address()?)?; - Ok(broadcaster) - } - - pub async fn add_user_to_acl(&mut self, user_address: &str) -> Result<(), UserError> { - if self.sc_ks.is_none() { - return Err(UserError::MissingSmartContractConnection); - } - self.sc_ks.as_mut().unwrap().add_user(user_address).await?; Ok(()) } - pub async fn restore_key_package( - &mut self, - mut signed_kp: &[u8], - ) -> Result { - if self.sc_ks.is_none() { - return Err(UserError::MissingSmartContractConnection); + pub fn get_group(&self, group_name: String) -> Result { + match self.groups.get(&group_name) { + Some(g) => Ok(g.clone()), + None => Err(UserError::GroupNotFoundError(group_name)), } - - let key_package_in = KeyPackageIn::tls_deserialize(&mut signed_kp)?; - let key_package = - key_package_in.validate(self.provider.crypto(), ProtocolVersion::Mls10)?; - - Ok(key_package) } - pub async fn invite( + pub fn if_group_exists(&self, group_name: String) -> bool { + self.groups.contains_key(&group_name) + } + + pub async fn handle_welcome_subtopic( &mut self, - users: Vec, + msg: WakuMessage, group_name: String, - ) -> Result<(), UserError> { - if self.sc_ks.is_none() { - return Err(UserError::MissingSmartContractConnection); + ) -> Result, UserError> { + let group = match self.groups.get_mut(&group_name) { + Some(g) => g, + None => return Err(UserError::GroupNotFoundError(group_name)), + }; + let welcome_msg: WelcomeMessage = serde_json::from_slice(msg.payload())?; + match welcome_msg.message_type { + WelcomeMessageType::GroupAnnouncement => { + let app_id = group.app_id(); + if group.is_admin() || group.is_kp_shared() { + Ok(vec![UserAction::DoNothing]) + } else { + info!( + "User {:?} received group announcement message for group {:?}", + self.identity.identity_string(), + group_name + ); + let group_announcement: GroupAnnouncement = + serde_json::from_slice(&welcome_msg.message_payload)?; + if !group_announcement.verify()? { + return Err(UserError::MessageVerificationFailed); + } + + let key_package = serde_json::to_vec( + &self + .identity + .generate_key_package(CIPHERSUITE, &self.provider)?, + )?; + + let encrypted_key_package = group_announcement.encrypt(key_package)?; + let msg: Vec = serde_json::to_vec(&WelcomeMessage { + message_type: WelcomeMessageType::KeyPackageShare, + message_payload: encrypted_key_package, + })?; + + group.set_kp_shared(true); + + Ok(vec![UserAction::SendToWaku(ProcessMessageToSend { + msg, + subtopic: WELCOME_SUBTOPIC.to_string(), + group_id: group_name.clone(), + app_id: app_id.clone(), + })]) + } + } + WelcomeMessageType::KeyPackageShare => { + // We already shared the key package with the group admin and we don't need to do it again + if !group.is_admin() { + Ok(vec![UserAction::DoNothing]) + } else { + info!( + "User {:?} received key package share message for group {:?}", + self.identity.identity_string(), + group_name + ); + let key_package = group.decrypt_admin_msg(welcome_msg.message_payload)?; + let msgs = self.invite_users(vec![key_package], group_name).await?; + Ok(msgs + .iter() + .map(|msg| UserAction::SendToWaku(msg.clone())) + .collect()) + } + } + WelcomeMessageType::WelcomeShare => { + if group.is_admin() { + Ok(vec![UserAction::DoNothing]) + } else { + info!( + "User {:?} received welcome share message for group {:?}", + self.identity.identity_string(), + group_name + ); + let welc = MlsMessageIn::tls_deserialize_bytes(welcome_msg.message_payload)?; + let welcome = match welc.into_welcome() { + Some(w) => w, + None => return Err(UserError::EmptyWelcomeMessageError), + }; + // find the key package in the welcome message + if welcome.secrets().iter().any(|egs| { + let hash_ref = egs.new_member().as_slice().to_vec(); + self.provider + .key_store() + .read(&hash_ref) + .map(|kp: KeyPackage| (kp, hash_ref)) + .is_some() + }) { + self.join_group(welcome)?; + let msg = self + .prepare_msg_to_send("User joined to the group", group_name) + .await?; + Ok(vec![UserAction::SendToWaku(msg)]) + } else { + Ok(vec![UserAction::DoNothing]) + } + } + } } + } - let users_for_invite = self - .contacts - .prepare_joiners(users.clone(), group_name.clone()) - .await?; - - let mut joiners_key_package: Vec = Vec::with_capacity(users_for_invite.len()); - let mut user_addrs = Vec::with_capacity(users_for_invite.len()); - for (user_addr, user_kp) in users_for_invite { - joiners_key_package.push(self.restore_key_package(&user_kp).await?); - user_addrs.push(user_addr); + pub async fn process_waku_msg( + &mut self, + msg: WakuMessage, + ) -> Result, UserError> { + let ct = msg.content_topic(); + let group_name = ct.application_name.to_string(); + let group = match self.groups.get(&group_name) { + Some(g) => g, + None => return Err(UserError::GroupNotFoundError(group_name)), + }; + let app_id = group.app_id(); + if msg.meta() == app_id { + return Ok(vec![UserAction::DoNothing]); } + let ct = ct.content_topic_name.to_string(); + match ct.as_str() { + WELCOME_SUBTOPIC => self.handle_welcome_subtopic(msg, group_name).await, + COMMIT_MSG_SUBTOPIC => { + if group.is_mls_group_initialized() { + info!( + "User {:?} received commit message for group {:?}", + self.identity.identity_string(), + group_name + ); + let res = MlsMessageIn::tls_deserialize_bytes(msg.payload())?; + let action = match res.extract() { + MlsMessageInBody::PrivateMessage(message) => { + self.process_protocol_msg(message.into()).await? + } + MlsMessageInBody::PublicMessage(message) => { + self.process_protocol_msg(message.into()).await? + } + _ => return Err(UserError::UnsupportedMessageType), + }; + Ok(vec![action]) + } else { + Ok(vec![UserAction::DoNothing]) + } + } + APP_MSG_SUBTOPIC => { + info!( + "User {:?} received app message for group {:?}", + self.identity.identity_string(), + group_name + ); + let buf: AppMessage = serde_json::from_slice(msg.payload())?; + if buf.sender == self.identity.identity() { + return Ok(vec![UserAction::DoNothing]); + } + let res = MlsMessageIn::tls_deserialize_bytes(&buf.message)?; + let action = match res.extract() { + MlsMessageInBody::PrivateMessage(message) => { + self.process_protocol_msg(message.into()).await? + } + MlsMessageInBody::PublicMessage(message) => { + self.process_protocol_msg(message.into()).await? + } + _ => return Err(UserError::UnsupportedMessageType), + }; + Ok(vec![action]) + } + _ => Err(UserError::UnknownContentTopicType(ct)), + } + } + async fn invite_users( + &mut self, + users_kp: Vec, + group_name: String, + ) -> Result, UserError> { // Build a proposal with this key package and do the MLS bits. let group = match self.groups.get_mut(&group_name) { Some(g) => g, None => return Err(UserError::GroupNotFoundError(group_name)), }; - - let (out_messages, welcome, _group_info) = group.mls_group.borrow_mut().add_members( - &self.provider, - &self.identity.signer, - &joiners_key_package, - )?; - - group - .rc_client - .msg_send( - out_messages.tls_serialize_detached()?, - self.identity.to_string(), - group_name, - ) + let out_messages = group + .add_members(users_kp, &self.provider, &self.identity.signer) .await?; - // Second, process the invitation on our end. - group - .mls_group - .borrow_mut() - .merge_pending_commit(&self.provider)?; - // Send welcome by p2p - self.contacts - .send_welcome_msg_to_users(self.identity.to_string(), user_addrs, welcome)?; + info!( + "User {:?} invited users to group {:?}", + self.identity.identity_string(), + group_name + ); + Ok(out_messages) + } + fn join_group(&mut self, welcome: Welcome) -> Result<(), UserError> { + let group_config = MlsGroupConfig::builder() + .use_ratchet_tree_extension(true) + .build(); + + let mls_group = MlsGroup::new_from_welcome(&self.provider, &group_config, welcome, None)?; + + let group_id = mls_group.group_id().to_vec(); + let group_name = String::from_utf8(group_id)?; + + if !self.if_group_exists(group_name.clone()) { + return Err(UserError::GroupNotFoundError(group_name)); + } + + self.groups + .get_mut(&group_name) + .unwrap() + .set_mls_group(mls_group)?; + + info!( + "User {:?} joined group {:?}", + self.identity.identity_string(), + group_name + ); Ok(()) } - pub async fn receive_msg( - &mut self, - msg_bytes: Vec, - ) -> Result, UserError> { - let buf: SenderStruct = serde_json::from_slice(&msg_bytes)?; - if buf.sender == self.identity.to_string() { - return Ok(None); - } - let res = MlsMessageIn::tls_deserialize_bytes(&buf.msg)?; - let msg = match res.extract() { - MlsMessageInBody::PrivateMessage(message) => { - self.process_protocol_msg(message.into())? - } - MlsMessageInBody::PublicMessage(message) => { - self.process_protocol_msg(message.into())? - } - _ => return Err(UserError::UnsupportedMessageType), - }; - Ok(msg) - } - - pub fn process_protocol_msg( + pub async fn process_protocol_msg( &mut self, message: ProtocolMessage, - ) -> Result, UserError> { + ) -> Result { let group_name = from_utf8(message.group_id().as_slice())?.to_string(); let group = match self.groups.get_mut(&group_name) { Some(g) => g, None => return Err(UserError::GroupNotFoundError(group_name)), }; - let mut mls_group = group.mls_group.borrow_mut(); + if !group.is_mls_group_initialized() { + return Ok(UserAction::DoNothing); + } + let res = group + .process_protocol_msg( + message, + &self.provider, + self.identity + .credential_with_key + .signature_key + .as_slice() + .to_vec(), + ) + .await?; - let processed_message = mls_group.process_message(&self.provider, message)?; - let processed_message_credential: Credential = processed_message.credential().clone(); - - match processed_message.into_content() { - ProcessedMessageContent::ApplicationMessage(application_message) => { - let sender_name = { - let user_id = mls_group.members().find_map(|m| { - if m.credential.identity() == processed_message_credential.identity() - && (self.identity.credential_with_key.signature_key.as_slice() - != m.signature_key.as_slice()) - { - Some(hex::encode(m.credential.identity())) - } else { - None - } - }); - user_id.unwrap_or("".to_owned()) - }; - - let conversation_message = ConversationMessage::new( - group_name, - sender_name, - String::from_utf8(application_message.into_bytes())?, - ); - group.conversation.add(conversation_message.clone()); - return Ok(Some(conversation_message)); - } - ProcessedMessageContent::ProposalMessage(_proposal_ptr) => (), - ProcessedMessageContent::ExternalJoinProposalMessage(_external_proposal_ptr) => (), - ProcessedMessageContent::StagedCommitMessage(commit_ptr) => { - let mut remove_proposal: bool = false; - if commit_ptr.self_removed() { - remove_proposal = true; - } - mls_group.merge_staged_commit(&self.provider, *commit_ptr)?; - if remove_proposal { - // here we need to remove group instance locally and - // also remove correspond key package from local storage ans sc storage - return Ok(None); - } - } - }; - Ok(None) + match res { + GroupAction::MessageToPrint(msg) => Ok(UserAction::SendToGroup(msg)), + GroupAction::RemoveGroup => Ok(UserAction::RemoveGroup(group_name)), + GroupAction::DoNothing => Ok(UserAction::DoNothing), + } } - pub async fn send_msg( + pub async fn prepare_admin_msg( + &mut self, + group_name: String, + ) -> Result { + if !self.if_group_exists(group_name.clone()) { + return Err(UserError::GroupNotFoundError(group_name)); + } + let msg_to_send = self + .groups + .get_mut(&group_name) + .unwrap() + .generate_admin_message()?; + Ok(msg_to_send) + } + + pub async fn prepare_msg_to_send( &mut self, msg: &str, group_name: String, - sender: String, - ) -> Result<(), UserError> { + ) -> Result { let group = match self.groups.get_mut(&group_name) { Some(g) => g, None => return Err(UserError::GroupNotFoundError(group_name)), }; - let message_out = group.mls_group.borrow_mut().create_message( - &self.provider, - &self.identity.signer, - msg.as_bytes(), - )?; - - group - .rc_client - .msg_send(message_out.tls_serialize_detached()?, sender, group_name) - .await?; - Ok(()) + if !group.is_mls_group_initialized() { + Err(UserError::GroupNotFoundError(group_name)) + } else { + let msg_to_send = group + .create_message( + &self.provider, + &self.identity.signer, + msg, + self.identity.identity().to_vec(), + ) + .await?; + Ok(msg_to_send) + } } - pub async fn join_group( + pub async fn remove_users_from_group( &mut self, - welcome: String, - ) -> Result<(Receiver, String), UserError> { - let wbytes = hex::decode(welcome).unwrap(); - let welc = MlsMessageIn::tls_deserialize_bytes(wbytes).unwrap(); - let welcome = welc.into_welcome(); - if welcome.is_none() { - return Err(UserError::EmptyWelcomeMessageError); - } - - let group_config = MlsGroupConfig::builder() - .use_ratchet_tree_extension(true) - .build(); - - // TODO: After we move from openmls, we will have to delete the used key package here ourselves. - let mls_group = - MlsGroup::new_from_welcome(&self.provider, &group_config, welcome.unwrap(), None)?; - - let group_id = mls_group.group_id().to_vec(); - let group_name = String::from_utf8(group_id)?; - - let (rc, br) = RClient::new_with_group(group_name.clone()).await?; - let group = Group { - group_name: group_name.clone(), - conversation: Conversation::default(), - mls_group: RefCell::new(mls_group), - rc_client: rc, - }; - - match self.groups.insert(group_name.clone(), group) { - Some(old) => Err(UserError::GroupAlreadyExistsError(old.group_name)), - None => Ok((br, group_name)), - } - } - - // pub async fn remove(&mut self, name: String, group_name: String) -> Result<(), UserError> { - // // Get the group ID - // let group = match self.groups.get_mut(&group_name) { - // Some(g) => g, - // None => return Err(UserError::UnknownGroupError(group_name)), - // }; - - // // Get the user leaf index - // let leaf_index = group.find_member_index(name)?; - - // // Remove operation on the mls group - // let (remove_message, _welcome, _group_info) = group.mls_group.borrow_mut().remove_members( - // &self.provider, - // &self.identity.signer, - // &[leaf_index], - // )?; - - // group.rc_client.msg_send(remove_message).await?; - - // // Second, process the removal on our end. - // group - // .mls_group - // .borrow_mut() - // .merge_pending_commit(&self.provider)?; - - // Ok(()) - // } - - /// Return the last 100 messages sent to the group. - pub fn read_msgs( - &self, + users: Vec, group_name: String, - ) -> Result>, UserError> { - self.groups.get(&group_name).map_or_else( - || Err(UserError::GroupNotFoundError(group_name)), - |g| { - Ok(g.conversation - .get(100) - .map(|messages: &[crate::conversation::ConversationMessage]| messages.to_vec())) - }, - ) - } - - pub fn group_members(&self, group_name: String) -> Result, UserError> { - let group = match self.groups.get(&group_name) { - Some(g) => g, - None => return Err(UserError::GroupNotFoundError(group_name)), - }; - Ok(group.group_members(self.identity.signature_pub_key().as_slice())) - } - - pub fn user_groups(&self) -> Result, UserError> { - if self.groups.is_empty() { - return Ok(Vec::default()); + ) -> Result { + if !self.if_group_exists(group_name.clone()) { + return Err(UserError::GroupNotFoundError(group_name)); } - Ok(self.groups.keys().map(|k| k.to_owned()).collect()) + let group = self.groups.get_mut(&group_name).unwrap(); + let msg = group + .remove_members(users, &self.provider, &self.identity.signer) + .await?; + + Ok(msg) + } + + pub async fn leave_group(&mut self, group_name: String) -> Result<(), UserError> { + if !self.if_group_exists(group_name.clone()) { + return Err(UserError::GroupNotFoundError(group_name)); + } + self.groups.remove(&group_name); + Ok(()) } pub fn wallet(&self) -> EthereumWallet { EthereumWallet::from(self.eth_signer.clone()) } - - fn sign(&self, msg: String) -> Result { - let signature = self.eth_signer.sign_message_sync(msg.as_bytes())?; - let res = serde_json::to_string(&signature)?; - Ok(res) - } - - pub fn send_responce_on_request( - &mut self, - req: RequestMLSPayload, - user_address: &str, - ) -> Result<(), UserError> { - let self_address = self.identity.to_string(); - match req.msg_type { - ReqMessageType::InviteToGroup => { - let signature = self.sign(req.msg_to_sign())?; - let key_package = self - .identity - .generate_key_package(CIPHERSUITE, &self.provider)?; - let resp = ResponseMLSPayload::new( - signature, - self_address.clone(), - req.group_name(), - key_package.tls_serialize_detached()?, - ); - self.contacts - .send_resp_msg_to_user(self_address, user_address, resp)?; - - Ok(()) - } - ReqMessageType::RemoveFromGroup => Ok(()), - } - } - - pub async fn parce_responce(&mut self, resp: ResponseMLSPayload) -> Result<(), UserError> { - if self.sc_ks.is_none() { - return Err(UserError::MissingSmartContractConnection); - } - let group_name = resp.group_name.clone(); - let sc_address = self.contacts.group2sc(group_name.clone())?; - let (user_wallet, kp) = resp.validate(sc_address, group_name.clone())?; - - self.contacts - .add_key_package_to_contact(&user_wallet, kp, group_name.clone()) - .await?; - - self.contacts.handle_response(&user_wallet)?; - Ok(()) - } - - pub fn sc_address(&self) -> Result { - if self.sc_ks.is_none() { - return Err(UserError::MissingSmartContractConnection); - } - Ok(self.sc_ks.as_ref().unwrap().sc_adsress()) - } - - pub async fn handle_send_req( - &mut self, - user_wallet: &str, - group_name: String, - ) -> Result, UserError> { - if !self.contacts.does_user_in_contacts(user_wallet).await { - self.contacts.add_new_contact(user_wallet).await?; - } - self.contacts - .send_msg_req( - self.identity.to_string(), - user_wallet.to_owned(), - group_name, - ReqMessageType::InviteToGroup, - ) - .unwrap(); - - Ok(self.contacts.future_req.get(user_wallet).cloned()) - } -} - -impl Group { - /// Get a member - fn find_member_index(&self, user_id: String) -> Result { - let member = self - .mls_group - .borrow() - .members() - .find(|m| m.credential.identity().eq(user_id.as_bytes())); - - match member { - Some(m) => Ok(m.index), - None => Err(GroupError::UnknownGroupMemberError(user_id)), - } - } - - pub fn group_members(&self, user_signature: &[u8]) -> Vec { - self.mls_group - .borrow() - .members() - .filter(|m| m.signature_key == user_signature) - .map(|m| hex::encode(m.credential.identity())) - .collect::>() - } -} - -#[derive(Debug, thiserror::Error)] -pub enum GroupError { - #[error("Unknown group member : {0}")] - UnknownGroupMemberError(String), } diff --git a/src/ws_actor.rs b/src/ws_actor.rs new file mode 100644 index 0000000..d5922b1 --- /dev/null +++ b/src/ws_actor.rs @@ -0,0 +1,133 @@ +use axum::extract::ws::{Message as WsMessage, WebSocket}; +use futures::{stream::SplitSink, SinkExt}; +use kameo::{ + message::{Context, Message}, + Actor, +}; +use serde::{Deserialize, Serialize}; + +use crate::MessageToPrint; + +/// This actor is used to handle messages from web socket +#[derive(Debug, Actor)] +pub struct WsActor { + /// This is the sender of the open web socket connection + pub ws_sender: SplitSink, + /// This variable is used to check if the user has connected to the ws, if not, we parce message as ConnectMessage + pub is_initialized: bool, +} + +impl WsActor { + pub fn new(ws_sender: SplitSink) -> Self { + Self { + ws_sender, + is_initialized: false, + } + } +} + +/// This enum is used to represent the actions that can be performed on the web socket +/// Connect - this action is used to return connection data to the user +/// UserMessage - this action is used to handle message from web socket and return it to the user +/// RemoveUser - this action is used to remove a user from the group +/// DoNothing - this action is used for test purposes (return empty action if message is not valid) +#[derive(Debug, PartialEq)] +pub enum WsAction { + Connect(ConnectMessage), + UserMessage(UserMessage), + RemoveUser(String, String), + DoNothing, +} + +/// This struct is used to represent the message from the user that we got from web socket +#[derive(Deserialize, Debug, PartialEq, Serialize)] +pub struct UserMessage { + pub message: String, + pub group_id: String, +} + +/// This struct is used to represent the connection data that web socket sends to the user +#[derive(Deserialize, Debug, PartialEq)] +pub struct ConnectMessage { + /// This is the private key of the user that we will use to authenticate the user + pub eth_private_key: String, + /// This is the id of the group that the user is joining + pub group_id: String, + /// This is the flag that indicates if the user should create a new group or subscribe to an existing one + pub should_create: bool, +} + +/// This struct is used to represent the raw message from the web socket. +/// It is used to handle the message from the web socket and return it to the user +/// We can parse it to the ConnectMessage or UserMessage +/// if it starts with "/ban" it will be parsed to RemoveUser, otherwise it will be parsed to UserMessage +#[derive(Deserialize, Debug, PartialEq)] +pub struct RawWsMessage { + pub message: String, +} + +impl Message for WsActor { + type Reply = Result; + + async fn handle( + &mut self, + msg: RawWsMessage, + _ctx: Context<'_, Self, Self::Reply>, + ) -> Self::Reply { + if !self.is_initialized { + let connect_message = serde_json::from_str(&msg.message)?; + self.is_initialized = true; + return Ok(WsAction::Connect(connect_message)); + } + match serde_json::from_str(&msg.message) { + Ok(UserMessage { message, group_id }) => { + if message.starts_with("/") { + let mut tokens = message.split_whitespace(); + match tokens.next() { + Some("/ban") => { + let user_to_ban = tokens.next(); + if user_to_ban.is_none() { + return Err(WsError::InvalidMessage); + } else { + let user_to_ban = user_to_ban.unwrap().to_lowercase(); + return Ok(WsAction::RemoveUser( + user_to_ban.to_string(), + group_id.clone(), + )); + } + } + _ => return Err(WsError::InvalidMessage), + } + } + Ok(WsAction::UserMessage(UserMessage { message, group_id })) + } + Err(_) => Err(WsError::InvalidMessage), + } + } +} + +/// This impl is used to send messages to the websocket +impl Message for WsActor { + type Reply = Result<(), WsError>; + + async fn handle( + &mut self, + msg: MessageToPrint, + _ctx: Context<'_, Self, Self::Reply>, + ) -> Self::Reply { + self.ws_sender + .send(WsMessage::Text(msg.to_string())) + .await?; + Ok(()) + } +} + +#[derive(Debug, thiserror::Error)] +pub enum WsError { + #[error("Invalid message")] + InvalidMessage, + #[error("Malformed json")] + MalformedJson(#[from] serde_json::Error), + #[error("Failed to send message")] + SendMessageError(#[from] axum::Error), +} diff --git a/tests/user_test.rs b/tests/user_test.rs new file mode 100644 index 0000000..0e03037 --- /dev/null +++ b/tests/user_test.rs @@ -0,0 +1,224 @@ +use de_mls::{ + user::{User, UserAction}, + ws_actor::{RawWsMessage, UserMessage, WsAction}, +}; + +#[tokio::test] +async fn test_admin_message_flow() { + let group_name = "new_group".to_string(); + + let alice_priv_key = "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d"; + let res = User::new(alice_priv_key); + assert!(res.is_ok(), "Failed to create user"); + let mut alice = res.unwrap(); + assert!( + alice.create_group(group_name.clone(), true).await.is_ok(), + "Failed to create group" + ); + + let res = alice.get_group(group_name.clone()); + assert!(res.is_ok(), "Failed to get group"); + let alice_group = res.unwrap(); + assert_eq!( + alice_group.is_mls_group_initialized(), + true, + "MLS group is notinitialized" + ); + + let bob_priv_key = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"; + let res = User::new(bob_priv_key); + assert!(res.is_ok(), "Failed to create user"); + let mut bob = res.unwrap(); + assert!( + bob.create_group(group_name.clone(), false).await.is_ok(), + "Failed to create group" + ); + + let res = bob.get_group(group_name.clone()); + assert!(res.is_ok(), "Failed to get group"); + let bob_group = res.unwrap(); + assert_eq!( + bob_group.is_mls_group_initialized(), + false, + "MLS group is initialized" + ); + + let _ = join_group_flow(&mut alice, &mut bob, group_name.clone()).await; +} + +async fn join_group_flow(alice: &mut User, bob: &mut User, group_name: String) -> UserAction { + // Alice send Group Announcement msg to Bob + let res = alice.prepare_admin_msg(group_name.clone()).await; + assert!(res.is_ok(), "Failed to prepare admin message"); + let alice_ga_msg = res.unwrap(); + + let res = alice_ga_msg.build_waku_message(); + assert!(res.is_ok(), "Failed to build waku message"); + let waku_ga_message = res.unwrap(); + + // Bob receives the Group Announcement msg and send Key Package Share msg to Alice + let res = bob.process_waku_msg(waku_ga_message).await; + assert!(res.is_ok(), "Failed to process waku message"); + let user_action = res.unwrap(); + assert!(user_action.len() == 1, "User action is not a single action"); + + let bob_kp_message = match user_action[0].clone() { + UserAction::SendToWaku(msg) => msg, + _ => panic!("User action is not SendToWaku"), + }; + let res = bob_kp_message.build_waku_message(); + assert!(res.is_ok(), "Failed to build waku message"); + let waku_kp_message = res.unwrap(); + + // Alice receives the Key Package Share msg and send Welcome msg to Bob + let res = alice.process_waku_msg(waku_kp_message).await; + assert!(res.is_ok(), "Failed to process waku message"); + let user_action_invite = res.unwrap(); + assert!( + user_action_invite.len() == 2, + "User action is not a two actions" + ); + + let alice_welcome_message = match user_action_invite[1].clone() { + UserAction::SendToWaku(msg) => msg, + _ => panic!("User action is not SendToWaku"), + }; + let res = alice_welcome_message.build_waku_message(); + assert!(res.is_ok(), "Failed to build waku message"); + let waku_welcome_message = res.unwrap(); + + // Bob receives the Welcome msg and join the group + let res = bob.process_waku_msg(waku_welcome_message).await; + assert!(res.is_ok(), "Failed to process waku message"); + let user_action = res.unwrap(); + assert!(user_action.len() == 1, "User action is not a single action"); + let bob_group = bob.get_group(group_name.clone()).unwrap(); + assert!( + bob_group.is_mls_group_initialized(), + "MLS group is not initialized" + ); + + user_action_invite[0].clone() +} + +#[tokio::test] +async fn test_remove_user_flow() { + let group_name = "new_group".to_string(); + + let alice_priv_key = "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d"; + let mut alice = User::new(alice_priv_key).unwrap(); + alice.create_group(group_name.clone(), true).await.unwrap(); + + let bob_priv_key = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"; + let mut bob = User::new(bob_priv_key).unwrap(); + bob.create_group(group_name.clone(), false).await.unwrap(); + + let carol_priv_key = "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a"; + let mut carol = User::new(carol_priv_key).unwrap(); + carol.create_group(group_name.clone(), false).await.unwrap(); + + let _ = join_group_flow(&mut alice, &mut bob, group_name.clone()).await; + let res = bob.get_group(group_name.clone()); + assert!(res.is_ok(), "Failed to get group"); + let bob_group = res.unwrap(); + assert!( + bob_group.is_mls_group_initialized(), + "MLS group is not initialized" + ); + + let commit_action = join_group_flow(&mut alice, &mut carol, group_name.clone()).await; + let res = carol.get_group(group_name.clone()); + assert!(res.is_ok(), "Failed to get group"); + let carol_group = res.unwrap(); + assert!( + carol_group.is_mls_group_initialized(), + "MLS group is not initialized" + ); + let pmt = match commit_action { + UserAction::SendToWaku(msg) => msg, + _ => panic!("User action is not SendToWaku"), + }; + let commit_message = pmt.build_waku_message(); + assert!(commit_message.is_ok(), "Failed to build waku message"); + let waku_commit_message = commit_message.unwrap(); + + let res = bob.process_waku_msg(waku_commit_message.clone()).await; + assert!(res.is_ok(), "Failed to process waku message"); + + let raw_msg = RawWsMessage { + message: serde_json::to_string(&UserMessage { + message: "/ban f39fd6e51aad88f6f4ce6ab8827279cfffb92266".to_string(), + group_id: group_name.clone(), + }) + .unwrap(), + }; + + let ws_action = match serde_json::from_str(&raw_msg.message) { + Ok(UserMessage { message, group_id }) => { + let ws_action = if message.starts_with("/") { + let mut tokens = message.split_whitespace(); + let ws = match tokens.next() { + Some("/ban") => { + let user_to_ban = tokens.next().unwrap(); + WsAction::RemoveUser(user_to_ban.to_string(), group_id.clone()) + } + _ => { + assert!(false, "Invalid user message"); + WsAction::DoNothing + } + }; + ws + } else { + WsAction::UserMessage(UserMessage { message, group_id }) + }; + ws_action + } + Err(_) => { + assert!(false, "Failed to parse user message"); + WsAction::DoNothing + } + }; + assert_eq!( + ws_action, + WsAction::RemoveUser( + "f39fd6e51aad88f6f4ce6ab8827279cfffb92266".to_string(), + group_name.clone() + ) + ); + + let pmt = match ws_action { + WsAction::RemoveUser(user_to_ban, group_name) => { + let res = alice + .remove_users_from_group(vec![user_to_ban], group_name.clone()) + .await; + assert!(res.is_ok(), "Failed to remove user from group"); + res.unwrap() + } + _ => panic!("User action is not RemoveUser"), + }; + + let commit_message = pmt.build_waku_message(); + assert!(commit_message.is_ok(), "Failed to build waku message"); + let waku_commit_message = commit_message.unwrap(); + + let res = carol.process_waku_msg(waku_commit_message.clone()).await; + assert!(res.is_ok(), "Failed to process waku message"); + let carol_group = carol.get_group(group_name.clone()).unwrap(); + assert!( + carol_group.members_identity().await.len() == 2, + "Bob is not removed from the group" + ); + + let res = bob.process_waku_msg(waku_commit_message.clone()).await; + assert!(res.is_ok(), "Failed to process waku message"); + let user_action = res.unwrap(); + assert!(user_action.len() == 1, "User action is not a single action"); + assert_eq!( + user_action[0].clone(), + UserAction::RemoveGroup(group_name.clone()), + "User action is not RemoveGroup" + ); + let res = bob.leave_group(group_name.clone()).await; + assert!(res.is_ok(), "Failed to leave group"); + assert_eq!(bob.if_group_exists(group_name.clone()), false); +}