diff --git a/README.md b/README.md
new file mode 100644
index 0000000..f762162
--- /dev/null
+++ b/README.md
@@ -0,0 +1,301 @@
+# 👑 BlockBelle
+
+**A Web3 Chat Platform Exclusively for Women in Blockchain**
+
+BlockBelle is a decentralized chat application built on Celo that creates a safe, verified space for women in the Web3 ecosystem to connect, collaborate, and thrive together.
+
+[](https://chata-bella.vercel.app)
+[](https://opensource.org/licenses/MIT)
+[](https://celo.org)
+
+---
+
+## ✨ Features
+
+### 🔐 Identity Verification
+- **Self Protocol Integration**: Privacy-preserving age (18+) and gender verification using zero-knowledge proofs
+- **Queens-Only Access**: Gender-based verification ensures the platform remains a women-only space
+- **On-Chain Attestation**: Verification status stored permanently on Celo blockchain
+
+### 💬 Decentralized Chat
+- **ENS-Based Registration**: Users register with custom ENS names
+- **Group & Private Messaging**: Chat with the entire community or individual members
+- **On-Chain Messages**: All messages stored on Celo for transparency and permanence
+
+### 👑 Tier System
+- **Tier 3 Badge**: Verified users receive a crown badge indicating trusted identity
+- **Visual Recognition**: Badges displayed next to usernames throughout the app
+
+### 🎨 Modern UI/UX
+- **Gradient Design**: Beautiful pink-to-purple-to-indigo gradients
+- **Responsive**: Works seamlessly on desktop and mobile
+- **Dark Mode Ready**: Glassmorphism effects and modern aesthetics
+
+---
+
+## 🚀 Tech Stack
+
+### Frontend
+- **Next.js 16** - React framework with App Router
+- **TypeScript** - Type-safe development
+- **Tailwind CSS** - Utility-first styling
+- **Wagmi** - React hooks for Ethereum
+- **RainbowKit** - Wallet connection UI
+- **Self Protocol** - Identity verification
+
+### Smart Contracts
+- **Solidity 0.8.28** - Smart contract language
+- **Foundry** - Development framework
+- **OpenZeppelin** - Security-audited contract libraries
+
+### Blockchain
+- **Celo Mainnet** - Layer-1 blockchain
+- **IPFS** - Decentralized storage (planned)
+
+---
+
+## 📋 Prerequisites
+
+- Node.js 18+ (Note: Self Protocol requires Node 22-23)
+- npm or yarn
+- MetaMask or compatible Web3 wallet
+- Celo tokens for gas fees
+
+---
+
+## 🛠️ Installation
+
+### 1. Clone the Repository
+```bash
+git clone https://github.com/yourusername/BlockBelle.git
+cd BlockBelle
+```
+
+### 2. Install Frontend Dependencies
+```bash
+cd next-frontend
+npm install
+```
+
+### 3. Install Contract Dependencies
+```bash
+cd ../contracts
+forge install
+```
+
+### 4. Environment Setup
+
+Create `.env.production` in `next-frontend/`:
+```env
+NEXT_PUBLIC_SELF_ENDPOINT=0x0a0c863edd00af4e48ecbb6f0cd11fd42dee56c2
+NEXT_PUBLIC_SELF_APP_NAME=BlockBelle
+NEXT_PUBLIC_SELF_SCOPE=blockbelle-chat
+```
+
+Create `.env` in `contracts/`:
+```env
+PRIVATE_KEY=your_private_key_here
+CELOSCAN_API_KEY=your_celoscan_api_key
+```
+
+---
+
+## 🏃 Running Locally
+
+### Frontend Development Server
+```bash
+cd next-frontend
+npm run dev
+```
+Visit `http://localhost:3000`
+
+### Smart Contract Testing
+```bash
+cd contracts
+forge test
+```
+
+---
+
+## 📦 Deployment
+
+### Deploy Smart Contracts
+```bash
+cd contracts
+forge script script/DeployProofOfHuman.s.sol --rpc-url celo --broadcast --verify
+```
+
+### Deploy Frontend to Vercel
+1. Push to GitHub
+2. Connect repository to Vercel
+3. Set root directory to `next-frontend`
+4. Add environment variables
+5. Deploy!
+
+---
+
+## 🏗️ Project Structure
+
+```
+BlockBelle/
+├── next-frontend/ # Next.js frontend application
+│ ├── src/
+│ │ ├── app/ # App router pages
+│ │ ├── components/ # React components
+│ │ ├── hooks/ # Custom React hooks
+│ │ ├── config/ # Wagmi & Web3 config
+│ │ └── lib/ # Utility functions
+│ ├── public/ # Static assets
+│ └── package.json
+│
+├── contracts/ # Solidity smart contracts
+│ ├── src/
+│ │ ├── ProofOfHuman.sol # Verification contract
+│ │ ├── WhisprRegistry.sol # User registration
+│ │ └── WhisprChat.sol # Chat functionality
+│ ├── script/ # Deployment scripts
+│ └── test/ # Contract tests
+│
+└── README.md
+```
+
+---
+
+## 📝 Smart Contracts
+
+### Deployed Contracts (Celo Mainnet)
+
+| Contract | Address | Purpose |
+|----------|---------|---------|
+| ProofOfHuman | `0x0a0c863edd00af4e48ecbb6f0cd11fd42dee56c2` | Identity verification |
+| WhisprRegistry | `0xA72B585c6b2293177dd485Ec0A607A471976771B` | User registration |
+| WhisprChat | `0x562456dBF6F21d40C96D392Ef6eD1de2e921bF2C` | Chat messages |
+
+### Contract Verification
+All contracts are verified on CeloScan. View source code and interact directly on the blockchain explorer.
+
+---
+
+## 🎯 How It Works
+
+### 1. Connect Wallet
+Users connect their Web3 wallet (MetaMask, WalletConnect, etc.) using RainbowKit.
+
+### 2. Register
+Choose a unique ENS name and register on-chain. This creates your BlockBelle identity.
+
+### 3. Verify Identity
+Scan QR code with Self Protocol mobile app to verify:
+- Age (18+)
+- Gender (Female only)
+- Nationality (optional)
+
+### 4. Get Verified
+- **Females**: Receive "Congratulations, Queen!" message and Tier 3 badge
+- **Males**: Receive respectful redirect message and cannot access chat
+
+### 5. Start Chatting
+Join the community chat or send private messages to other verified queens!
+
+---
+
+## 🔒 Security & Privacy
+
+### Zero-Knowledge Proofs
+Self Protocol uses ZK proofs to verify identity without revealing personal information. Your passport data never leaves your device.
+
+### On-Chain Verification
+Verification status is stored on Celo blockchain, ensuring:
+- Transparency
+- Immutability
+- Decentralization
+
+### Gender Verification
+Currently enforced at the frontend level. Future updates will include smart contract-level enforcement for enhanced security.
+
+---
+
+## 🛣️ Roadmap
+
+### Phase 1: Core Features ✅
+- [x] Wallet connection
+- [x] ENS registration
+- [x] Self Protocol verification
+- [x] Group chat
+- [x] Private messaging
+- [x] Gender-specific verification messages
+
+### Phase 2: Enhanced Security 🚧
+- [ ] Contract-level gender enforcement
+- [ ] Multi-signature admin controls
+- [ ] Rate limiting for spam prevention
+
+### Phase 3: Community Features 🔮
+- [ ] Mentorship matching
+- [ ] Event calendar
+- [ ] Resource library
+- [ ] Reputation system
+- [ ] NFT badges for achievements
+
+### Phase 4: Scalability 🌟
+- [ ] IPFS integration for media
+- [ ] Layer-2 scaling solutions
+- [ ] Mobile app (React Native)
+- [ ] Multi-chain support
+
+---
+
+## 🤝 Contributing
+
+We welcome contributions from women developers! Here's how you can help:
+
+1. Fork the repository
+2. Create a feature branch (`git checkout -b feature/amazing-feature`)
+3. Commit your changes (`git commit -m 'Add amazing feature'`)
+4. Push to the branch (`git push origin feature/amazing-feature`)
+5. Open a Pull Request
+
+### Development Guidelines
+- Follow existing code style
+- Write tests for new features
+- Update documentation
+- Be respectful and inclusive
+
+---
+
+## 📄 License
+
+This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
+
+---
+
+## 🙏 Acknowledgments
+
+- **Celo Foundation** - For the amazing blockchain infrastructure
+- **Self Protocol** - For privacy-preserving identity verification
+- **RainbowKit** - For beautiful wallet connection UX
+- **All the Queens** - Who inspire and support this project
+
+---
+
+## 📞 Contact & Support
+
+- **Website**: [chata-bella.vercel.app](https://chata-bella.vercel.app)
+- **Twitter**: [@BlockBelle](https://twitter.com/BlockBelle) *(coming soon)*
+- **Discord**: [Join our community](https://discord.gg/blockbelle) *(coming soon)*
+
+---
+
+## 💖 Support the Project
+
+If you believe in creating safe spaces for women in Web3, consider:
+- ⭐ Starring this repository
+- 🐦 Sharing on social media
+- 👩💻 Contributing code or documentation
+- 💬 Spreading the word to women builders
+
+---
+
+**Built with 💜 for Queens in Web3**
+
+*BlockBelle - Where Women in Blockchain Connect, Collaborate, and Thrive*
diff --git a/contracts/README.md b/contracts/README.md
new file mode 100644
index 0000000..8817d6a
--- /dev/null
+++ b/contracts/README.md
@@ -0,0 +1,66 @@
+## Foundry
+
+**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.**
+
+Foundry consists of:
+
+- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
+- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
+- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
+- **Chisel**: Fast, utilitarian, and verbose solidity REPL.
+
+## Documentation
+
+https://book.getfoundry.sh/
+
+## Usage
+
+### Build
+
+```shell
+$ forge build
+```
+
+### Test
+
+```shell
+$ forge test
+```
+
+### Format
+
+```shell
+$ forge fmt
+```
+
+### Gas Snapshots
+
+```shell
+$ forge snapshot
+```
+
+### Anvil
+
+```shell
+$ anvil
+```
+
+### Deploy
+
+```shell
+$ forge script script/Counter.s.sol:CounterScript --rpc-url --private-key
+```
+
+### Cast
+
+```shell
+$ cast
+```
+
+### Help
+
+```shell
+$ forge --help
+$ anvil --help
+$ cast --help
+```
diff --git a/contracts/foundry.toml b/contracts/foundry.toml
new file mode 100644
index 0000000..2d29ebf
--- /dev/null
+++ b/contracts/foundry.toml
@@ -0,0 +1,15 @@
+[profile.default]
+src = "src"
+out = "out"
+libs = ["lib"]
+remappings = [
+ "@selfxyz/contracts/=lib/self/contracts/",
+ "forge-std/=lib/forge-std/src/"
+]
+
+[rpc_endpoints]
+celo = "https://forno.celo.org"
+celo-sepolia = "https://alfajores-forno.celo-testnet.org"
+
+[etherscan]
+celo = { key = "${CELOSCAN_API_KEY}", url = "https://api.celoscan.io/api" }
diff --git a/contracts/lib/forge-std/.gitattributes b/contracts/lib/forge-std/.gitattributes
new file mode 100644
index 0000000..27042d4
--- /dev/null
+++ b/contracts/lib/forge-std/.gitattributes
@@ -0,0 +1 @@
+src/Vm.sol linguist-generated
diff --git a/contracts/lib/forge-std/.github/CODEOWNERS b/contracts/lib/forge-std/.github/CODEOWNERS
new file mode 100644
index 0000000..beae7aa
--- /dev/null
+++ b/contracts/lib/forge-std/.github/CODEOWNERS
@@ -0,0 +1 @@
+* @danipopes @klkvr @mattsse @grandizzy @yash-atreya @zerosnacks @onbjerg @0xrusowsky
\ No newline at end of file
diff --git a/contracts/lib/forge-std/.github/dependabot.yml b/contracts/lib/forge-std/.github/dependabot.yml
new file mode 100644
index 0000000..5ace460
--- /dev/null
+++ b/contracts/lib/forge-std/.github/dependabot.yml
@@ -0,0 +1,6 @@
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
diff --git a/contracts/lib/forge-std/.github/workflows/ci.yml b/contracts/lib/forge-std/.github/workflows/ci.yml
new file mode 100644
index 0000000..0c4fe4f
--- /dev/null
+++ b/contracts/lib/forge-std/.github/workflows/ci.yml
@@ -0,0 +1,137 @@
+name: CI
+
+permissions: {}
+
+on:
+ workflow_dispatch:
+ pull_request:
+ push:
+ branches:
+ - master
+
+jobs:
+ build:
+ name: build +${{ matrix.toolchain }} ${{ matrix.flags }}
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ permissions:
+ contents: read
+ strategy:
+ fail-fast: false
+ matrix:
+ toolchain: [stable, nightly]
+ flags:
+ - ""
+ - --via-ir
+ - --use solc:0.8.17 --via-ir
+ - --use solc:0.8.17
+ - --use solc:0.8.0
+ - --use solc:0.7.6
+ - --use solc:0.7.0
+ - --use solc:0.6.2
+ - --use solc:0.6.12
+ steps:
+ - uses: actions/checkout@v6
+ with:
+ persist-credentials: false
+ - uses: foundry-rs/foundry-toolchain@v1
+ - run: forge --version
+ - run: |
+ case "${{ matrix.flags }}" in
+ *"solc:0.8.0"* | *"solc:0.7"* | *"solc:0.6"*)
+ forge build --skip test --skip Config --skip StdConfig --skip LibVariable --deny-warnings ${{ matrix.flags }}
+ ;;
+ *)
+ forge build --skip test --deny-warnings ${{ matrix.flags }}
+ ;;
+ esac
+ # via-ir compilation time checks.
+ - if: contains(matrix.flags, '--via-ir')
+ run: forge build --skip test --deny-warnings ${{ matrix.flags }} --contracts 'test/compilation/*'
+
+ test:
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ permissions:
+ contents: read
+ strategy:
+ fail-fast: false
+ matrix:
+ toolchain: [stable, nightly]
+ steps:
+ - uses: actions/checkout@v6
+ with:
+ persist-credentials: false
+ - uses: foundry-rs/foundry-toolchain@v1
+ with:
+ version: ${{ matrix.toolchain }}
+ - run: forge --version
+ - run: forge test -vvv
+
+ fmt:
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ permissions:
+ contents: read
+ steps:
+ - uses: actions/checkout@v6
+ with:
+ persist-credentials: false
+ - uses: foundry-rs/foundry-toolchain@v1
+ - run: forge --version
+ - run: forge fmt --check
+
+ typos:
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ permissions:
+ contents: read
+ steps:
+ - uses: actions/checkout@v6
+ with:
+ persist-credentials: false
+ - uses: crate-ci/typos@626c4bedb751ce0b7f03262ca97ddda9a076ae1c # v1
+
+ codeql:
+ name: Analyze (${{ matrix.language }})
+ runs-on: ubuntu-latest
+ permissions:
+ security-events: write
+ actions: read
+ contents: read
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - language: actions
+ build-mode: none
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v6
+ with:
+ persist-credentials: false
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v4
+ with:
+ languages: ${{ matrix.language }}
+ build-mode: ${{ matrix.build-mode }}
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v4
+ with:
+ category: "/language:${{matrix.language}}"
+
+ ci-success:
+ runs-on: ubuntu-latest
+ if: always()
+ needs:
+ - build
+ - test
+ - fmt
+ - typos
+ - codeql
+ timeout-minutes: 10
+ steps:
+ - name: Decide whether the needed jobs succeeded or failed
+ uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # release/v1
+ with:
+ jobs: ${{ toJSON(needs) }}
diff --git a/contracts/lib/forge-std/.github/workflows/sync.yml b/contracts/lib/forge-std/.github/workflows/sync.yml
new file mode 100644
index 0000000..ad4b173
--- /dev/null
+++ b/contracts/lib/forge-std/.github/workflows/sync.yml
@@ -0,0 +1,36 @@
+name: Sync Release Branch
+
+permissions: {}
+
+on:
+ release:
+ types:
+ - created
+
+jobs:
+ sync-release-branch:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ if: startsWith(github.event.release.tag_name, 'v1')
+ steps:
+ - name: Check out the repo
+ uses: actions/checkout@v6
+ with:
+ persist-credentials: true
+ fetch-depth: 0
+ ref: v1
+
+ # The email is derived from the bots user id,
+ # found here: https://api.github.com/users/github-actions%5Bbot%5D
+ - name: Configure Git
+ run: |
+ git config user.name github-actions[bot]
+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
+
+ - name: Sync Release Branch
+ run: |
+ git fetch --tags
+ git checkout v1
+ git reset --hard ${GITHUB_REF}
+ git push --force
diff --git a/contracts/lib/forge-std/.gitignore b/contracts/lib/forge-std/.gitignore
new file mode 100644
index 0000000..756106d
--- /dev/null
+++ b/contracts/lib/forge-std/.gitignore
@@ -0,0 +1,4 @@
+cache/
+out/
+.vscode
+.idea
diff --git a/contracts/lib/forge-std/CONTRIBUTING.md b/contracts/lib/forge-std/CONTRIBUTING.md
new file mode 100644
index 0000000..89b75f3
--- /dev/null
+++ b/contracts/lib/forge-std/CONTRIBUTING.md
@@ -0,0 +1,193 @@
+## Contributing to Foundry
+
+Thanks for your interest in improving Foundry!
+
+There are multiple opportunities to contribute at any level. It doesn't matter if you are just getting started with Rust or are the most weathered expert, we can use your help.
+
+This document will help you get started. **Do not let the document intimidate you**.
+It should be considered as a guide to help you navigate the process.
+
+The [dev Telegram][dev-tg] is available for any concerns you may have that are not covered in this guide.
+
+### Code of Conduct
+
+The Foundry project adheres to the [Rust Code of Conduct][rust-coc]. This code of conduct describes the _minimum_ behavior expected from all contributors.
+
+Instances of violations of the Code of Conduct can be reported by contacting the team at [me@gakonst.com](mailto:me@gakonst.com).
+
+### Ways to contribute
+
+There are fundamentally four ways an individual can contribute:
+
+1. **By opening an issue:** For example, if you believe that you have uncovered a bug
+ in Foundry, creating a new issue in the issue tracker is the way to report it.
+2. **By adding context:** Providing additional context to existing issues,
+ such as screenshots and code snippets, which help resolve issues.
+3. **By resolving issues:** Typically this is done in the form of either
+ demonstrating that the issue reported is not a problem after all, or more often,
+ by opening a pull request that fixes the underlying problem, in a concrete and
+ reviewable manner.
+
+**Anybody can participate in any stage of contribution**. We urge you to participate in the discussion
+around bugs and participate in reviewing PRs.
+
+### Contributions Related to Spelling and Grammar
+
+At this time, we will not be accepting contributions that only fix spelling or grammatical errors in documentation, code or
+elsewhere.
+
+### Asking for help
+
+If you have reviewed existing documentation and still have questions, or you are having problems, you can get help in the following ways:
+
+- **Asking in the support Telegram:** The [Foundry Support Telegram][support-tg] is a fast and easy way to ask questions.
+- **Opening a discussion:** This repository comes with a discussions board where you can also ask for help. Click the "Discussions" tab at the top.
+
+As Foundry is still in heavy development, the documentation can be a bit scattered.
+The [Foundry Book][foundry-book] is our current best-effort attempt at keeping up-to-date information.
+
+### Submitting a bug report
+
+When filing a new bug report in the issue tracker, you will be presented with a basic form to fill out.
+
+If you believe that you have uncovered a bug, please fill out the form to the best of your ability. Do not worry if you cannot answer every detail; just fill in what you can. Contributors will ask follow-up questions if something is unclear.
+
+The most important pieces of information we need in a bug report are:
+
+- The Foundry version you are on (and that it is up to date)
+- The platform you are on (Windows, macOS, an M1 Mac or Linux)
+- Code snippets if this is happening in relation to testing or building code
+- Concrete steps to reproduce the bug
+
+In order to rule out the possibility of the bug being in your project, the code snippets should be as minimal
+as possible. It is better if you can reproduce the bug with a small snippet as opposed to an entire project!
+
+See [this guide][mcve] on how to create a minimal, complete, and verifiable example.
+
+### Submitting a feature request
+
+When adding a feature request in the issue tracker, you will be presented with a basic form to fill out.
+
+Please include as detailed of an explanation as possible of the feature you would like, adding additional context if necessary.
+
+If you have examples of other tools that have the feature you are requesting, please include them as well.
+
+### Resolving an issue
+
+Pull requests are the way concrete changes are made to the code, documentation, and dependencies of Foundry.
+
+Even minor pull requests, such as those fixing wording, are greatly appreciated. Before making a large change, it is usually
+a good idea to first open an issue describing the change to solicit feedback and guidance. This will increase
+the likelihood of the PR getting merged.
+
+Please make sure that the following commands pass if you have changed the code:
+
+```sh
+forge fmt --check
+forge test -vvv
+```
+
+To make sure your changes are compatible with all compiler version targets, run the following commands:
+
+```sh
+forge build --skip test --use solc:0.6.2
+forge build --skip test --use solc:0.6.12
+forge build --skip test --use solc:0.7.0
+forge build --skip test --use solc:0.7.6
+forge build --skip test --use solc:0.8.0
+```
+
+The CI will also ensure that the code is formatted correctly and that the tests are passing across all compiler version targets.
+
+#### Adding cheatcodes
+
+Please follow the guide outlined in the [cheatcodes](https://github.com/foundry-rs/foundry/blob/master/docs/dev/cheatcodes.md#adding-a-new-cheatcode) documentation of Foundry.
+
+When making modifications to the native cheatcodes or adding new ones, please make sure to run [`./scripts/vm.py`](./scripts/vm.py) to update the cheatcodes in the [`src/Vm.sol`](./src/Vm.sol) file.
+
+By default the script will automatically generate the cheatcodes from the [`cheatcodes.json`](https://raw.githubusercontent.com/foundry-rs/foundry/master/crates/cheatcodes/assets/cheatcodes.json) file but alternatively you can provide a path to a JSON file containing the Vm interface, as generated by Foundry, with the `--from` flag.
+
+```sh
+./scripts/vm.py --from path/to/cheatcodes.json
+```
+
+It is possible that the resulting [`src/Vm.sol`](./src/Vm.sol) file will have some changes that are not directly related to your changes, this is not a problem.
+
+#### Commits
+
+It is a recommended best practice to keep your changes as logically grouped as possible within individual commits. There is no limit to the number of commits any single pull request may have, and many contributors find it easier to review changes that are split across multiple commits.
+
+That said, if you have a number of commits that are "checkpoints" and don't represent a single logical change, please squash those together.
+
+#### Opening the pull request
+
+From within GitHub, opening a new pull request will present you with a template that should be filled out. Please try your best at filling out the details, but feel free to skip parts if you're not sure what to put.
+
+#### Discuss and update
+
+You will probably get feedback or requests for changes to your pull request.
+This is a big part of the submission process, so don't be discouraged! Some contributors may sign off on the pull request right away, others may have more detailed comments or feedback.
+This is a necessary part of the process in order to evaluate whether the changes are correct and necessary.
+
+**Any community member can review a PR, so you might get conflicting feedback**.
+Keep an eye out for comments from code owners to provide guidance on conflicting feedback.
+
+#### Reviewing pull requests
+
+**Any Foundry community member is welcome to review any pull request**.
+
+All contributors who choose to review and provide feedback on pull requests have a responsibility to both the project and individual making the contribution. Reviews and feedback must be helpful, insightful, and geared towards improving the contribution as opposed to simply blocking it. If there are reasons why you feel the PR should not be merged, explain what those are. Do not expect to be able to block a PR from advancing simply because you say "no" without giving an explanation. Be open to having your mind changed. Be open to working _with_ the contributor to make the pull request better.
+
+Reviews that are dismissive or disrespectful of the contributor or any other reviewers are strictly counter to the Code of Conduct.
+
+When reviewing a pull request, the primary goals are for the codebase to improve and for the person submitting the request to succeed. **Even if a pull request is not merged, the submitter should come away from the experience feeling like their effort was not unappreciated**. Every PR from a new contributor is an opportunity to grow the community.
+
+##### Review a bit at a time
+
+Do not overwhelm new contributors.
+
+It is tempting to micro-optimize and make everything about relative performance, perfect grammar, or exact style matches. Do not succumb to that temptation..
+
+Focus first on the most significant aspects of the change:
+
+1. Does this change make sense for Foundry?
+2. Does this change make Foundry better, even if only incrementally?
+3. Are there clear bugs or larger scale issues that need attending?
+4. Are the commit messages readable and correct? If it contains a breaking change, is it clear enough?
+
+Note that only **incremental** improvement is needed to land a PR. This means that the PR does not need to be perfect, only better than the status quo. Follow-up PRs may be opened to continue iterating.
+
+When changes are necessary, _request_ them, do not _demand_ them, and **do not assume that the submitter already knows how to add a test or run a benchmark**.
+
+Specific performance optimization techniques, coding styles and conventions change over time. The first impression you give to a new contributor never does.
+
+Nits (requests for small changes that are not essential) are fine, but try to avoid stalling the pull request. Most nits can typically be fixed by the Foundry maintainers merging the pull request, but they can also be an opportunity for the contributor to learn a bit more about the project.
+
+It is always good to clearly indicate nits when you comment, e.g.: `Nit: change foo() to bar(). But this is not blocking`.
+
+If your comments were addressed but were not folded after new commits, or if they proved to be mistaken, please, [hide them][hiding-a-comment] with the appropriate reason to keep the conversation flow concise and relevant.
+
+##### Be aware of the person behind the code
+
+Be aware that _how_ you communicate requests and reviews in your feedback can have a significant impact on the success of the pull request. Yes, we may merge a particular change that makes Foundry better, but the individual might just not want to have anything to do with Foundry ever again. The goal is not just having good code.
+
+##### Abandoned or stale pull requests
+
+If a pull request appears to be abandoned or stalled, it is polite to first check with the contributor to see if they intend to continue the work before checking if they would mind if you took it over (especially if it just has nits left). When doing so, it is courteous to give the original contributor credit for the work they started, either by preserving their name and e-mail address in the commit log, or by using the `Author: ` or `Co-authored-by: ` metadata tag in the commits.
+
+_Adapted from the [ethers-rs contributing guide](https://github.com/gakonst/ethers-rs/blob/master/CONTRIBUTING.md)_.
+
+### Releasing
+
+Releases are automatically done by the release workflow when a tag is pushed, however, these steps still need to be taken:
+
+1. Ensure that the versions in the relevant `Cargo.toml` files are up-to-date.
+2. Update documentation links
+3. Perform a final audit for breaking changes.
+
+[rust-coc]: https://github.com/rust-lang/rust/blob/master/CODE_OF_CONDUCT.md
+[dev-tg]: https://t.me/foundry_rs
+[foundry-book]: https://github.com/foundry-rs/foundry-book
+[support-tg]: https://t.me/foundry_support
+[mcve]: https://stackoverflow.com/help/mcve
+[hiding-a-comment]: https://help.github.com/articles/managing-disruptive-comments/#hiding-a-comment
\ No newline at end of file
diff --git a/contracts/lib/forge-std/LICENSE-APACHE b/contracts/lib/forge-std/LICENSE-APACHE
new file mode 100644
index 0000000..cf01a49
--- /dev/null
+++ b/contracts/lib/forge-std/LICENSE-APACHE
@@ -0,0 +1,203 @@
+Copyright Contributors to Forge Standard Library
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/contracts/lib/forge-std/LICENSE-MIT b/contracts/lib/forge-std/LICENSE-MIT
new file mode 100644
index 0000000..28f9830
--- /dev/null
+++ b/contracts/lib/forge-std/LICENSE-MIT
@@ -0,0 +1,25 @@
+Copyright Contributors to Forge Standard Library
+
+Permission is hereby granted, free of charge, to any
+person obtaining a copy of this software and associated
+documentation files (the "Software"), to deal in the
+Software without restriction, including without
+limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software
+is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice
+shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
+ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
+TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE O THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.R
diff --git a/contracts/lib/forge-std/README.md b/contracts/lib/forge-std/README.md
new file mode 100644
index 0000000..e7aaca6
--- /dev/null
+++ b/contracts/lib/forge-std/README.md
@@ -0,0 +1,266 @@
+# Forge Standard Library • [](https://github.com/foundry-rs/forge-std/actions/workflows/ci.yml)
+
+Forge Standard Library is a collection of helpful contracts and libraries for use with [Forge and Foundry](https://github.com/foundry-rs/foundry). It leverages Forge's cheatcodes to make writing tests easier and faster, while improving the UX of cheatcodes.
+
+**Learn how to use Forge-Std with the [📖 Foundry Book (Forge-Std Guide)](https://getfoundry.sh/reference/forge-std/overview/).**
+
+## Install
+
+```bash
+forge install foundry-rs/forge-std
+```
+
+## Contracts
+### stdError
+
+This is a helper contract for errors and reverts. In Forge, this contract is particularly helpful for the `expectRevert` cheatcode, as it provides all compiler built-in errors.
+
+See the contract itself for all error codes.
+
+#### Example usage
+
+```solidity
+
+import "forge-std/Test.sol";
+
+contract TestContract is Test {
+ ErrorsTest test;
+
+ function setUp() public {
+ test = new ErrorsTest();
+ }
+
+ function testExpectArithmetic() public {
+ vm.expectRevert(stdError.arithmeticError);
+ test.arithmeticError(10);
+ }
+}
+
+contract ErrorsTest {
+ function arithmeticError(uint256 a) public {
+ a = a - 100;
+ }
+}
+```
+
+### stdStorage
+
+This is a rather large contract due to all of the overloading to make the UX decent. Primarily, it is a wrapper around the `record` and `accesses` cheatcodes. It can *always* find and write the storage slot(s) associated with a particular variable without knowing the storage layout. The one _major_ caveat to this is while a slot can be found for packed storage variables, we can't write to that variable safely. If a user tries to write to a packed slot, the execution throws an error, unless it is uninitialized (`bytes32(0)`).
+
+This works by recording all `SLOAD`s and `SSTORE`s during a function call. If there is a single slot read or written to, it immediately returns the slot. Otherwise, behind the scenes, we iterate through and check each one (assuming the user passed in a `depth` parameter). If the variable is a struct, you can pass in a `depth` parameter which is basically the field depth.
+
+I.e.:
+```solidity
+struct T {
+ // depth 0
+ uint256 a;
+ // depth 1
+ uint256 b;
+}
+```
+
+#### Example usage
+
+```solidity
+import "forge-std/Test.sol";
+
+contract TestContract is Test {
+ using stdStorage for StdStorage;
+
+ Storage test;
+
+ function setUp() public {
+ test = new Storage();
+ }
+
+ function testFindExists() public {
+ // Lets say we want to find the slot for the public
+ // variable `exists`. We just pass in the function selector
+ // to the `find` command
+ uint256 slot = stdstore.target(address(test)).sig("exists()").find();
+ assertEq(slot, 0);
+ }
+
+ function testWriteExists() public {
+ // Lets say we want to write to the slot for the public
+ // variable `exists`. We just pass in the function selector
+ // to the `checked_write` command
+ stdstore.target(address(test)).sig("exists()").checked_write(100);
+ assertEq(test.exists(), 100);
+ }
+
+ // It supports arbitrary storage layouts, like assembly based storage locations
+ function testFindHidden() public {
+ // `hidden` is a random hash of a bytes, iteration through slots would
+ // not find it. Our mechanism does
+ // Also, you can use the selector instead of a string
+ uint256 slot = stdstore.target(address(test)).sig(test.hidden.selector).find();
+ assertEq(slot, uint256(keccak256("my.random.var")));
+ }
+
+ // If targeting a mapping, you have to pass in the keys necessary to perform the find
+ // i.e.:
+ function testFindMapping() public {
+ uint256 slot = stdstore
+ .target(address(test))
+ .sig(test.map_addr.selector)
+ .with_key(address(this))
+ .find();
+ // in the `Storage` constructor, we wrote that this address' value was 1 in the map
+ // so when we load the slot, we expect it to be 1
+ assertEq(uint(vm.load(address(test), bytes32(slot))), 1);
+ }
+
+ // If the target is a struct, you can specify the field depth:
+ function testFindStruct() public {
+ // NOTE: see the depth parameter - 0 means 0th field, 1 means 1st field, etc.
+ uint256 slot_for_a_field = stdstore
+ .target(address(test))
+ .sig(test.basicStruct.selector)
+ .depth(0)
+ .find();
+
+ uint256 slot_for_b_field = stdstore
+ .target(address(test))
+ .sig(test.basicStruct.selector)
+ .depth(1)
+ .find();
+
+ assertEq(uint(vm.load(address(test), bytes32(slot_for_a_field))), 1);
+ assertEq(uint(vm.load(address(test), bytes32(slot_for_b_field))), 2);
+ }
+}
+
+// A complex storage contract
+contract Storage {
+ struct UnpackedStruct {
+ uint256 a;
+ uint256 b;
+ }
+
+ constructor() {
+ map_addr[msg.sender] = 1;
+ }
+
+ uint256 public exists = 1;
+ mapping(address => uint256) public map_addr;
+ // mapping(address => Packed) public map_packed;
+ mapping(address => UnpackedStruct) public map_struct;
+ mapping(address => mapping(address => uint256)) public deep_map;
+ mapping(address => mapping(address => UnpackedStruct)) public deep_map_struct;
+ UnpackedStruct public basicStruct = UnpackedStruct({
+ a: 1,
+ b: 2
+ });
+
+ function hidden() public view returns (bytes32 t) {
+ // an extremely hidden storage slot
+ bytes32 slot = keccak256("my.random.var");
+ assembly {
+ t := sload(slot)
+ }
+ }
+}
+```
+
+### stdCheats
+
+This is a wrapper over miscellaneous cheatcodes that need wrappers to be more dev friendly. Currently there are only functions related to `prank`. In general, users may expect ETH to be put into an address on `prank`, but this is not the case for safety reasons. Explicitly this `hoax` function should only be used for addresses that have expected balances as it will get overwritten. If an address already has ETH, you should just use `prank`. If you want to change that balance explicitly, just use `deal`. If you want to do both, `hoax` is also right for you.
+
+
+#### Example usage:
+```solidity
+
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.0;
+
+import "forge-std/Test.sol";
+
+// Inherit the stdCheats
+contract StdCheatsTest is Test {
+ Bar test;
+ function setUp() public {
+ test = new Bar();
+ }
+
+ function testHoax() public {
+ // we call `hoax`, which gives the target address
+ // eth and then calls `prank`
+ hoax(address(1337));
+ test.bar{value: 100}(address(1337));
+
+ // overloaded to allow you to specify how much eth to
+ // initialize the address with
+ hoax(address(1337), 1);
+ test.bar{value: 1}(address(1337));
+ }
+
+ function testStartHoax() public {
+ // we call `startHoax`, which gives the target address
+ // eth and then calls `startPrank`
+ //
+ // it is also overloaded so that you can specify an eth amount
+ startHoax(address(1337));
+ test.bar{value: 100}(address(1337));
+ test.bar{value: 100}(address(1337));
+ vm.stopPrank();
+ test.bar(address(this));
+ }
+}
+
+contract Bar {
+ function bar(address expectedSender) public payable {
+ require(msg.sender == expectedSender, "!prank");
+ }
+}
+```
+
+### Std Assertions
+
+Contains various assertions.
+
+### `console.log`
+
+Usage follows the same format as [Hardhat](https://hardhat.org/hardhat-network/reference/#console-log).
+It's recommended to use `console2.sol` as shown below, as this will show the decoded logs in Forge traces.
+
+```solidity
+// import it indirectly via Test.sol
+import "forge-std/Test.sol";
+// or directly import it
+import "forge-std/console2.sol";
+...
+console2.log(someValue);
+```
+
+If you need compatibility with Hardhat, you must use the standard `console.sol` instead.
+Due to a bug in `console.sol`, logs that use `uint256` or `int256` types will not be properly decoded in Forge traces.
+
+```solidity
+// import it indirectly via Test.sol
+import "forge-std/Test.sol";
+// or directly import it
+import "forge-std/console.sol";
+...
+console.log(someValue);
+```
+
+## Contributing
+
+See our [contributing guidelines](./CONTRIBUTING.md).
+
+## Getting Help
+
+First, see if the answer to your question can be found in [book](https://getfoundry.sh/).
+
+If the answer is not there:
+
+- Join the [support Telegram](https://t.me/foundry_support) to get help, or
+- Open a [discussion](https://github.com/foundry-rs/foundry/discussions/new/choose) with your question, or
+- Open an issue with [the bug](https://github.com/foundry-rs/foundry/issues/new/choose)
+
+If you want to contribute, or follow along with contributor discussion, you can use our [main telegram](https://t.me/foundry_rs) to chat with us about the development of Foundry!
+
+## License
+
+Forge Standard Library is offered under either [MIT](LICENSE-MIT) or [Apache 2.0](LICENSE-APACHE) license.
diff --git a/contracts/lib/forge-std/RELEASE_CHECKLIST.md b/contracts/lib/forge-std/RELEASE_CHECKLIST.md
new file mode 100644
index 0000000..4611de4
--- /dev/null
+++ b/contracts/lib/forge-std/RELEASE_CHECKLIST.md
@@ -0,0 +1,12 @@
+# Release checklist
+
+This checklist is meant to be used as a guide for the `forge-std` release process.
+
+## Steps
+
+- [ ] Update the version number in `package.json`
+- [ ] Open and merge a PR with the version bump
+- [ ] Tag the merged commit with the version number: `git tag v`
+- [ ] Push the tag to the repository: `git push --tags`
+- [ ] Create a new GitHub release with the automatically generated changelog and with the name set to `v`
+- [ ] Add `## Featured Changes` section to the top of the release notes
diff --git a/contracts/lib/forge-std/foundry.toml b/contracts/lib/forge-std/foundry.toml
new file mode 100644
index 0000000..376654d
--- /dev/null
+++ b/contracts/lib/forge-std/foundry.toml
@@ -0,0 +1,30 @@
+[profile.default]
+fs_permissions = [{ access = "read-write", path = "./" }]
+optimizer = true
+optimizer_runs = 200
+
+# A list of solidity error codes to ignore.
+# 3860 = init-code-size
+ignored_error_codes = [3860]
+
+[rpc_endpoints]
+# The RPC URLs are modified versions of the default for testing initialization.
+mainnet = "https://reth-ethereum.ithaca.xyz/rpc"
+optimism_sepolia = "https://sepolia.optimism.io/" # Adds a trailing slash.
+arbitrum_one_sepolia = "https://sepolia-rollup.arbitrum.io/rpc/" # Adds a trailing slash.
+needs_undefined_env_var = "${UNDEFINED_RPC_URL_PLACEHOLDER}"
+
+[lint]
+lint_on_build = false
+
+[fmt]
+# These are all the `forge fmt` defaults.
+line_length = 120
+tab_width = 4
+bracket_spacing = false
+int_types = 'long'
+multiline_func_header = 'attributes_first'
+quote_style = 'double'
+number_underscore = 'preserve'
+single_line_statement_blocks = 'preserve'
+ignore = ["src/console.sol", "src/console2.sol"]
diff --git a/contracts/lib/forge-std/package.json b/contracts/lib/forge-std/package.json
new file mode 100644
index 0000000..3bfa8f9
--- /dev/null
+++ b/contracts/lib/forge-std/package.json
@@ -0,0 +1,16 @@
+{
+ "name": "forge-std",
+ "version": "1.12.0",
+ "description": "Forge Standard Library is a collection of helpful contracts and libraries for use with Forge and Foundry.",
+ "homepage": "https://book.getfoundry.sh/forge/forge-std",
+ "bugs": "https://github.com/foundry-rs/forge-std/issues",
+ "license": "(Apache-2.0 OR MIT)",
+ "author": "Contributors to Forge Standard Library",
+ "files": [
+ "src/**/*"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/foundry-rs/forge-std.git"
+ }
+}
diff --git a/contracts/lib/forge-std/scripts/vm.py b/contracts/lib/forge-std/scripts/vm.py
new file mode 100644
index 0000000..3cd047d
--- /dev/null
+++ b/contracts/lib/forge-std/scripts/vm.py
@@ -0,0 +1,646 @@
+#!/usr/bin/env python3
+
+import argparse
+import copy
+import json
+import re
+import subprocess
+from enum import Enum as PyEnum
+from pathlib import Path
+from typing import Callable
+from urllib import request
+
+VoidFn = Callable[[], None]
+
+CHEATCODES_JSON_URL = "https://raw.githubusercontent.com/foundry-rs/foundry/master/crates/cheatcodes/assets/cheatcodes.json"
+OUT_PATH = "src/Vm.sol"
+
+VM_SAFE_DOC = """\
+/// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may
+/// result in Script simulations differing from on-chain execution. It is recommended to only use
+/// these cheats in scripts.
+"""
+
+VM_DOC = """\
+/// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used
+/// in tests, but it is not recommended to use these cheats in scripts.
+"""
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="Generate Vm.sol based on the cheatcodes json created by Foundry")
+ parser.add_argument(
+ "--from",
+ metavar="PATH",
+ dest="path",
+ required=False,
+ help="path to a json file containing the Vm interface, as generated by Foundry")
+ args = parser.parse_args()
+ json_str = request.urlopen(CHEATCODES_JSON_URL).read().decode("utf-8") if args.path is None else Path(args.path).read_text()
+ contract = Cheatcodes.from_json(json_str)
+
+ ccs = contract.cheatcodes
+ ccs = list(filter(lambda cc: cc.status not in ["experimental", "internal"], ccs))
+ ccs.sort(key=lambda cc: cc.func.id)
+
+ safe = list(filter(lambda cc: cc.safety == "safe", ccs))
+ safe.sort(key=CmpCheatcode)
+ unsafe = list(filter(lambda cc: cc.safety == "unsafe", ccs))
+ unsafe.sort(key=CmpCheatcode)
+ assert len(safe) + len(unsafe) == len(ccs)
+
+ prefix_with_group_headers(safe)
+ prefix_with_group_headers(unsafe)
+
+ out = ""
+
+ out += "// Automatically @generated by scripts/vm.py. Do not modify manually.\n\n"
+
+ pp = CheatcodesPrinter(
+ spdx_identifier="MIT OR Apache-2.0",
+ solidity_requirement=">=0.6.2 <0.9.0",
+ abicoder_pragma=True,
+ )
+ pp.p_prelude()
+ pp.prelude = False
+ out += pp.finish()
+
+ out += "\n\n"
+ out += VM_SAFE_DOC
+ vm_safe = Cheatcodes(
+ # TODO: Custom errors were introduced in 0.8.4
+ errors=[], # contract.errors
+ events=contract.events,
+ enums=contract.enums,
+ structs=contract.structs,
+ cheatcodes=safe,
+ )
+ pp.p_contract(vm_safe, "VmSafe")
+ out += pp.finish()
+
+ out += "\n\n"
+ out += VM_DOC
+ vm_unsafe = Cheatcodes(
+ errors=[],
+ events=[],
+ enums=[],
+ structs=[],
+ cheatcodes=unsafe,
+ )
+ pp.p_contract(vm_unsafe, "Vm", "VmSafe")
+ out += pp.finish()
+
+ # Compatibility with <0.8.0
+ def memory_to_calldata(m: re.Match) -> str:
+ return " calldata " + m.group(1)
+
+ out = re.sub(r" memory (.*returns)", memory_to_calldata, out)
+
+ with open(OUT_PATH, "w") as f:
+ f.write(out)
+
+ forge_fmt = ["forge", "fmt", OUT_PATH]
+ res = subprocess.run(forge_fmt)
+ assert res.returncode == 0, f"command failed: {forge_fmt}"
+
+ print(f"Wrote to {OUT_PATH}")
+
+
+class CmpCheatcode:
+ cheatcode: "Cheatcode"
+
+ def __init__(self, cheatcode: "Cheatcode"):
+ self.cheatcode = cheatcode
+
+ def __lt__(self, other: "CmpCheatcode") -> bool:
+ return cmp_cheatcode(self.cheatcode, other.cheatcode) < 0
+
+ def __eq__(self, other: "CmpCheatcode") -> bool:
+ return cmp_cheatcode(self.cheatcode, other.cheatcode) == 0
+
+ def __gt__(self, other: "CmpCheatcode") -> bool:
+ return cmp_cheatcode(self.cheatcode, other.cheatcode) > 0
+
+
+def cmp_cheatcode(a: "Cheatcode", b: "Cheatcode") -> int:
+ if a.group != b.group:
+ return -1 if a.group < b.group else 1
+ if a.status != b.status:
+ return -1 if a.status < b.status else 1
+ if a.safety != b.safety:
+ return -1 if a.safety < b.safety else 1
+ if a.func.id != b.func.id:
+ return -1 if a.func.id < b.func.id else 1
+ return 0
+
+
+# HACK: A way to add group header comments without having to modify printer code
+def prefix_with_group_headers(cheats: list["Cheatcode"]):
+ s = set()
+ for i, cheat in enumerate(cheats):
+ if cheat.group in s:
+ continue
+
+ s.add(cheat.group)
+
+ c = copy.deepcopy(cheat)
+ c.func.description = ""
+ c.func.declaration = f"// ======== {group(c.group)} ========"
+ cheats.insert(i, c)
+ return cheats
+
+
+def group(s: str) -> str:
+ if s == "evm":
+ return "EVM"
+ if s == "json":
+ return "JSON"
+ return s[0].upper() + s[1:]
+
+
+class Visibility(PyEnum):
+ EXTERNAL: str = "external"
+ PUBLIC: str = "public"
+ INTERNAL: str = "internal"
+ PRIVATE: str = "private"
+
+ def __str__(self):
+ return self.value
+
+
+class Mutability(PyEnum):
+ PURE: str = "pure"
+ VIEW: str = "view"
+ NONE: str = ""
+
+ def __str__(self):
+ return self.value
+
+
+class Function:
+ id: str
+ description: str
+ declaration: str
+ visibility: Visibility
+ mutability: Mutability
+ signature: str
+ selector: str
+ selector_bytes: bytes
+
+ def __init__(
+ self,
+ id: str,
+ description: str,
+ declaration: str,
+ visibility: Visibility,
+ mutability: Mutability,
+ signature: str,
+ selector: str,
+ selector_bytes: bytes,
+ ):
+ self.id = id
+ self.description = description
+ self.declaration = declaration
+ self.visibility = visibility
+ self.mutability = mutability
+ self.signature = signature
+ self.selector = selector
+ self.selector_bytes = selector_bytes
+
+ @staticmethod
+ def from_dict(d: dict) -> "Function":
+ return Function(
+ d["id"],
+ d["description"],
+ d["declaration"],
+ Visibility(d["visibility"]),
+ Mutability(d["mutability"]),
+ d["signature"],
+ d["selector"],
+ bytes(d["selectorBytes"]),
+ )
+
+
+class Cheatcode:
+ func: Function
+ group: str
+ status: str
+ safety: str
+
+ def __init__(self, func: Function, group: str, status: str, safety: str):
+ self.func = func
+ self.group = group
+ self.status = status
+ self.safety = safety
+
+ @staticmethod
+ def from_dict(d: dict) -> "Cheatcode":
+ return Cheatcode(
+ Function.from_dict(d["func"]),
+ str(d["group"]),
+ str(d["status"]),
+ str(d["safety"]),
+ )
+
+
+class Error:
+ name: str
+ description: str
+ declaration: str
+
+ def __init__(self, name: str, description: str, declaration: str):
+ self.name = name
+ self.description = description
+ self.declaration = declaration
+
+ @staticmethod
+ def from_dict(d: dict) -> "Error":
+ return Error(**d)
+
+
+class Event:
+ name: str
+ description: str
+ declaration: str
+
+ def __init__(self, name: str, description: str, declaration: str):
+ self.name = name
+ self.description = description
+ self.declaration = declaration
+
+ @staticmethod
+ def from_dict(d: dict) -> "Event":
+ return Event(**d)
+
+
+class EnumVariant:
+ name: str
+ description: str
+
+ def __init__(self, name: str, description: str):
+ self.name = name
+ self.description = description
+
+
+class Enum:
+ name: str
+ description: str
+ variants: list[EnumVariant]
+
+ def __init__(self, name: str, description: str, variants: list[EnumVariant]):
+ self.name = name
+ self.description = description
+ self.variants = variants
+
+ @staticmethod
+ def from_dict(d: dict) -> "Enum":
+ return Enum(
+ d["name"],
+ d["description"],
+ list(map(lambda v: EnumVariant(**v), d["variants"])),
+ )
+
+
+class StructField:
+ name: str
+ ty: str
+ description: str
+
+ def __init__(self, name: str, ty: str, description: str):
+ self.name = name
+ self.ty = ty
+ self.description = description
+
+
+class Struct:
+ name: str
+ description: str
+ fields: list[StructField]
+
+ def __init__(self, name: str, description: str, fields: list[StructField]):
+ self.name = name
+ self.description = description
+ self.fields = fields
+
+ @staticmethod
+ def from_dict(d: dict) -> "Struct":
+ return Struct(
+ d["name"],
+ d["description"],
+ list(map(lambda f: StructField(**f), d["fields"])),
+ )
+
+
+class Cheatcodes:
+ errors: list[Error]
+ events: list[Event]
+ enums: list[Enum]
+ structs: list[Struct]
+ cheatcodes: list[Cheatcode]
+
+ def __init__(
+ self,
+ errors: list[Error],
+ events: list[Event],
+ enums: list[Enum],
+ structs: list[Struct],
+ cheatcodes: list[Cheatcode],
+ ):
+ self.errors = errors
+ self.events = events
+ self.enums = enums
+ self.structs = structs
+ self.cheatcodes = cheatcodes
+
+ @staticmethod
+ def from_dict(d: dict) -> "Cheatcodes":
+ return Cheatcodes(
+ errors=[Error.from_dict(e) for e in d["errors"]],
+ events=[Event.from_dict(e) for e in d["events"]],
+ enums=[Enum.from_dict(e) for e in d["enums"]],
+ structs=[Struct.from_dict(e) for e in d["structs"]],
+ cheatcodes=[Cheatcode.from_dict(e) for e in d["cheatcodes"]],
+ )
+
+ @staticmethod
+ def from_json(s) -> "Cheatcodes":
+ return Cheatcodes.from_dict(json.loads(s))
+
+ @staticmethod
+ def from_json_file(file_path: str) -> "Cheatcodes":
+ with open(file_path, "r") as f:
+ return Cheatcodes.from_dict(json.load(f))
+
+
+class Item(PyEnum):
+ ERROR: str = "error"
+ EVENT: str = "event"
+ ENUM: str = "enum"
+ STRUCT: str = "struct"
+ FUNCTION: str = "function"
+
+
+class ItemOrder:
+ _list: list[Item]
+
+ def __init__(self, list: list[Item]) -> None:
+ assert len(list) <= len(Item), "list must not contain more items than Item"
+ assert len(list) == len(set(list)), "list must not contain duplicates"
+ self._list = list
+ pass
+
+ def get_list(self) -> list[Item]:
+ return self._list
+
+ @staticmethod
+ def default() -> "ItemOrder":
+ return ItemOrder(
+ [
+ Item.ERROR,
+ Item.EVENT,
+ Item.ENUM,
+ Item.STRUCT,
+ Item.FUNCTION,
+ ]
+ )
+
+
+class CheatcodesPrinter:
+ buffer: str
+
+ prelude: bool
+ spdx_identifier: str
+ solidity_requirement: str
+ abicoder_v2: bool
+
+ block_doc_style: bool
+
+ indent_level: int
+ _indent_str: str
+
+ nl_str: str
+
+ items_order: ItemOrder
+
+ def __init__(
+ self,
+ buffer: str = "",
+ prelude: bool = True,
+ spdx_identifier: str = "UNLICENSED",
+ solidity_requirement: str = "",
+ abicoder_pragma: bool = False,
+ block_doc_style: bool = False,
+ indent_level: int = 0,
+ indent_with: int | str = 4,
+ nl_str: str = "\n",
+ items_order: ItemOrder = ItemOrder.default(),
+ ):
+ self.prelude = prelude
+ self.spdx_identifier = spdx_identifier
+ self.solidity_requirement = solidity_requirement
+ self.abicoder_v2 = abicoder_pragma
+ self.block_doc_style = block_doc_style
+ self.buffer = buffer
+ self.indent_level = indent_level
+ self.nl_str = nl_str
+
+ if isinstance(indent_with, int):
+ assert indent_with >= 0
+ self._indent_str = " " * indent_with
+ elif isinstance(indent_with, str):
+ self._indent_str = indent_with
+ else:
+ assert False, "indent_with must be int or str"
+
+ self.items_order = items_order
+
+ def finish(self) -> str:
+ ret = self.buffer.rstrip()
+ self.buffer = ""
+ return ret
+
+ def p_contract(self, contract: Cheatcodes, name: str, inherits: str = ""):
+ if self.prelude:
+ self.p_prelude(contract)
+
+ self._p_str("interface ")
+ name = name.strip()
+ if name != "":
+ self._p_str(name)
+ self._p_str(" ")
+ if inherits != "":
+ self._p_str("is ")
+ self._p_str(inherits)
+ self._p_str(" ")
+ self._p_str("{")
+ self._p_nl()
+ self._with_indent(lambda: self._p_items(contract))
+ self._p_str("}")
+ self._p_nl()
+
+ def _p_items(self, contract: Cheatcodes):
+ for item in self.items_order.get_list():
+ if item == Item.ERROR:
+ self.p_errors(contract.errors)
+ elif item == Item.EVENT:
+ self.p_events(contract.events)
+ elif item == Item.ENUM:
+ self.p_enums(contract.enums)
+ elif item == Item.STRUCT:
+ self.p_structs(contract.structs)
+ elif item == Item.FUNCTION:
+ self.p_functions(contract.cheatcodes)
+ else:
+ assert False, f"unknown item {item}"
+
+ def p_prelude(self, contract: Cheatcodes | None = None):
+ self._p_str(f"// SPDX-License-Identifier: {self.spdx_identifier}")
+ self._p_nl()
+
+ if self.solidity_requirement != "":
+ req = self.solidity_requirement
+ elif contract and len(contract.errors) > 0:
+ req = ">=0.8.4 <0.9.0"
+ else:
+ req = ">=0.6.0 <0.9.0"
+ self._p_str(f"pragma solidity {req};")
+ self._p_nl()
+
+ if self.abicoder_v2:
+ self._p_str("pragma experimental ABIEncoderV2;")
+ self._p_nl()
+
+ self._p_nl()
+
+ def p_errors(self, errors: list[Error]):
+ for error in errors:
+ self._p_line(lambda: self.p_error(error))
+
+ def p_error(self, error: Error):
+ self._p_comment(error.description, doc=True)
+ self._p_line(lambda: self._p_str(error.declaration))
+
+ def p_events(self, events: list[Event]):
+ for event in events:
+ self._p_line(lambda: self.p_event(event))
+
+ def p_event(self, event: Event):
+ self._p_comment(event.description, doc=True)
+ self._p_line(lambda: self._p_str(event.declaration))
+
+ def p_enums(self, enums: list[Enum]):
+ for enum in enums:
+ self._p_line(lambda: self.p_enum(enum))
+
+ def p_enum(self, enum: Enum):
+ self._p_comment(enum.description, doc=True)
+ self._p_line(lambda: self._p_str(f"enum {enum.name} {{"))
+ self._with_indent(lambda: self.p_enum_variants(enum.variants))
+ self._p_line(lambda: self._p_str("}"))
+
+ def p_enum_variants(self, variants: list[EnumVariant]):
+ for i, variant in enumerate(variants):
+ self._p_indent()
+ self._p_comment(variant.description)
+
+ self._p_indent()
+ self._p_str(variant.name)
+ if i < len(variants) - 1:
+ self._p_str(",")
+ self._p_nl()
+
+ def p_structs(self, structs: list[Struct]):
+ for struct in structs:
+ self._p_line(lambda: self.p_struct(struct))
+
+ def p_struct(self, struct: Struct):
+ self._p_comment(struct.description, doc=True)
+ self._p_line(lambda: self._p_str(f"struct {struct.name} {{"))
+ self._with_indent(lambda: self.p_struct_fields(struct.fields))
+ self._p_line(lambda: self._p_str("}"))
+
+ def p_struct_fields(self, fields: list[StructField]):
+ for field in fields:
+ self._p_line(lambda: self.p_struct_field(field))
+
+ def p_struct_field(self, field: StructField):
+ self._p_comment(field.description)
+ self._p_indented(lambda: self._p_str(f"{field.ty} {field.name};"))
+
+ def p_functions(self, cheatcodes: list[Cheatcode]):
+ for cheatcode in cheatcodes:
+ self._p_line(lambda: self.p_function(cheatcode.func))
+
+ def p_function(self, func: Function):
+ self._p_comment(func.description, doc=True)
+ self._p_line(lambda: self._p_str(func.declaration))
+
+ def _p_comment(self, s: str, doc: bool = False):
+ s = s.strip()
+ if s == "":
+ return
+
+ s = map(lambda line: line.lstrip(), s.split("\n"))
+ if self.block_doc_style:
+ self._p_str("/*")
+ if doc:
+ self._p_str("*")
+ self._p_nl()
+ for line in s:
+ self._p_indent()
+ self._p_str(" ")
+ if doc:
+ self._p_str("* ")
+ self._p_str(line)
+ self._p_nl()
+ self._p_indent()
+ self._p_str(" */")
+ self._p_nl()
+ else:
+ first_line = True
+ for line in s:
+ if not first_line:
+ self._p_indent()
+ first_line = False
+
+ if doc:
+ self._p_str("/// ")
+ else:
+ self._p_str("// ")
+ self._p_str(line)
+ self._p_nl()
+
+ def _with_indent(self, f: VoidFn):
+ self._inc_indent()
+ f()
+ self._dec_indent()
+
+ def _p_line(self, f: VoidFn):
+ self._p_indent()
+ f()
+ self._p_nl()
+
+ def _p_indented(self, f: VoidFn):
+ self._p_indent()
+ f()
+
+ def _p_indent(self):
+ for _ in range(self.indent_level):
+ self._p_str(self._indent_str)
+
+ def _p_nl(self):
+ self._p_str(self.nl_str)
+
+ def _p_str(self, txt: str):
+ self.buffer += txt
+
+ def _inc_indent(self):
+ self.indent_level += 1
+
+ def _dec_indent(self):
+ self.indent_level -= 1
+
+
+if __name__ == "__main__":
+ main()
diff --git a/contracts/lib/forge-std/src/Base.sol b/contracts/lib/forge-std/src/Base.sol
new file mode 100644
index 0000000..52a5082
--- /dev/null
+++ b/contracts/lib/forge-std/src/Base.sol
@@ -0,0 +1,48 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2 <0.9.0;
+
+import {StdStorage} from "./StdStorage.sol";
+import {Vm, VmSafe} from "./Vm.sol";
+
+abstract contract CommonBase {
+ /// @dev Cheat code address.
+ /// Calculated as `address(uint160(uint256(keccak256("hevm cheat code"))))`.
+ address internal constant VM_ADDRESS = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;
+
+ /// @dev console.sol and console2.sol work by executing a staticcall to this address.
+ /// Calculated as `address(uint160(uint88(bytes11("console.log"))))`.
+ address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;
+
+ /// @dev Used when deploying with create2.
+ /// Taken from https://github.com/Arachnid/deterministic-deployment-proxy.
+ address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;
+
+ /// @dev The default address for tx.origin and msg.sender.
+ /// Calculated as `address(uint160(uint256(keccak256("foundry default caller"))))`.
+ address internal constant DEFAULT_SENDER = 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38;
+
+ /// @dev The address of the first contract `CREATE`d by a running test contract.
+ /// When running tests, each test contract is `CREATE`d by `DEFAULT_SENDER` with nonce 1.
+ /// Calculated as `VM.computeCreateAddress(VM.computeCreateAddress(DEFAULT_SENDER, 1), 1)`.
+ address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;
+
+ /// @dev Deterministic deployment address of the Multicall3 contract.
+ /// Taken from https://www.multicall3.com.
+ address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;
+
+ /// @dev The order of the secp256k1 curve.
+ uint256 internal constant SECP256K1_ORDER =
+ 115792089237316195423570985008687907852837564279074904382605163141518161494337;
+
+ uint256 internal constant UINT256_MAX =
+ 115792089237316195423570985008687907853269984665640564039457584007913129639935;
+
+ Vm internal constant vm = Vm(VM_ADDRESS);
+ StdStorage internal stdstore;
+}
+
+abstract contract TestBase is CommonBase {}
+
+abstract contract ScriptBase is CommonBase {
+ VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS);
+}
diff --git a/contracts/lib/forge-std/src/Config.sol b/contracts/lib/forge-std/src/Config.sol
new file mode 100644
index 0000000..1c63c87
--- /dev/null
+++ b/contracts/lib/forge-std/src/Config.sol
@@ -0,0 +1,60 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.13;
+
+import {console} from "./console.sol";
+import {StdConfig} from "./StdConfig.sol";
+import {CommonBase} from "./Base.sol";
+
+/// @notice Boilerplate to streamline the setup of multi-chain environments.
+abstract contract Config is CommonBase {
+ // -- STORAGE (CONFIG + CHAINS + FORKS) ------------------------------------
+
+ /// @dev Contract instance holding the data from the TOML config file.
+ StdConfig internal config;
+
+ /// @dev Array of chain IDs for which forks have been created.
+ uint256[] internal chainIds;
+
+ /// @dev A mapping from a chain ID to its initialized fork ID.
+ mapping(uint256 => uint256) internal forkOf;
+
+ // -- HELPER FUNCTIONS -----------------------------------------------------
+
+ /// @notice Loads configuration from a file.
+ ///
+ /// @dev This function instantiates a `Config` contract, caching all its config variables.
+ ///
+ /// @param filePath: the path to the TOML configuration file.
+ /// @param writeToFile: whether updates are written back to the TOML file.
+ function _loadConfig(string memory filePath, bool writeToFile) internal {
+ console.log("----------");
+ console.log(string.concat("Loading config from '", filePath, "'"));
+ config = new StdConfig(filePath, writeToFile);
+ vm.makePersistent(address(config));
+ console.log("Config successfully loaded");
+ console.log("----------");
+ }
+
+ /// @notice Loads configuration from a file and creates forks for each specified chain.
+ ///
+ /// @dev This function instantiates a `Config` contract, caching all its config variables,
+ /// reads the configured chain ids, and iterates through them to create a fork for each one.
+ /// It also creates a map `forkOf[chainId] -> forkId` to easily switch between forks.
+ ///
+ /// @param filePath: the path to the TOML configuration file.
+ /// @param writeToFile: whether updates are written back to the TOML file.
+ function _loadConfigAndForks(string memory filePath, bool writeToFile) internal {
+ _loadConfig(filePath, writeToFile);
+
+ console.log("Setting up forks for the configured chains...");
+ uint256[] memory chains = config.getChainIds();
+ for (uint256 i = 0; i < chains.length; i++) {
+ uint256 chainId = chains[i];
+ uint256 forkId = vm.createFork(config.getRpcUrl(chainId));
+ forkOf[chainId] = forkId;
+ chainIds.push(chainId);
+ }
+ console.log("Forks successfully created");
+ console.log("----------");
+ }
+}
diff --git a/contracts/lib/forge-std/src/LibVariable.sol b/contracts/lib/forge-std/src/LibVariable.sol
new file mode 100644
index 0000000..c46b153
--- /dev/null
+++ b/contracts/lib/forge-std/src/LibVariable.sol
@@ -0,0 +1,477 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.13;
+
+// Enable globally.
+using LibVariable for Variable global;
+
+struct Variable {
+ Type ty;
+ bytes data;
+}
+
+struct Type {
+ TypeKind kind;
+ bool isArray;
+}
+
+enum TypeKind {
+ None,
+ Bool,
+ Address,
+ Bytes32,
+ Uint256,
+ Int256,
+ String,
+ Bytes
+}
+
+/// @notice Library for type-safe coercion of the `Variable` struct to concrete types.
+///
+/// @dev Ensures that when a `Variable` is cast to a concrete Solidity type, the operation is safe and the
+/// underlying type matches what is expected.
+/// Provides functions to check types, convert them to strings, and coerce `Variable` instances into
+/// both single values and arrays of various types.
+///
+/// Usage example:
+/// ```solidity
+/// import {LibVariable} from "./LibVariable.sol";
+///
+/// contract MyContract {
+/// using LibVariable for Variable;
+/// StdConfig config; // Assume 'config' is an instance of `StdConfig` and has already been loaded.
+///
+/// function readValues() public {
+/// // Retrieve a 'uint256' value from the config.
+/// uint256 myNumber = config.get("important_number").toUint256();
+///
+/// // Would revert with `TypeMismatch` as 'important_number' isn't a `uint256` in the config file.
+/// // string memory notANumber = config.get("important_number").toString();
+///
+/// // Retrieve a address array from the config.
+/// string[] memory admins = config.get("whitelisted_admins").toAddressArray();
+/// }
+/// }
+/// ```
+library LibVariable {
+ error NotInitialized();
+ error TypeMismatch(string expected, string actual);
+ error UnsafeCast(string message);
+
+ // -- TYPE HELPERS ----------------------------------------------------
+
+ /// @notice Compares two Type instances for equality.
+ function isEqual(Type memory self, Type memory other) internal pure returns (bool) {
+ return self.kind == other.kind && self.isArray == other.isArray;
+ }
+
+ /// @notice Compares two Type instances for equality. Reverts if they are not equal.
+ function assertEq(Type memory self, Type memory other) internal pure {
+ if (!isEqual(self, other)) {
+ revert TypeMismatch(toString(other), toString(self));
+ }
+ }
+
+ /// @notice Converts a Type struct to its full string representation (i.e. "uint256[]").
+ function toString(Type memory self) internal pure returns (string memory) {
+ string memory tyStr = toString(self.kind);
+ if (!self.isArray || self.kind == TypeKind.None) {
+ return tyStr;
+ } else {
+ return string.concat(tyStr, "[]");
+ }
+ }
+
+ /// @dev Converts a `TypeKind` enum to its base string representation.
+ function toString(TypeKind self) internal pure returns (string memory) {
+ if (self == TypeKind.Bool) return "bool";
+ if (self == TypeKind.Address) return "address";
+ if (self == TypeKind.Bytes32) return "bytes32";
+ if (self == TypeKind.Uint256) return "uint256";
+ if (self == TypeKind.Int256) return "int256";
+ if (self == TypeKind.String) return "string";
+ if (self == TypeKind.Bytes) return "bytes";
+ return "none";
+ }
+
+ /// @dev Converts a `TypeKind` enum to its base string representation.
+ function toTomlKey(TypeKind self) internal pure returns (string memory) {
+ if (self == TypeKind.Bool) return "bool";
+ if (self == TypeKind.Address) return "address";
+ if (self == TypeKind.Bytes32) return "bytes32";
+ if (self == TypeKind.Uint256) return "uint";
+ if (self == TypeKind.Int256) return "int";
+ if (self == TypeKind.String) return "string";
+ if (self == TypeKind.Bytes) return "bytes";
+ return "none";
+ }
+
+ // -- VARIABLE HELPERS ----------------------------------------------------
+
+ /// @dev Checks if a `Variable` has been initialized and matches the expected type reverting if not.
+ modifier check(Variable memory self, Type memory expected) {
+ assertExists(self);
+ assertEq(self.ty, expected);
+ _;
+ }
+
+ /// @dev Checks if a `Variable` has been initialized, reverting if not.
+ function assertExists(Variable memory self) public pure {
+ if (self.ty.kind == TypeKind.None) {
+ revert NotInitialized();
+ }
+ }
+
+ // -- VARIABLE COERCION FUNCTIONS (SINGLE VALUES) --------------------------
+
+ /// @notice Coerces a `Variable` to a `bool` value.
+ function toBool(Variable memory self) internal pure check(self, Type(TypeKind.Bool, false)) returns (bool) {
+ return abi.decode(self.data, (bool));
+ }
+
+ /// @notice Coerces a `Variable` to an `address` value.
+ function toAddress(Variable memory self)
+ internal
+ pure
+ check(self, Type(TypeKind.Address, false))
+ returns (address)
+ {
+ return abi.decode(self.data, (address));
+ }
+
+ /// @notice Coerces a `Variable` to a `bytes32` value.
+ function toBytes32(Variable memory self)
+ internal
+ pure
+ check(self, Type(TypeKind.Bytes32, false))
+ returns (bytes32)
+ {
+ return abi.decode(self.data, (bytes32));
+ }
+
+ /// @notice Coerces a `Variable` to a `uint256` value.
+ function toUint256(Variable memory self)
+ internal
+ pure
+ check(self, Type(TypeKind.Uint256, false))
+ returns (uint256)
+ {
+ return abi.decode(self.data, (uint256));
+ }
+
+ /// @notice Coerces a `Variable` to a `uint128` value, checking for overflow.
+ function toUint128(Variable memory self) internal pure returns (uint128) {
+ uint256 value = self.toUint256();
+ if (value > type(uint128).max) {
+ revert UnsafeCast("value does not fit in 'uint128'");
+ }
+ return uint128(value);
+ }
+
+ /// @notice Coerces a `Variable` to a `uint64` value, checking for overflow.
+ function toUint64(Variable memory self) internal pure returns (uint64) {
+ uint256 value = self.toUint256();
+ if (value > type(uint64).max) {
+ revert UnsafeCast("value does not fit in 'uint64'");
+ }
+ return uint64(value);
+ }
+
+ /// @notice Coerces a `Variable` to a `uint32` value, checking for overflow.
+ function toUint32(Variable memory self) internal pure returns (uint32) {
+ uint256 value = self.toUint256();
+ if (value > type(uint32).max) {
+ revert UnsafeCast("value does not fit in 'uint32'");
+ }
+ return uint32(value);
+ }
+
+ /// @notice Coerces a `Variable` to a `uint16` value, checking for overflow.
+ function toUint16(Variable memory self) internal pure returns (uint16) {
+ uint256 value = self.toUint256();
+ if (value > type(uint16).max) {
+ revert UnsafeCast("value does not fit in 'uint16'");
+ }
+ return uint16(value);
+ }
+
+ /// @notice Coerces a `Variable` to a `uint8` value, checking for overflow.
+ function toUint8(Variable memory self) internal pure returns (uint8) {
+ uint256 value = self.toUint256();
+ if (value > type(uint8).max) {
+ revert UnsafeCast("value does not fit in 'uint8'");
+ }
+ return uint8(value);
+ }
+
+ /// @notice Coerces a `Variable` to an `int256` value.
+ function toInt256(Variable memory self) internal pure check(self, Type(TypeKind.Int256, false)) returns (int256) {
+ return abi.decode(self.data, (int256));
+ }
+
+ /// @notice Coerces a `Variable` to an `int128` value, checking for overflow/underflow.
+ function toInt128(Variable memory self) internal pure returns (int128) {
+ int256 value = self.toInt256();
+ if (value > type(int128).max || value < type(int128).min) {
+ revert UnsafeCast("value does not fit in 'int128'");
+ }
+ return int128(value);
+ }
+
+ /// @notice Coerces a `Variable` to an `int64` value, checking for overflow/underflow.
+ function toInt64(Variable memory self) internal pure returns (int64) {
+ int256 value = self.toInt256();
+ if (value > type(int64).max || value < type(int64).min) {
+ revert UnsafeCast("value does not fit in 'int64'");
+ }
+ return int64(value);
+ }
+
+ /// @notice Coerces a `Variable` to an `int32` value, checking for overflow/underflow.
+ function toInt32(Variable memory self) internal pure returns (int32) {
+ int256 value = self.toInt256();
+ if (value > type(int32).max || value < type(int32).min) {
+ revert UnsafeCast("value does not fit in 'int32'");
+ }
+ return int32(value);
+ }
+
+ /// @notice Coerces a `Variable` to an `int16` value, checking for overflow/underflow.
+ function toInt16(Variable memory self) internal pure returns (int16) {
+ int256 value = self.toInt256();
+ if (value > type(int16).max || value < type(int16).min) {
+ revert UnsafeCast("value does not fit in 'int16'");
+ }
+ return int16(value);
+ }
+
+ /// @notice Coerces a `Variable` to an `int8` value, checking for overflow/underflow.
+ function toInt8(Variable memory self) internal pure returns (int8) {
+ int256 value = self.toInt256();
+ if (value > type(int8).max || value < type(int8).min) {
+ revert UnsafeCast("value does not fit in 'int8'");
+ }
+ return int8(value);
+ }
+
+ /// @notice Coerces a `Variable` to a `string` value.
+ function toString(Variable memory self)
+ internal
+ pure
+ check(self, Type(TypeKind.String, false))
+ returns (string memory)
+ {
+ return abi.decode(self.data, (string));
+ }
+
+ /// @notice Coerces a `Variable` to a `bytes` value.
+ function toBytes(Variable memory self)
+ internal
+ pure
+ check(self, Type(TypeKind.Bytes, false))
+ returns (bytes memory)
+ {
+ return abi.decode(self.data, (bytes));
+ }
+
+ // -- VARIABLE COERCION FUNCTIONS (ARRAYS) ---------------------------------
+
+ /// @notice Coerces a `Variable` to a `bool` array.
+ function toBoolArray(Variable memory self)
+ internal
+ pure
+ check(self, Type(TypeKind.Bool, true))
+ returns (bool[] memory)
+ {
+ return abi.decode(self.data, (bool[]));
+ }
+
+ /// @notice Coerces a `Variable` to an `address` array.
+ function toAddressArray(Variable memory self)
+ internal
+ pure
+ check(self, Type(TypeKind.Address, true))
+ returns (address[] memory)
+ {
+ return abi.decode(self.data, (address[]));
+ }
+
+ /// @notice Coerces a `Variable` to a `bytes32` array.
+ function toBytes32Array(Variable memory self)
+ internal
+ pure
+ check(self, Type(TypeKind.Bytes32, true))
+ returns (bytes32[] memory)
+ {
+ return abi.decode(self.data, (bytes32[]));
+ }
+
+ /// @notice Coerces a `Variable` to a `uint256` array.
+ function toUint256Array(Variable memory self)
+ internal
+ pure
+ check(self, Type(TypeKind.Uint256, true))
+ returns (uint256[] memory)
+ {
+ return abi.decode(self.data, (uint256[]));
+ }
+
+ /// @notice Coerces a `Variable` to a `uint128` array, checking for overflow.
+ function toUint128Array(Variable memory self) internal pure returns (uint128[] memory) {
+ uint256[] memory values = self.toUint256Array();
+ uint128[] memory result = new uint128[](values.length);
+ for (uint256 i = 0; i < values.length; i++) {
+ if (values[i] > type(uint128).max) {
+ revert UnsafeCast("value in array does not fit in 'uint128'");
+ }
+ result[i] = uint128(values[i]);
+ }
+ return result;
+ }
+
+ /// @notice Coerces a `Variable` to a `uint64` array, checking for overflow.
+ function toUint64Array(Variable memory self) internal pure returns (uint64[] memory) {
+ uint256[] memory values = self.toUint256Array();
+ uint64[] memory result = new uint64[](values.length);
+ for (uint256 i = 0; i < values.length; i++) {
+ if (values[i] > type(uint64).max) {
+ revert UnsafeCast("value in array does not fit in 'uint64'");
+ }
+ result[i] = uint64(values[i]);
+ }
+ return result;
+ }
+
+ /// @notice Coerces a `Variable` to a `uint32` array, checking for overflow.
+ function toUint32Array(Variable memory self) internal pure returns (uint32[] memory) {
+ uint256[] memory values = self.toUint256Array();
+ uint32[] memory result = new uint32[](values.length);
+ for (uint256 i = 0; i < values.length; i++) {
+ if (values[i] > type(uint32).max) {
+ revert UnsafeCast("value in array does not fit in 'uint32'");
+ }
+ result[i] = uint32(values[i]);
+ }
+ return result;
+ }
+
+ /// @notice Coerces a `Variable` to a `uint16` array, checking for overflow.
+ function toUint16Array(Variable memory self) internal pure returns (uint16[] memory) {
+ uint256[] memory values = self.toUint256Array();
+ uint16[] memory result = new uint16[](values.length);
+ for (uint256 i = 0; i < values.length; i++) {
+ if (values[i] > type(uint16).max) {
+ revert UnsafeCast("value in array does not fit in 'uint16'");
+ }
+ result[i] = uint16(values[i]);
+ }
+ return result;
+ }
+
+ /// @notice Coerces a `Variable` to a `uint8` array, checking for overflow.
+ function toUint8Array(Variable memory self) internal pure returns (uint8[] memory) {
+ uint256[] memory values = self.toUint256Array();
+ uint8[] memory result = new uint8[](values.length);
+ for (uint256 i = 0; i < values.length; i++) {
+ if (values[i] > type(uint8).max) {
+ revert UnsafeCast("value in array does not fit in 'uint8'");
+ }
+ result[i] = uint8(values[i]);
+ }
+ return result;
+ }
+
+ /// @notice Coerces a `Variable` to an `int256` array.
+ function toInt256Array(Variable memory self)
+ internal
+ pure
+ check(self, Type(TypeKind.Int256, true))
+ returns (int256[] memory)
+ {
+ return abi.decode(self.data, (int256[]));
+ }
+
+ /// @notice Coerces a `Variable` to a `int128` array, checking for overflow/underflow.
+ function toInt128Array(Variable memory self) internal pure returns (int128[] memory) {
+ int256[] memory values = self.toInt256Array();
+ int128[] memory result = new int128[](values.length);
+ for (uint256 i = 0; i < values.length; i++) {
+ if (values[i] > type(int128).max || values[i] < type(int128).min) {
+ revert UnsafeCast("value in array does not fit in 'int128'");
+ }
+ result[i] = int128(values[i]);
+ }
+ return result;
+ }
+
+ /// @notice Coerces a `Variable` to a `int64` array, checking for overflow/underflow.
+ function toInt64Array(Variable memory self) internal pure returns (int64[] memory) {
+ int256[] memory values = self.toInt256Array();
+ int64[] memory result = new int64[](values.length);
+ for (uint256 i = 0; i < values.length; i++) {
+ if (values[i] > type(int64).max || values[i] < type(int64).min) {
+ revert UnsafeCast("value in array does not fit in 'int64'");
+ }
+ result[i] = int64(values[i]);
+ }
+ return result;
+ }
+
+ /// @notice Coerces a `Variable` to a `int32` array, checking for overflow/underflow.
+ function toInt32Array(Variable memory self) internal pure returns (int32[] memory) {
+ int256[] memory values = self.toInt256Array();
+ int32[] memory result = new int32[](values.length);
+ for (uint256 i = 0; i < values.length; i++) {
+ if (values[i] > type(int32).max || values[i] < type(int32).min) {
+ revert UnsafeCast("value in array does not fit in 'int32'");
+ }
+ result[i] = int32(values[i]);
+ }
+ return result;
+ }
+
+ /// @notice Coerces a `Variable` to a `int16` array, checking for overflow/underflow.
+ function toInt16Array(Variable memory self) internal pure returns (int16[] memory) {
+ int256[] memory values = self.toInt256Array();
+ int16[] memory result = new int16[](values.length);
+ for (uint256 i = 0; i < values.length; i++) {
+ if (values[i] > type(int16).max || values[i] < type(int16).min) {
+ revert UnsafeCast("value in array does not fit in 'int16'");
+ }
+ result[i] = int16(values[i]);
+ }
+ return result;
+ }
+
+ /// @notice Coerces a `Variable` to a `int8` array, checking for overflow/underflow.
+ function toInt8Array(Variable memory self) internal pure returns (int8[] memory) {
+ int256[] memory values = self.toInt256Array();
+ int8[] memory result = new int8[](values.length);
+ for (uint256 i = 0; i < values.length; i++) {
+ if (values[i] > type(int8).max || values[i] < type(int8).min) {
+ revert UnsafeCast("value in array does not fit in 'int8'");
+ }
+ result[i] = int8(values[i]);
+ }
+ return result;
+ }
+
+ /// @notice Coerces a `Variable` to a `string` array.
+ function toStringArray(Variable memory self)
+ internal
+ pure
+ check(self, Type(TypeKind.String, true))
+ returns (string[] memory)
+ {
+ return abi.decode(self.data, (string[]));
+ }
+
+ /// @notice Coerces a `Variable` to a `bytes` array.
+ function toBytesArray(Variable memory self)
+ internal
+ pure
+ check(self, Type(TypeKind.Bytes, true))
+ returns (bytes[] memory)
+ {
+ return abi.decode(self.data, (bytes[]));
+ }
+}
diff --git a/contracts/lib/forge-std/src/Script.sol b/contracts/lib/forge-std/src/Script.sol
new file mode 100644
index 0000000..a2e2aa1
--- /dev/null
+++ b/contracts/lib/forge-std/src/Script.sol
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2 <0.9.0;
+
+// 💬 ABOUT
+// Forge Std's default Script.
+
+// 🧩 MODULES
+import {console} from "./console.sol";
+import {console2} from "./console2.sol";
+import {safeconsole} from "./safeconsole.sol";
+import {StdChains} from "./StdChains.sol";
+import {StdCheatsSafe} from "./StdCheats.sol";
+import {StdConstants} from "./StdConstants.sol";
+import {stdJson} from "./StdJson.sol";
+import {stdMath} from "./StdMath.sol";
+import {StdStorage, stdStorageSafe} from "./StdStorage.sol";
+import {StdStyle} from "./StdStyle.sol";
+import {StdUtils} from "./StdUtils.sol";
+import {VmSafe} from "./Vm.sol";
+
+// 📦 BOILERPLATE
+import {ScriptBase} from "./Base.sol";
+
+// ⭐️ SCRIPT
+abstract contract Script is ScriptBase, StdChains, StdCheatsSafe, StdUtils {
+ // Note: IS_SCRIPT() must return true.
+ bool public IS_SCRIPT = true;
+}
diff --git a/contracts/lib/forge-std/src/StdAssertions.sol b/contracts/lib/forge-std/src/StdAssertions.sol
new file mode 100644
index 0000000..45418f2
--- /dev/null
+++ b/contracts/lib/forge-std/src/StdAssertions.sol
@@ -0,0 +1,780 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2 <0.9.0;
+pragma experimental ABIEncoderV2;
+
+import {Vm} from "./Vm.sol";
+
+abstract contract StdAssertions {
+ Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code")))));
+
+ event log(string);
+ event logs(bytes);
+
+ event log_address(address);
+ event log_bytes32(bytes32);
+ event log_int(int256);
+ event log_uint(uint256);
+ event log_bytes(bytes);
+ event log_string(string);
+
+ event log_named_address(string key, address val);
+ event log_named_bytes32(string key, bytes32 val);
+ event log_named_decimal_int(string key, int256 val, uint256 decimals);
+ event log_named_decimal_uint(string key, uint256 val, uint256 decimals);
+ event log_named_int(string key, int256 val);
+ event log_named_uint(string key, uint256 val);
+ event log_named_bytes(string key, bytes val);
+ event log_named_string(string key, string val);
+
+ event log_array(uint256[] val);
+ event log_array(int256[] val);
+ event log_array(address[] val);
+ event log_named_array(string key, uint256[] val);
+ event log_named_array(string key, int256[] val);
+ event log_named_array(string key, address[] val);
+
+ bytes32 private constant FAILED_SLOT = bytes32("failed");
+
+ bool private _failed;
+
+ function failed() public view returns (bool) {
+ if (_failed) {
+ return true;
+ } else {
+ return vm.load(address(vm), FAILED_SLOT) != bytes32(0);
+ }
+ }
+
+ function fail() internal virtual {
+ vm.store(address(vm), FAILED_SLOT, bytes32(uint256(1)));
+ _failed = true;
+ }
+
+ function fail(string memory message) internal virtual {
+ fail();
+ vm.assertTrue(false, message);
+ }
+
+ function assertTrue(bool data) internal pure virtual {
+ if (!data) {
+ vm.assertTrue(data);
+ }
+ }
+
+ function assertTrue(bool data, string memory err) internal pure virtual {
+ if (!data) {
+ vm.assertTrue(data, err);
+ }
+ }
+
+ function assertFalse(bool data) internal pure virtual {
+ if (data) {
+ vm.assertFalse(data);
+ }
+ }
+
+ function assertFalse(bool data, string memory err) internal pure virtual {
+ if (data) {
+ vm.assertFalse(data, err);
+ }
+ }
+
+ function assertEq(bool left, bool right) internal pure virtual {
+ if (left != right) {
+ vm.assertEq(left, right);
+ }
+ }
+
+ function assertEq(bool left, bool right, string memory err) internal pure virtual {
+ if (left != right) {
+ vm.assertEq(left, right, err);
+ }
+ }
+
+ function assertEq(uint256 left, uint256 right) internal pure virtual {
+ if (left != right) {
+ vm.assertEq(left, right);
+ }
+ }
+
+ function assertEq(uint256 left, uint256 right, string memory err) internal pure virtual {
+ if (left != right) {
+ vm.assertEq(left, right, err);
+ }
+ }
+
+ function assertEqDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual {
+ vm.assertEqDecimal(left, right, decimals);
+ }
+
+ function assertEqDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual {
+ vm.assertEqDecimal(left, right, decimals, err);
+ }
+
+ function assertEq(int256 left, int256 right) internal pure virtual {
+ if (left != right) {
+ vm.assertEq(left, right);
+ }
+ }
+
+ function assertEq(int256 left, int256 right, string memory err) internal pure virtual {
+ if (left != right) {
+ vm.assertEq(left, right, err);
+ }
+ }
+
+ function assertEqDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual {
+ vm.assertEqDecimal(left, right, decimals);
+ }
+
+ function assertEqDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual {
+ vm.assertEqDecimal(left, right, decimals, err);
+ }
+
+ function assertEq(address left, address right) internal pure virtual {
+ if (left != right) {
+ vm.assertEq(left, right);
+ }
+ }
+
+ function assertEq(address left, address right, string memory err) internal pure virtual {
+ if (left != right) {
+ vm.assertEq(left, right, err);
+ }
+ }
+
+ function assertEq(bytes32 left, bytes32 right) internal pure virtual {
+ if (left != right) {
+ vm.assertEq(left, right);
+ }
+ }
+
+ function assertEq(bytes32 left, bytes32 right, string memory err) internal pure virtual {
+ if (left != right) {
+ vm.assertEq(left, right, err);
+ }
+ }
+
+ function assertEq32(bytes32 left, bytes32 right) internal pure virtual {
+ if (left != right) {
+ vm.assertEq(left, right);
+ }
+ }
+
+ function assertEq32(bytes32 left, bytes32 right, string memory err) internal pure virtual {
+ if (left != right) {
+ vm.assertEq(left, right, err);
+ }
+ }
+
+ function assertEq(string memory left, string memory right) internal pure virtual {
+ vm.assertEq(left, right);
+ }
+
+ function assertEq(string memory left, string memory right, string memory err) internal pure virtual {
+ vm.assertEq(left, right, err);
+ }
+
+ function assertEq(bytes memory left, bytes memory right) internal pure virtual {
+ vm.assertEq(left, right);
+ }
+
+ function assertEq(bytes memory left, bytes memory right, string memory err) internal pure virtual {
+ vm.assertEq(left, right, err);
+ }
+
+ function assertEq(bool[] memory left, bool[] memory right) internal pure virtual {
+ vm.assertEq(left, right);
+ }
+
+ function assertEq(bool[] memory left, bool[] memory right, string memory err) internal pure virtual {
+ vm.assertEq(left, right, err);
+ }
+
+ function assertEq(uint256[] memory left, uint256[] memory right) internal pure virtual {
+ vm.assertEq(left, right);
+ }
+
+ function assertEq(uint256[] memory left, uint256[] memory right, string memory err) internal pure virtual {
+ vm.assertEq(left, right, err);
+ }
+
+ function assertEq(int256[] memory left, int256[] memory right) internal pure virtual {
+ vm.assertEq(left, right);
+ }
+
+ function assertEq(int256[] memory left, int256[] memory right, string memory err) internal pure virtual {
+ vm.assertEq(left, right, err);
+ }
+
+ function assertEq(address[] memory left, address[] memory right) internal pure virtual {
+ vm.assertEq(left, right);
+ }
+
+ function assertEq(address[] memory left, address[] memory right, string memory err) internal pure virtual {
+ vm.assertEq(left, right, err);
+ }
+
+ function assertEq(bytes32[] memory left, bytes32[] memory right) internal pure virtual {
+ vm.assertEq(left, right);
+ }
+
+ function assertEq(bytes32[] memory left, bytes32[] memory right, string memory err) internal pure virtual {
+ vm.assertEq(left, right, err);
+ }
+
+ function assertEq(string[] memory left, string[] memory right) internal pure virtual {
+ vm.assertEq(left, right);
+ }
+
+ function assertEq(string[] memory left, string[] memory right, string memory err) internal pure virtual {
+ vm.assertEq(left, right, err);
+ }
+
+ function assertEq(bytes[] memory left, bytes[] memory right) internal pure virtual {
+ vm.assertEq(left, right);
+ }
+
+ function assertEq(bytes[] memory left, bytes[] memory right, string memory err) internal pure virtual {
+ vm.assertEq(left, right, err);
+ }
+
+ // Legacy helper
+ function assertEqUint(uint256 left, uint256 right) internal pure virtual {
+ assertEq(left, right);
+ }
+
+ function assertNotEq(bool left, bool right) internal pure virtual {
+ if (left == right) {
+ vm.assertNotEq(left, right);
+ }
+ }
+
+ function assertNotEq(bool left, bool right, string memory err) internal pure virtual {
+ if (left == right) {
+ vm.assertNotEq(left, right, err);
+ }
+ }
+
+ function assertNotEq(uint256 left, uint256 right) internal pure virtual {
+ if (left == right) {
+ vm.assertNotEq(left, right);
+ }
+ }
+
+ function assertNotEq(uint256 left, uint256 right, string memory err) internal pure virtual {
+ if (left == right) {
+ vm.assertNotEq(left, right, err);
+ }
+ }
+
+ function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual {
+ vm.assertNotEqDecimal(left, right, decimals);
+ }
+
+ function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals, string memory err)
+ internal
+ pure
+ virtual
+ {
+ vm.assertNotEqDecimal(left, right, decimals, err);
+ }
+
+ function assertNotEq(int256 left, int256 right) internal pure virtual {
+ if (left == right) {
+ vm.assertNotEq(left, right);
+ }
+ }
+
+ function assertNotEq(int256 left, int256 right, string memory err) internal pure virtual {
+ if (left == right) {
+ vm.assertNotEq(left, right, err);
+ }
+ }
+
+ function assertNotEqDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual {
+ vm.assertNotEqDecimal(left, right, decimals);
+ }
+
+ function assertNotEqDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual {
+ vm.assertNotEqDecimal(left, right, decimals, err);
+ }
+
+ function assertNotEq(address left, address right) internal pure virtual {
+ if (left == right) {
+ vm.assertNotEq(left, right);
+ }
+ }
+
+ function assertNotEq(address left, address right, string memory err) internal pure virtual {
+ if (left == right) {
+ vm.assertNotEq(left, right, err);
+ }
+ }
+
+ function assertNotEq(bytes32 left, bytes32 right) internal pure virtual {
+ if (left == right) {
+ vm.assertNotEq(left, right);
+ }
+ }
+
+ function assertNotEq(bytes32 left, bytes32 right, string memory err) internal pure virtual {
+ if (left == right) {
+ vm.assertNotEq(left, right, err);
+ }
+ }
+
+ function assertNotEq32(bytes32 left, bytes32 right) internal pure virtual {
+ if (left == right) {
+ vm.assertNotEq(left, right);
+ }
+ }
+
+ function assertNotEq32(bytes32 left, bytes32 right, string memory err) internal pure virtual {
+ if (left == right) {
+ vm.assertNotEq(left, right, err);
+ }
+ }
+
+ function assertNotEq(string memory left, string memory right) internal pure virtual {
+ vm.assertNotEq(left, right);
+ }
+
+ function assertNotEq(string memory left, string memory right, string memory err) internal pure virtual {
+ vm.assertNotEq(left, right, err);
+ }
+
+ function assertNotEq(bytes memory left, bytes memory right) internal pure virtual {
+ vm.assertNotEq(left, right);
+ }
+
+ function assertNotEq(bytes memory left, bytes memory right, string memory err) internal pure virtual {
+ vm.assertNotEq(left, right, err);
+ }
+
+ function assertNotEq(bool[] memory left, bool[] memory right) internal pure virtual {
+ vm.assertNotEq(left, right);
+ }
+
+ function assertNotEq(bool[] memory left, bool[] memory right, string memory err) internal pure virtual {
+ vm.assertNotEq(left, right, err);
+ }
+
+ function assertNotEq(uint256[] memory left, uint256[] memory right) internal pure virtual {
+ vm.assertNotEq(left, right);
+ }
+
+ function assertNotEq(uint256[] memory left, uint256[] memory right, string memory err) internal pure virtual {
+ vm.assertNotEq(left, right, err);
+ }
+
+ function assertNotEq(int256[] memory left, int256[] memory right) internal pure virtual {
+ vm.assertNotEq(left, right);
+ }
+
+ function assertNotEq(int256[] memory left, int256[] memory right, string memory err) internal pure virtual {
+ vm.assertNotEq(left, right, err);
+ }
+
+ function assertNotEq(address[] memory left, address[] memory right) internal pure virtual {
+ vm.assertNotEq(left, right);
+ }
+
+ function assertNotEq(address[] memory left, address[] memory right, string memory err) internal pure virtual {
+ vm.assertNotEq(left, right, err);
+ }
+
+ function assertNotEq(bytes32[] memory left, bytes32[] memory right) internal pure virtual {
+ vm.assertNotEq(left, right);
+ }
+
+ function assertNotEq(bytes32[] memory left, bytes32[] memory right, string memory err) internal pure virtual {
+ vm.assertNotEq(left, right, err);
+ }
+
+ function assertNotEq(string[] memory left, string[] memory right) internal pure virtual {
+ vm.assertNotEq(left, right);
+ }
+
+ function assertNotEq(string[] memory left, string[] memory right, string memory err) internal pure virtual {
+ vm.assertNotEq(left, right, err);
+ }
+
+ function assertNotEq(bytes[] memory left, bytes[] memory right) internal pure virtual {
+ vm.assertNotEq(left, right);
+ }
+
+ function assertNotEq(bytes[] memory left, bytes[] memory right, string memory err) internal pure virtual {
+ vm.assertNotEq(left, right, err);
+ }
+
+ function assertLt(uint256 left, uint256 right) internal pure virtual {
+ if (left >= right) {
+ vm.assertLt(left, right);
+ }
+ }
+
+ function assertLt(uint256 left, uint256 right, string memory err) internal pure virtual {
+ if (left >= right) {
+ vm.assertLt(left, right, err);
+ }
+ }
+
+ function assertLtDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual {
+ vm.assertLtDecimal(left, right, decimals);
+ }
+
+ function assertLtDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual {
+ vm.assertLtDecimal(left, right, decimals, err);
+ }
+
+ function assertLt(int256 left, int256 right) internal pure virtual {
+ if (left >= right) {
+ vm.assertLt(left, right);
+ }
+ }
+
+ function assertLt(int256 left, int256 right, string memory err) internal pure virtual {
+ if (left >= right) {
+ vm.assertLt(left, right, err);
+ }
+ }
+
+ function assertLtDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual {
+ vm.assertLtDecimal(left, right, decimals);
+ }
+
+ function assertLtDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual {
+ vm.assertLtDecimal(left, right, decimals, err);
+ }
+
+ function assertGt(uint256 left, uint256 right) internal pure virtual {
+ if (left <= right) {
+ vm.assertGt(left, right);
+ }
+ }
+
+ function assertGt(uint256 left, uint256 right, string memory err) internal pure virtual {
+ if (left <= right) {
+ vm.assertGt(left, right, err);
+ }
+ }
+
+ function assertGtDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual {
+ vm.assertGtDecimal(left, right, decimals);
+ }
+
+ function assertGtDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual {
+ vm.assertGtDecimal(left, right, decimals, err);
+ }
+
+ function assertGt(int256 left, int256 right) internal pure virtual {
+ if (left <= right) {
+ vm.assertGt(left, right);
+ }
+ }
+
+ function assertGt(int256 left, int256 right, string memory err) internal pure virtual {
+ if (left <= right) {
+ vm.assertGt(left, right, err);
+ }
+ }
+
+ function assertGtDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual {
+ vm.assertGtDecimal(left, right, decimals);
+ }
+
+ function assertGtDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual {
+ vm.assertGtDecimal(left, right, decimals, err);
+ }
+
+ function assertLe(uint256 left, uint256 right) internal pure virtual {
+ if (left > right) {
+ vm.assertLe(left, right);
+ }
+ }
+
+ function assertLe(uint256 left, uint256 right, string memory err) internal pure virtual {
+ if (left > right) {
+ vm.assertLe(left, right, err);
+ }
+ }
+
+ function assertLeDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual {
+ vm.assertLeDecimal(left, right, decimals);
+ }
+
+ function assertLeDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual {
+ vm.assertLeDecimal(left, right, decimals, err);
+ }
+
+ function assertLe(int256 left, int256 right) internal pure virtual {
+ if (left > right) {
+ vm.assertLe(left, right);
+ }
+ }
+
+ function assertLe(int256 left, int256 right, string memory err) internal pure virtual {
+ if (left > right) {
+ vm.assertLe(left, right, err);
+ }
+ }
+
+ function assertLeDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual {
+ vm.assertLeDecimal(left, right, decimals);
+ }
+
+ function assertLeDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual {
+ vm.assertLeDecimal(left, right, decimals, err);
+ }
+
+ function assertGe(uint256 left, uint256 right) internal pure virtual {
+ if (left < right) {
+ vm.assertGe(left, right);
+ }
+ }
+
+ function assertGe(uint256 left, uint256 right, string memory err) internal pure virtual {
+ if (left < right) {
+ vm.assertGe(left, right, err);
+ }
+ }
+
+ function assertGeDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual {
+ vm.assertGeDecimal(left, right, decimals);
+ }
+
+ function assertGeDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual {
+ vm.assertGeDecimal(left, right, decimals, err);
+ }
+
+ function assertGe(int256 left, int256 right) internal pure virtual {
+ if (left < right) {
+ vm.assertGe(left, right);
+ }
+ }
+
+ function assertGe(int256 left, int256 right, string memory err) internal pure virtual {
+ if (left < right) {
+ vm.assertGe(left, right, err);
+ }
+ }
+
+ function assertGeDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual {
+ vm.assertGeDecimal(left, right, decimals);
+ }
+
+ function assertGeDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual {
+ vm.assertGeDecimal(left, right, decimals, err);
+ }
+
+ function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta) internal pure virtual {
+ vm.assertApproxEqAbs(left, right, maxDelta);
+ }
+
+ function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta, string memory err) internal pure virtual {
+ vm.assertApproxEqAbs(left, right, maxDelta, err);
+ }
+
+ function assertApproxEqAbsDecimal(uint256 left, uint256 right, uint256 maxDelta, uint256 decimals)
+ internal
+ pure
+ virtual
+ {
+ vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals);
+ }
+
+ function assertApproxEqAbsDecimal(
+ uint256 left,
+ uint256 right,
+ uint256 maxDelta,
+ uint256 decimals,
+ string memory err
+ ) internal pure virtual {
+ vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals, err);
+ }
+
+ function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta) internal pure virtual {
+ vm.assertApproxEqAbs(left, right, maxDelta);
+ }
+
+ function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta, string memory err) internal pure virtual {
+ vm.assertApproxEqAbs(left, right, maxDelta, err);
+ }
+
+ function assertApproxEqAbsDecimal(int256 left, int256 right, uint256 maxDelta, uint256 decimals)
+ internal
+ pure
+ virtual
+ {
+ vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals);
+ }
+
+ function assertApproxEqAbsDecimal(int256 left, int256 right, uint256 maxDelta, uint256 decimals, string memory err)
+ internal
+ pure
+ virtual
+ {
+ vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals, err);
+ }
+
+ function assertApproxEqRel(
+ uint256 left,
+ uint256 right,
+ uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100%
+ )
+ internal
+ pure
+ virtual
+ {
+ vm.assertApproxEqRel(left, right, maxPercentDelta);
+ }
+
+ function assertApproxEqRel(
+ uint256 left,
+ uint256 right,
+ uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%
+ string memory err
+ )
+ internal
+ pure
+ virtual
+ {
+ vm.assertApproxEqRel(left, right, maxPercentDelta, err);
+ }
+
+ function assertApproxEqRelDecimal(
+ uint256 left,
+ uint256 right,
+ uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%
+ uint256 decimals
+ )
+ internal
+ pure
+ virtual
+ {
+ vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals);
+ }
+
+ function assertApproxEqRelDecimal(
+ uint256 left,
+ uint256 right,
+ uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%
+ uint256 decimals,
+ string memory err
+ ) internal pure virtual {
+ vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals, err);
+ }
+
+ function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta) internal pure virtual {
+ vm.assertApproxEqRel(left, right, maxPercentDelta);
+ }
+
+ function assertApproxEqRel(
+ int256 left,
+ int256 right,
+ uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%
+ string memory err
+ )
+ internal
+ pure
+ virtual
+ {
+ vm.assertApproxEqRel(left, right, maxPercentDelta, err);
+ }
+
+ function assertApproxEqRelDecimal(
+ int256 left,
+ int256 right,
+ uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%
+ uint256 decimals
+ )
+ internal
+ pure
+ virtual
+ {
+ vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals);
+ }
+
+ function assertApproxEqRelDecimal(
+ int256 left,
+ int256 right,
+ uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100%
+ uint256 decimals,
+ string memory err
+ ) internal pure virtual {
+ vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals, err);
+ }
+
+ // Inherited from DSTest, not used but kept for backwards-compatibility
+ function checkEq0(bytes memory left, bytes memory right) internal pure returns (bool) {
+ return keccak256(left) == keccak256(right);
+ }
+
+ function assertEq0(bytes memory left, bytes memory right) internal pure virtual {
+ assertEq(left, right);
+ }
+
+ function assertEq0(bytes memory left, bytes memory right, string memory err) internal pure virtual {
+ assertEq(left, right, err);
+ }
+
+ function assertNotEq0(bytes memory left, bytes memory right) internal pure virtual {
+ assertNotEq(left, right);
+ }
+
+ function assertNotEq0(bytes memory left, bytes memory right, string memory err) internal pure virtual {
+ assertNotEq(left, right, err);
+ }
+
+ function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual {
+ assertEqCall(target, callDataA, target, callDataB, true);
+ }
+
+ function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB)
+ internal
+ virtual
+ {
+ assertEqCall(targetA, callDataA, targetB, callDataB, true);
+ }
+
+ function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData)
+ internal
+ virtual
+ {
+ assertEqCall(target, callDataA, target, callDataB, strictRevertData);
+ }
+
+ function assertEqCall(
+ address targetA,
+ bytes memory callDataA,
+ address targetB,
+ bytes memory callDataB,
+ bool strictRevertData
+ ) internal virtual {
+ (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA);
+ (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB);
+
+ if (successA && successB) {
+ assertEq(returnDataA, returnDataB, "Call return data does not match");
+ }
+
+ if (!successA && !successB && strictRevertData) {
+ assertEq(returnDataA, returnDataB, "Call revert data does not match");
+ }
+
+ if (!successA && successB) {
+ emit log("Error: Calls were not equal");
+ emit log_named_bytes(" Left call revert data", returnDataA);
+ emit log_named_bytes(" Right call return data", returnDataB);
+ revert("assertion failed");
+ }
+
+ if (successA && !successB) {
+ emit log("Error: Calls were not equal");
+ emit log_named_bytes(" Left call return data", returnDataA);
+ emit log_named_bytes(" Right call revert data", returnDataB);
+ revert("assertion failed");
+ }
+ }
+}
diff --git a/contracts/lib/forge-std/src/StdChains.sol b/contracts/lib/forge-std/src/StdChains.sol
new file mode 100644
index 0000000..2061ba3
--- /dev/null
+++ b/contracts/lib/forge-std/src/StdChains.sol
@@ -0,0 +1,297 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2 <0.9.0;
+pragma experimental ABIEncoderV2;
+
+import {VmSafe} from "./Vm.sol";
+
+/**
+ * StdChains provides information about EVM compatible chains that can be used in scripts/tests.
+ * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are
+ * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of
+ * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the
+ * alias used in this contract, which can be found as the first argument to the
+ * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function.
+ *
+ * There are two main ways to use this contract:
+ * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or
+ * `setChain(string memory chainAlias, Chain memory chain)`
+ * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`.
+ *
+ * The first time either of those are used, chains are initialized with the default set of RPC URLs.
+ * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in
+ * `defaultRpcUrls`.
+ *
+ * The `setChain` function is straightforward, and it simply saves off the given chain data.
+ *
+ * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say
+ * we want to retrieve the RPC URL for `mainnet`:
+ * - If you have specified data with `setChain`, it will return that.
+ * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it
+ * is valid (e.g. a URL is specified, or an environment variable is given and exists).
+ * - If neither of the above conditions is met, the default data is returned.
+ *
+ * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.
+ */
+abstract contract StdChains {
+ VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code")))));
+
+ bool private stdChainsInitialized;
+
+ struct ChainData {
+ string name;
+ uint256 chainId;
+ string rpcUrl;
+ }
+
+ struct Chain {
+ // The chain name.
+ string name;
+ // The chain's Chain ID.
+ uint256 chainId;
+ // The chain's alias. (i.e. what gets specified in `foundry.toml`).
+ string chainAlias;
+ // A default RPC endpoint for this chain.
+ // NOTE: This default RPC URL is included for convenience to facilitate quick tests and
+ // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy
+ // usage as you will be throttled and this is a disservice to others who need this endpoint.
+ string rpcUrl;
+ }
+
+ // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data.
+ mapping(string => Chain) private chains;
+ // Maps from the chain's alias to it's default RPC URL.
+ mapping(string => string) private defaultRpcUrls;
+ // Maps from a chain ID to it's alias.
+ mapping(uint256 => string) private idToAlias;
+
+ bool private fallbackToDefaultRpcUrls = true;
+
+ // The RPC URL will be fetched from config or defaultRpcUrls if possible.
+ function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) {
+ require(bytes(chainAlias).length != 0, "StdChains getChain(string): Chain alias cannot be the empty string.");
+
+ initializeStdChains();
+ chain = chains[chainAlias];
+ require(
+ chain.chainId != 0,
+ string(abi.encodePacked("StdChains getChain(string): Chain with alias \"", chainAlias, "\" not found."))
+ );
+
+ chain = getChainWithUpdatedRpcUrl(chainAlias, chain);
+ }
+
+ function getChain(uint256 chainId) internal virtual returns (Chain memory chain) {
+ require(chainId != 0, "StdChains getChain(uint256): Chain ID cannot be 0.");
+ initializeStdChains();
+ string memory chainAlias = idToAlias[chainId];
+
+ chain = chains[chainAlias];
+
+ require(
+ chain.chainId != 0,
+ string(abi.encodePacked("StdChains getChain(uint256): Chain with ID ", vm.toString(chainId), " not found."))
+ );
+
+ chain = getChainWithUpdatedRpcUrl(chainAlias, chain);
+ }
+
+ // set chain info, with priority to argument's rpcUrl field.
+ function setChain(string memory chainAlias, ChainData memory chain) internal virtual {
+ require(
+ bytes(chainAlias).length != 0,
+ "StdChains setChain(string,ChainData): Chain alias cannot be the empty string."
+ );
+
+ require(chain.chainId != 0, "StdChains setChain(string,ChainData): Chain ID cannot be 0.");
+
+ initializeStdChains();
+ string memory foundAlias = idToAlias[chain.chainId];
+
+ require(
+ bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)),
+ string(
+ abi.encodePacked(
+ "StdChains setChain(string,ChainData): Chain ID ",
+ vm.toString(chain.chainId),
+ " already used by \"",
+ foundAlias,
+ "\"."
+ )
+ )
+ );
+
+ uint256 oldChainId = chains[chainAlias].chainId;
+ delete idToAlias[oldChainId];
+
+ chains[chainAlias] =
+ Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl});
+ idToAlias[chain.chainId] = chainAlias;
+ }
+
+ // set chain info, with priority to argument's rpcUrl field.
+ function setChain(string memory chainAlias, Chain memory chain) internal virtual {
+ setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl}));
+ }
+
+ function _toUpper(string memory str) private pure returns (string memory) {
+ bytes memory strb = bytes(str);
+ bytes memory copy = new bytes(strb.length);
+ for (uint256 i = 0; i < strb.length; i++) {
+ bytes1 b = strb[i];
+ if (b >= 0x61 && b <= 0x7A) {
+ copy[i] = bytes1(uint8(b) - 32);
+ } else {
+ copy[i] = b;
+ }
+ }
+ return string(copy);
+ }
+
+ // lookup rpcUrl, in descending order of priority:
+ // current -> config (foundry.toml) -> environment variable -> default
+ function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain)
+ private
+ view
+ returns (Chain memory)
+ {
+ if (bytes(chain.rpcUrl).length == 0) {
+ try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) {
+ chain.rpcUrl = configRpcUrl;
+ } catch (bytes memory err) {
+ string memory envName = string(abi.encodePacked(_toUpper(chainAlias), "_RPC_URL"));
+ if (fallbackToDefaultRpcUrls) {
+ chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]);
+ } else {
+ chain.rpcUrl = vm.envString(envName);
+ }
+ // Distinguish 'not found' from 'cannot read'
+ // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions
+ bytes memory oldNotFoundError =
+ abi.encodeWithSignature("CheatCodeError", string(abi.encodePacked("invalid rpc url ", chainAlias)));
+ bytes memory newNotFoundError = abi.encodeWithSignature(
+ "CheatcodeError(string)", string(abi.encodePacked("invalid rpc url: ", chainAlias))
+ );
+ bytes32 errHash = keccak256(err);
+ if (
+ (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError))
+ || bytes(chain.rpcUrl).length == 0
+ ) {
+ /// @solidity memory-safe-assembly
+ assembly {
+ revert(add(32, err), mload(err))
+ }
+ }
+ }
+ }
+ return chain;
+ }
+
+ function setFallbackToDefaultRpcUrls(bool useDefault) internal {
+ fallbackToDefaultRpcUrls = useDefault;
+ }
+
+ function initializeStdChains() private {
+ if (stdChainsInitialized) return;
+
+ stdChainsInitialized = true;
+
+ // If adding an RPC here, make sure to test the default RPC URL in `test_Rpcs` in `StdChains.t.sol`
+ setChainWithDefaultRpcUrl("anvil", ChainData("Anvil", 31337, "http://127.0.0.1:8545"));
+ setChainWithDefaultRpcUrl("mainnet", ChainData("Mainnet", 1, "https://eth.llamarpc.com"));
+ setChainWithDefaultRpcUrl(
+ "sepolia", ChainData("Sepolia", 11155111, "https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001")
+ );
+ setChainWithDefaultRpcUrl("holesky", ChainData("Holesky", 17000, "https://rpc.holesky.ethpandaops.io"));
+ setChainWithDefaultRpcUrl("hoodi", ChainData("Hoodi", 560048, "https://rpc.hoodi.ethpandaops.io"));
+ setChainWithDefaultRpcUrl("optimism", ChainData("Optimism", 10, "https://mainnet.optimism.io"));
+ setChainWithDefaultRpcUrl(
+ "optimism_sepolia", ChainData("Optimism Sepolia", 11155420, "https://sepolia.optimism.io")
+ );
+ setChainWithDefaultRpcUrl("arbitrum_one", ChainData("Arbitrum One", 42161, "https://arb1.arbitrum.io/rpc"));
+ setChainWithDefaultRpcUrl(
+ "arbitrum_one_sepolia", ChainData("Arbitrum One Sepolia", 421614, "https://sepolia-rollup.arbitrum.io/rpc")
+ );
+ setChainWithDefaultRpcUrl("arbitrum_nova", ChainData("Arbitrum Nova", 42170, "https://nova.arbitrum.io/rpc"));
+ setChainWithDefaultRpcUrl("polygon", ChainData("Polygon", 137, "https://polygon-rpc.com"));
+ setChainWithDefaultRpcUrl(
+ "polygon_amoy", ChainData("Polygon Amoy", 80002, "https://rpc-amoy.polygon.technology")
+ );
+ setChainWithDefaultRpcUrl("avalanche", ChainData("Avalanche", 43114, "https://api.avax.network/ext/bc/C/rpc"));
+ setChainWithDefaultRpcUrl(
+ "avalanche_fuji", ChainData("Avalanche Fuji", 43113, "https://api.avax-test.network/ext/bc/C/rpc")
+ );
+ setChainWithDefaultRpcUrl(
+ "bnb_smart_chain", ChainData("BNB Smart Chain", 56, "https://bsc-dataseed1.binance.org")
+ );
+ setChainWithDefaultRpcUrl(
+ "bnb_smart_chain_testnet",
+ ChainData("BNB Smart Chain Testnet", 97, "https://rpc.ankr.com/bsc_testnet_chapel")
+ );
+ setChainWithDefaultRpcUrl("gnosis_chain", ChainData("Gnosis Chain", 100, "https://rpc.gnosischain.com"));
+ setChainWithDefaultRpcUrl("moonbeam", ChainData("Moonbeam", 1284, "https://rpc.api.moonbeam.network"));
+ setChainWithDefaultRpcUrl(
+ "moonriver", ChainData("Moonriver", 1285, "https://rpc.api.moonriver.moonbeam.network")
+ );
+ setChainWithDefaultRpcUrl("moonbase", ChainData("Moonbase", 1287, "https://rpc.testnet.moonbeam.network"));
+ setChainWithDefaultRpcUrl("base_sepolia", ChainData("Base Sepolia", 84532, "https://sepolia.base.org"));
+ setChainWithDefaultRpcUrl("base", ChainData("Base", 8453, "https://mainnet.base.org"));
+ setChainWithDefaultRpcUrl("blast_sepolia", ChainData("Blast Sepolia", 168587773, "https://sepolia.blast.io"));
+ setChainWithDefaultRpcUrl("blast", ChainData("Blast", 81457, "https://rpc.blast.io"));
+ setChainWithDefaultRpcUrl("fantom_opera", ChainData("Fantom Opera", 250, "https://rpc.ankr.com/fantom/"));
+ setChainWithDefaultRpcUrl(
+ "fantom_opera_testnet", ChainData("Fantom Opera Testnet", 4002, "https://rpc.ankr.com/fantom_testnet/")
+ );
+ setChainWithDefaultRpcUrl("fraxtal", ChainData("Fraxtal", 252, "https://rpc.frax.com"));
+ setChainWithDefaultRpcUrl("fraxtal_testnet", ChainData("Fraxtal Testnet", 2522, "https://rpc.testnet.frax.com"));
+ setChainWithDefaultRpcUrl(
+ "berachain_bartio_testnet", ChainData("Berachain bArtio Testnet", 80084, "https://bartio.rpc.berachain.com")
+ );
+ setChainWithDefaultRpcUrl("flare", ChainData("Flare", 14, "https://flare-api.flare.network/ext/C/rpc"));
+ setChainWithDefaultRpcUrl(
+ "flare_coston2", ChainData("Flare Coston2", 114, "https://coston2-api.flare.network/ext/C/rpc")
+ );
+
+ setChainWithDefaultRpcUrl("ink", ChainData("Ink", 57073, "https://rpc-gel.inkonchain.com"));
+ setChainWithDefaultRpcUrl(
+ "ink_sepolia", ChainData("Ink Sepolia", 763373, "https://rpc-gel-sepolia.inkonchain.com")
+ );
+
+ setChainWithDefaultRpcUrl("mode", ChainData("Mode", 34443, "https://mode.drpc.org"));
+ setChainWithDefaultRpcUrl("mode_sepolia", ChainData("Mode Sepolia", 919, "https://sepolia.mode.network"));
+
+ setChainWithDefaultRpcUrl("zora", ChainData("Zora", 7777777, "https://zora.drpc.org"));
+ setChainWithDefaultRpcUrl(
+ "zora_sepolia", ChainData("Zora Sepolia", 999999999, "https://sepolia.rpc.zora.energy")
+ );
+
+ setChainWithDefaultRpcUrl("race", ChainData("Race", 6805, "https://racemainnet.io"));
+ setChainWithDefaultRpcUrl("race_sepolia", ChainData("Race Sepolia", 6806, "https://racemainnet.io"));
+
+ setChainWithDefaultRpcUrl("metal", ChainData("Metal", 1750, "https://metall2.drpc.org"));
+ setChainWithDefaultRpcUrl("metal_sepolia", ChainData("Metal Sepolia", 1740, "https://testnet.rpc.metall2.com"));
+
+ setChainWithDefaultRpcUrl("binary", ChainData("Binary", 624, "https://rpc.zero.thebinaryholdings.com"));
+ setChainWithDefaultRpcUrl(
+ "binary_sepolia", ChainData("Binary Sepolia", 625, "https://rpc.zero.thebinaryholdings.com")
+ );
+
+ setChainWithDefaultRpcUrl("orderly", ChainData("Orderly", 291, "https://rpc.orderly.network"));
+ setChainWithDefaultRpcUrl(
+ "orderly_sepolia", ChainData("Orderly Sepolia", 4460, "https://testnet-rpc.orderly.org")
+ );
+
+ setChainWithDefaultRpcUrl("unichain", ChainData("Unichain", 130, "https://mainnet.unichain.org"));
+ setChainWithDefaultRpcUrl(
+ "unichain_sepolia", ChainData("Unichain Sepolia", 1301, "https://sepolia.unichain.org")
+ );
+ }
+
+ // set chain info, with priority to chainAlias' rpc url in foundry.toml
+ function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private {
+ string memory rpcUrl = chain.rpcUrl;
+ defaultRpcUrls[chainAlias] = rpcUrl;
+ chain.rpcUrl = "";
+ setChain(chainAlias, chain);
+ chain.rpcUrl = rpcUrl; // restore argument
+ }
+}
diff --git a/contracts/lib/forge-std/src/StdCheats.sol b/contracts/lib/forge-std/src/StdCheats.sol
new file mode 100644
index 0000000..59bfea8
--- /dev/null
+++ b/contracts/lib/forge-std/src/StdCheats.sol
@@ -0,0 +1,830 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2 <0.9.0;
+
+pragma experimental ABIEncoderV2;
+
+import {StdStorage, stdStorage} from "./StdStorage.sol";
+import {console2} from "./console2.sol";
+import {Vm} from "./Vm.sol";
+
+abstract contract StdCheatsSafe {
+ Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code")))));
+
+ uint256 private constant UINT256_MAX =
+ 115792089237316195423570985008687907853269984665640564039457584007913129639935;
+
+ bool private gasMeteringOff;
+
+ // Data structures to parse Transaction objects from the broadcast artifact
+ // that conform to EIP1559. The Raw structs is what is parsed from the JSON
+ // and then converted to the one that is used by the user for better UX.
+
+ struct RawTx1559 {
+ string[] arguments;
+ address contractAddress;
+ string contractName;
+ // json value name = function
+ string functionSig;
+ bytes32 hash;
+ // json value name = tx
+ RawTx1559Detail txDetail;
+ // json value name = type
+ string opcode;
+ }
+
+ struct RawTx1559Detail {
+ AccessList[] accessList;
+ bytes data;
+ address from;
+ bytes gas;
+ bytes nonce;
+ address to;
+ bytes txType;
+ bytes value;
+ }
+
+ struct Tx1559 {
+ string[] arguments;
+ address contractAddress;
+ string contractName;
+ string functionSig;
+ bytes32 hash;
+ Tx1559Detail txDetail;
+ string opcode;
+ }
+
+ struct Tx1559Detail {
+ AccessList[] accessList;
+ bytes data;
+ address from;
+ uint256 gas;
+ uint256 nonce;
+ address to;
+ uint256 txType;
+ uint256 value;
+ }
+
+ // Data structures to parse Transaction objects from the broadcast artifact
+ // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON
+ // and then converted to the one that is used by the user for better UX.
+
+ struct TxLegacy {
+ string[] arguments;
+ address contractAddress;
+ string contractName;
+ string functionSig;
+ string hash;
+ string opcode;
+ TxDetailLegacy transaction;
+ }
+
+ struct TxDetailLegacy {
+ AccessList[] accessList;
+ uint256 chainId;
+ bytes data;
+ address from;
+ uint256 gas;
+ uint256 gasPrice;
+ bytes32 hash;
+ uint256 nonce;
+ bytes1 opcode;
+ bytes32 r;
+ bytes32 s;
+ uint256 txType;
+ address to;
+ uint8 v;
+ uint256 value;
+ }
+
+ struct AccessList {
+ address accessAddress;
+ bytes32[] storageKeys;
+ }
+
+ // Data structures to parse Receipt objects from the broadcast artifact.
+ // The Raw structs is what is parsed from the JSON
+ // and then converted to the one that is used by the user for better UX.
+
+ struct RawReceipt {
+ bytes32 blockHash;
+ bytes blockNumber;
+ address contractAddress;
+ bytes cumulativeGasUsed;
+ bytes effectiveGasPrice;
+ address from;
+ bytes gasUsed;
+ RawReceiptLog[] logs;
+ bytes logsBloom;
+ bytes status;
+ address to;
+ bytes32 transactionHash;
+ bytes transactionIndex;
+ }
+
+ struct Receipt {
+ bytes32 blockHash;
+ uint256 blockNumber;
+ address contractAddress;
+ uint256 cumulativeGasUsed;
+ uint256 effectiveGasPrice;
+ address from;
+ uint256 gasUsed;
+ ReceiptLog[] logs;
+ bytes logsBloom;
+ uint256 status;
+ address to;
+ bytes32 transactionHash;
+ uint256 transactionIndex;
+ }
+
+ // Data structures to parse the entire broadcast artifact, assuming the
+ // transactions conform to EIP1559.
+
+ struct EIP1559ScriptArtifact {
+ string[] libraries;
+ string path;
+ string[] pending;
+ Receipt[] receipts;
+ uint256 timestamp;
+ Tx1559[] transactions;
+ TxReturn[] txReturns;
+ }
+
+ struct RawEIP1559ScriptArtifact {
+ string[] libraries;
+ string path;
+ string[] pending;
+ RawReceipt[] receipts;
+ TxReturn[] txReturns;
+ uint256 timestamp;
+ RawTx1559[] transactions;
+ }
+
+ struct RawReceiptLog {
+ // json value = address
+ address logAddress;
+ bytes32 blockHash;
+ bytes blockNumber;
+ bytes data;
+ bytes logIndex;
+ bool removed;
+ bytes32[] topics;
+ bytes32 transactionHash;
+ bytes transactionIndex;
+ bytes transactionLogIndex;
+ }
+
+ struct ReceiptLog {
+ // json value = address
+ address logAddress;
+ bytes32 blockHash;
+ uint256 blockNumber;
+ bytes data;
+ uint256 logIndex;
+ bytes32[] topics;
+ uint256 transactionIndex;
+ uint256 transactionLogIndex;
+ bool removed;
+ }
+
+ struct TxReturn {
+ string internalType;
+ string value;
+ }
+
+ struct Account {
+ address addr;
+ uint256 key;
+ }
+
+ enum AddressType {
+ Payable,
+ NonPayable,
+ ZeroAddress,
+ Precompile,
+ ForgeAddress
+ }
+
+ // Checks that `addr` is not blacklisted by token contracts that have a blacklist.
+ function assumeNotBlacklisted(address token, address addr) internal view virtual {
+ // Nothing to check if `token` is not a contract.
+ uint256 tokenCodeSize;
+ assembly {
+ tokenCodeSize := extcodesize(token)
+ }
+ require(tokenCodeSize > 0, "StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.");
+
+ bool success;
+ bytes memory returnData;
+
+ // 4-byte selector for `isBlacklisted(address)`, used by USDC.
+ (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr));
+ vm.assume(!success || abi.decode(returnData, (bool)) == false);
+
+ // 4-byte selector for `isBlackListed(address)`, used by USDT.
+ (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr));
+ vm.assume(!success || abi.decode(returnData, (bool)) == false);
+ }
+
+ // Checks that `addr` is not blacklisted by token contracts that have a blacklist.
+ // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for
+ // backwards compatibility, since this name was used in the original PR which already has
+ // a release. This function can be removed in a future release once we want a breaking change.
+ function assumeNoBlacklisted(address token, address addr) internal view virtual {
+ assumeNotBlacklisted(token, addr);
+ }
+
+ function assumeAddressIsNot(address addr, AddressType addressType) internal virtual {
+ if (addressType == AddressType.Payable) {
+ assumeNotPayable(addr);
+ } else if (addressType == AddressType.NonPayable) {
+ assumePayable(addr);
+ } else if (addressType == AddressType.ZeroAddress) {
+ assumeNotZeroAddress(addr);
+ } else if (addressType == AddressType.Precompile) {
+ assumeNotPrecompile(addr);
+ } else if (addressType == AddressType.ForgeAddress) {
+ assumeNotForgeAddress(addr);
+ }
+ }
+
+ function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual {
+ assumeAddressIsNot(addr, addressType1);
+ assumeAddressIsNot(addr, addressType2);
+ }
+
+ function assumeAddressIsNot(
+ address addr,
+ AddressType addressType1,
+ AddressType addressType2,
+ AddressType addressType3
+ ) internal virtual {
+ assumeAddressIsNot(addr, addressType1);
+ assumeAddressIsNot(addr, addressType2);
+ assumeAddressIsNot(addr, addressType3);
+ }
+
+ function assumeAddressIsNot(
+ address addr,
+ AddressType addressType1,
+ AddressType addressType2,
+ AddressType addressType3,
+ AddressType addressType4
+ ) internal virtual {
+ assumeAddressIsNot(addr, addressType1);
+ assumeAddressIsNot(addr, addressType2);
+ assumeAddressIsNot(addr, addressType3);
+ assumeAddressIsNot(addr, addressType4);
+ }
+
+ // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to
+ // `addr` and checking the `success` return value.
+ // NOTE: This function may result in state changes depending on the fallback/receive logic
+ // implemented by `addr`, which should be taken into account when this function is used.
+ function _isPayable(address addr) private returns (bool) {
+ require(
+ addr.balance < UINT256_MAX,
+ "StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds"
+ );
+ uint256 origBalanceTest = address(this).balance;
+ uint256 origBalanceAddr = address(addr).balance;
+
+ vm.deal(address(this), 1);
+ (bool success,) = payable(addr).call{value: 1}("");
+
+ // reset balances
+ vm.deal(address(this), origBalanceTest);
+ vm.deal(addr, origBalanceAddr);
+
+ return success;
+ }
+
+ // NOTE: This function may result in state changes depending on the fallback/receive logic
+ // implemented by `addr`, which should be taken into account when this function is used. See the
+ // `_isPayable` method for more information.
+ function assumePayable(address addr) internal virtual {
+ vm.assume(_isPayable(addr));
+ }
+
+ function assumeNotPayable(address addr) internal virtual {
+ vm.assume(!_isPayable(addr));
+ }
+
+ function assumeNotZeroAddress(address addr) internal pure virtual {
+ vm.assume(addr != address(0));
+ }
+
+ function assumeNotPrecompile(address addr) internal pure virtual {
+ assumeNotPrecompile(addr, _pureChainId());
+ }
+
+ function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual {
+ // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific
+ // address), but the same rationale for excluding them applies so we include those too.
+
+ // These are reserved by Ethereum and may be on all EVM-compatible chains.
+ vm.assume(addr < address(0x1) || addr > address(0xff));
+
+ // forgefmt: disable-start
+ if (chainId == 10 || chainId == 420 || chainId == 11155420) {
+ // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21
+ vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800));
+ } else if (chainId == 42161 || chainId == 421613) {
+ // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains
+ vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068));
+ } else if (chainId == 43114 || chainId == 43113) {
+ // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59
+ vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff));
+ vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF));
+ vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff));
+ }
+ // forgefmt: disable-end
+ }
+
+ function assumeNotForgeAddress(address addr) internal pure virtual {
+ // vm, console, and Create2Deployer addresses
+ vm.assume(
+ addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67
+ && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C
+ );
+ }
+
+ function assumeUnusedAddress(address addr) internal view virtual {
+ uint256 size;
+ assembly {
+ size := extcodesize(addr)
+ }
+ vm.assume(size == 0);
+
+ assumeNotPrecompile(addr);
+ assumeNotZeroAddress(addr);
+ assumeNotForgeAddress(addr);
+ }
+
+ function readEIP1559ScriptArtifact(string memory path)
+ internal
+ view
+ virtual
+ returns (EIP1559ScriptArtifact memory)
+ {
+ string memory data = vm.readFile(path);
+ bytes memory parsedData = vm.parseJson(data);
+ RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact));
+ EIP1559ScriptArtifact memory artifact;
+ artifact.libraries = rawArtifact.libraries;
+ artifact.path = rawArtifact.path;
+ artifact.timestamp = rawArtifact.timestamp;
+ artifact.pending = rawArtifact.pending;
+ artifact.txReturns = rawArtifact.txReturns;
+ artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts);
+ artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions);
+ return artifact;
+ }
+
+ function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) {
+ Tx1559[] memory txs = new Tx1559[](rawTxs.length);
+ for (uint256 i; i < rawTxs.length; i++) {
+ txs[i] = rawToConvertedEIPTx1559(rawTxs[i]);
+ }
+ return txs;
+ }
+
+ function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) {
+ Tx1559 memory transaction;
+ transaction.arguments = rawTx.arguments;
+ transaction.contractName = rawTx.contractName;
+ transaction.functionSig = rawTx.functionSig;
+ transaction.hash = rawTx.hash;
+ transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail);
+ transaction.opcode = rawTx.opcode;
+ return transaction;
+ }
+
+ function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail)
+ internal
+ pure
+ virtual
+ returns (Tx1559Detail memory)
+ {
+ Tx1559Detail memory txDetail;
+ txDetail.data = rawDetail.data;
+ txDetail.from = rawDetail.from;
+ txDetail.to = rawDetail.to;
+ txDetail.nonce = _bytesToUint(rawDetail.nonce);
+ txDetail.txType = _bytesToUint(rawDetail.txType);
+ txDetail.value = _bytesToUint(rawDetail.value);
+ txDetail.gas = _bytesToUint(rawDetail.gas);
+ txDetail.accessList = rawDetail.accessList;
+ return txDetail;
+ }
+
+ function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) {
+ string memory deployData = vm.readFile(path);
+ bytes memory parsedDeployData = vm.parseJson(deployData, ".transactions");
+ RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[]));
+ return rawToConvertedEIPTx1559s(rawTxs);
+ }
+
+ function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) {
+ string memory deployData = vm.readFile(path);
+ string memory key = string(abi.encodePacked(".transactions[", vm.toString(index), "]"));
+ bytes memory parsedDeployData = vm.parseJson(deployData, key);
+ RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559));
+ return rawToConvertedEIPTx1559(rawTx);
+ }
+
+ // Analogous to readTransactions, but for receipts.
+ function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) {
+ string memory deployData = vm.readFile(path);
+ bytes memory parsedDeployData = vm.parseJson(deployData, ".receipts");
+ RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[]));
+ return rawToConvertedReceipts(rawReceipts);
+ }
+
+ function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) {
+ string memory deployData = vm.readFile(path);
+ string memory key = string(abi.encodePacked(".receipts[", vm.toString(index), "]"));
+ bytes memory parsedDeployData = vm.parseJson(deployData, key);
+ RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt));
+ return rawToConvertedReceipt(rawReceipt);
+ }
+
+ function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) {
+ Receipt[] memory receipts = new Receipt[](rawReceipts.length);
+ for (uint256 i; i < rawReceipts.length; i++) {
+ receipts[i] = rawToConvertedReceipt(rawReceipts[i]);
+ }
+ return receipts;
+ }
+
+ function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) {
+ Receipt memory receipt;
+ receipt.blockHash = rawReceipt.blockHash;
+ receipt.to = rawReceipt.to;
+ receipt.from = rawReceipt.from;
+ receipt.contractAddress = rawReceipt.contractAddress;
+ receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice);
+ receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed);
+ receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed);
+ receipt.status = _bytesToUint(rawReceipt.status);
+ receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex);
+ receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber);
+ receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs);
+ receipt.logsBloom = rawReceipt.logsBloom;
+ receipt.transactionHash = rawReceipt.transactionHash;
+ return receipt;
+ }
+
+ function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs)
+ internal
+ pure
+ virtual
+ returns (ReceiptLog[] memory)
+ {
+ ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length);
+ for (uint256 i; i < rawLogs.length; i++) {
+ logs[i].logAddress = rawLogs[i].logAddress;
+ logs[i].blockHash = rawLogs[i].blockHash;
+ logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber);
+ logs[i].data = rawLogs[i].data;
+ logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex);
+ logs[i].topics = rawLogs[i].topics;
+ logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex);
+ logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex);
+ logs[i].removed = rawLogs[i].removed;
+ }
+ return logs;
+ }
+
+ // Deploy a contract by fetching the contract bytecode from
+ // the artifacts directory
+ // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))`
+ function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) {
+ bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);
+ /// @solidity memory-safe-assembly
+ assembly {
+ addr := create(0, add(bytecode, 0x20), mload(bytecode))
+ }
+
+ require(addr != address(0), "StdCheats deployCode(string,bytes): Deployment failed.");
+ }
+
+ function deployCode(string memory what) internal virtual returns (address addr) {
+ bytes memory bytecode = vm.getCode(what);
+ /// @solidity memory-safe-assembly
+ assembly {
+ addr := create(0, add(bytecode, 0x20), mload(bytecode))
+ }
+
+ require(addr != address(0), "StdCheats deployCode(string): Deployment failed.");
+ }
+
+ /// @dev deploy contract with value on construction
+ function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) {
+ bytes memory bytecode = abi.encodePacked(vm.getCode(what), args);
+ /// @solidity memory-safe-assembly
+ assembly {
+ addr := create(val, add(bytecode, 0x20), mload(bytecode))
+ }
+
+ require(addr != address(0), "StdCheats deployCode(string,bytes,uint256): Deployment failed.");
+ }
+
+ function deployCode(string memory what, uint256 val) internal virtual returns (address addr) {
+ bytes memory bytecode = vm.getCode(what);
+ /// @solidity memory-safe-assembly
+ assembly {
+ addr := create(val, add(bytecode, 0x20), mload(bytecode))
+ }
+
+ require(addr != address(0), "StdCheats deployCode(string,uint256): Deployment failed.");
+ }
+
+ // creates a labeled address and the corresponding private key
+ function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) {
+ privateKey = uint256(keccak256(abi.encodePacked(name)));
+ addr = vm.addr(privateKey);
+ vm.label(addr, name);
+ }
+
+ // creates a labeled address
+ function makeAddr(string memory name) internal virtual returns (address addr) {
+ (addr,) = makeAddrAndKey(name);
+ }
+
+ // Destroys an account immediately, sending the balance to beneficiary.
+ // Destroying means: balance will be zero, code will be empty, and nonce will be 0
+ // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce
+ // only after tx ends, this will run immediately.
+ function destroyAccount(address who, address beneficiary) internal virtual {
+ uint256 currBalance = who.balance;
+ vm.etch(who, abi.encode());
+ vm.deal(who, 0);
+ vm.resetNonce(who);
+
+ uint256 beneficiaryBalance = beneficiary.balance;
+ vm.deal(beneficiary, currBalance + beneficiaryBalance);
+ }
+
+ // creates a struct containing both a labeled address and the corresponding private key
+ function makeAccount(string memory name) internal virtual returns (Account memory account) {
+ (account.addr, account.key) = makeAddrAndKey(name);
+ }
+
+ function deriveRememberKey(string memory mnemonic, uint32 index)
+ internal
+ virtual
+ returns (address who, uint256 privateKey)
+ {
+ privateKey = vm.deriveKey(mnemonic, index);
+ who = vm.rememberKey(privateKey);
+ }
+
+ function _bytesToUint(bytes memory b) private pure returns (uint256) {
+ require(b.length <= 32, "StdCheats _bytesToUint(bytes): Bytes length exceeds 32.");
+ return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));
+ }
+
+ function isFork() internal view virtual returns (bool status) {
+ try vm.activeFork() {
+ status = true;
+ } catch (bytes memory) {}
+ }
+
+ modifier skipWhenForking() {
+ if (!isFork()) {
+ _;
+ }
+ }
+
+ modifier skipWhenNotForking() {
+ if (isFork()) {
+ _;
+ }
+ }
+
+ modifier noGasMetering() {
+ vm.pauseGasMetering();
+ // To prevent turning gas monitoring back on with nested functions that use this modifier,
+ // we check if gasMetering started in the off position. If it did, we don't want to turn
+ // it back on until we exit the top level function that used the modifier
+ //
+ // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.
+ // funcA will have `gasStartedOff` as false, funcB will have it as true,
+ // so we only turn metering back on at the end of the funcA
+ bool gasStartedOff = gasMeteringOff;
+ gasMeteringOff = true;
+
+ _;
+
+ // if gas metering was on when this modifier was called, turn it back on at the end
+ if (!gasStartedOff) {
+ gasMeteringOff = false;
+ vm.resumeGasMetering();
+ }
+ }
+
+ // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no
+ // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We
+ // can't simply access the chain ID in a normal view or pure function because the solc View Pure
+ // Checker changed `chainid` from pure to view in 0.8.0.
+ function _viewChainId() private view returns (uint256 chainId) {
+ // Assembly required since `block.chainid` was introduced in 0.8.0.
+ assembly {
+ chainId := chainid()
+ }
+
+ address(this); // Silence warnings in older Solc versions.
+ }
+
+ function _pureChainId() private pure returns (uint256 chainId) {
+ function() internal view returns (uint256) fnIn = _viewChainId;
+ function() internal pure returns (uint256) pureChainId;
+ assembly {
+ pureChainId := fnIn
+ }
+ chainId = pureChainId();
+ }
+}
+
+// Wrappers around cheatcodes to avoid footguns
+abstract contract StdCheats is StdCheatsSafe {
+ using stdStorage for StdStorage;
+
+ StdStorage private stdstore;
+ Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code")))));
+ address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;
+
+ // Skip forward or rewind time by the specified number of seconds
+ function skip(uint256 time) internal virtual {
+ vm.warp(vm.getBlockTimestamp() + time);
+ }
+
+ function rewind(uint256 time) internal virtual {
+ vm.warp(vm.getBlockTimestamp() - time);
+ }
+
+ // Setup a prank from an address that has some ether
+ function hoax(address msgSender) internal virtual {
+ vm.deal(msgSender, 1 << 128);
+ vm.prank(msgSender);
+ }
+
+ function hoax(address msgSender, uint256 give) internal virtual {
+ vm.deal(msgSender, give);
+ vm.prank(msgSender);
+ }
+
+ function hoax(address msgSender, address origin) internal virtual {
+ vm.deal(msgSender, 1 << 128);
+ vm.prank(msgSender, origin);
+ }
+
+ function hoax(address msgSender, address origin, uint256 give) internal virtual {
+ vm.deal(msgSender, give);
+ vm.prank(msgSender, origin);
+ }
+
+ // Start perpetual prank from an address that has some ether
+ function startHoax(address msgSender) internal virtual {
+ vm.deal(msgSender, 1 << 128);
+ vm.startPrank(msgSender);
+ }
+
+ function startHoax(address msgSender, uint256 give) internal virtual {
+ vm.deal(msgSender, give);
+ vm.startPrank(msgSender);
+ }
+
+ // Start perpetual prank from an address that has some ether
+ // tx.origin is set to the origin parameter
+ function startHoax(address msgSender, address origin) internal virtual {
+ vm.deal(msgSender, 1 << 128);
+ vm.startPrank(msgSender, origin);
+ }
+
+ function startHoax(address msgSender, address origin, uint256 give) internal virtual {
+ vm.deal(msgSender, give);
+ vm.startPrank(msgSender, origin);
+ }
+
+ function changePrank(address msgSender) internal virtual {
+ console2_log_StdCheats("changePrank is deprecated. Please use vm.startPrank instead.");
+ vm.stopPrank();
+ vm.startPrank(msgSender);
+ }
+
+ function changePrank(address msgSender, address txOrigin) internal virtual {
+ console2_log_StdCheats("changePrank is deprecated. Please use vm.startPrank instead.");
+ vm.stopPrank();
+ vm.startPrank(msgSender, txOrigin);
+ }
+
+ // The same as Vm's `deal`
+ // Use the alternative signature for ERC20 tokens
+ function deal(address to, uint256 give) internal virtual {
+ vm.deal(to, give);
+ }
+
+ // Set the balance of an account for any ERC20 token
+ // Use the alternative signature to update `totalSupply`
+ function deal(address token, address to, uint256 give) internal virtual {
+ deal(token, to, give, false);
+ }
+
+ // Set the balance of an account for any ERC1155 token
+ // Use the alternative signature to update `totalSupply`
+ function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual {
+ dealERC1155(token, to, id, give, false);
+ }
+
+ function deal(address token, address to, uint256 give, bool adjust) internal virtual {
+ // get current balance
+ (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));
+ uint256 prevBal = abi.decode(balData, (uint256));
+
+ // update balance
+ stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);
+
+ // update total supply
+ if (adjust) {
+ (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd));
+ uint256 totSup = abi.decode(totSupData, (uint256));
+ if (give < prevBal) {
+ totSup -= (prevBal - give);
+ } else {
+ totSup += (give - prevBal);
+ }
+ stdstore.target(token).sig(0x18160ddd).checked_write(totSup);
+ }
+ }
+
+ function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual {
+ // get current balance
+ (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id));
+ uint256 prevBal = abi.decode(balData, (uint256));
+
+ // update balance
+ stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give);
+
+ // update total supply
+ if (adjust) {
+ (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id));
+ require(
+ totSupData.length != 0,
+ "StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply."
+ );
+ uint256 totSup = abi.decode(totSupData, (uint256));
+ if (give < prevBal) {
+ totSup -= (prevBal - give);
+ } else {
+ totSup += (give - prevBal);
+ }
+ stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup);
+ }
+ }
+
+ function dealERC721(address token, address to, uint256 id) internal virtual {
+ // check if token id is already minted and the actual owner.
+ (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));
+ require(successMinted, "StdCheats deal(address,address,uint,bool): id not minted.");
+
+ // get owner current balance
+ (, bytes memory fromBalData) =
+ token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));
+ uint256 fromPrevBal = abi.decode(fromBalData, (uint256));
+
+ // get new user current balance
+ (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));
+ uint256 toPrevBal = abi.decode(toBalData, (uint256));
+
+ // update balances
+ stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);
+ stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);
+
+ // update owner
+ stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);
+ }
+
+ function deployCodeTo(string memory what, address where) internal virtual {
+ deployCodeTo(what, "", 0, where);
+ }
+
+ function deployCodeTo(string memory what, bytes memory args, address where) internal virtual {
+ deployCodeTo(what, args, 0, where);
+ }
+
+ function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual {
+ bytes memory creationCode = vm.getCode(what);
+ vm.etch(where, abi.encodePacked(creationCode, args));
+ (bool success, bytes memory runtimeBytecode) = where.call{value: value}("");
+ require(success, "StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.");
+ vm.etch(where, runtimeBytecode);
+ }
+
+ // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.
+ function console2_log_StdCheats(string memory p0) private view {
+ (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature("log(string)", p0));
+ status;
+ }
+}
diff --git a/contracts/lib/forge-std/src/StdConfig.sol b/contracts/lib/forge-std/src/StdConfig.sol
new file mode 100644
index 0000000..161e317
--- /dev/null
+++ b/contracts/lib/forge-std/src/StdConfig.sol
@@ -0,0 +1,613 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.13;
+
+import {VmSafe} from "./Vm.sol";
+import {Variable, Type, TypeKind, LibVariable} from "./LibVariable.sol";
+
+/// @notice A contract that parses a toml configuration file and load its
+/// variables into storage, automatically casting them, on deployment.
+///
+/// @dev This contract assumes a toml structure where top-level keys
+/// represent chain ids or aliases. Under each chain key, variables are
+/// organized by type in separate sub-tables like `[.]`, where
+/// type must be: `bool`, `address`, `bytes32`, `uint`, `ìnt`, `string`, or `bytes`.
+///
+/// Supported format:
+/// ```
+/// [mainnet]
+/// endpoint_url = "${MAINNET_RPC}"
+///
+/// [mainnet.bool]
+/// is_live = true
+///
+/// [mainnet.address]
+/// weth = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+/// whitelisted_admins = [
+/// "${MAINNET_ADMIN}",
+/// "0x00000000000000000000000000000000deadbeef",
+/// "0x000000000000000000000000000000c0ffeebabe"
+/// ]
+///
+/// [mainnet.uint]
+/// important_number = 123
+/// ```
+contract StdConfig {
+ using LibVariable for Type;
+ using LibVariable for TypeKind;
+
+ VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code")))));
+
+ /// @dev Types: `bool`, `address`, `bytes32`, `uint`, `ìnt`, `string`, `bytes`.
+ uint8 private constant NUM_TYPES = 7;
+
+ // -- ERRORS ---------------------------------------------------------------
+
+ error AlreadyInitialized(string key);
+ error InvalidChainKey(string aliasOrId);
+ error ChainNotInitialized(uint256 chainId);
+ error UnableToParseVariable(string key);
+ error WriteToFileInForbiddenCtxt();
+
+ // -- STORAGE (CACHE FROM CONFIG FILE) ------------------------------------
+
+ /// @dev Path to the loaded TOML configuration file.
+ string private _filePath;
+
+ /// @dev List of top-level keys found in the TOML file, assumed to be chain names/aliases.
+ string[] private _chainKeys;
+
+ /// @dev Storage for the configured RPC URL for each chain.
+ mapping(uint256 => string) private _rpcOf;
+
+ /// @dev Storage for values, organized by chain ID and variable key.
+ mapping(uint256 => mapping(string => bytes)) private _dataOf;
+
+ /// @dev Type cache for runtime checking when casting.
+ mapping(uint256 => mapping(string => Type)) private _typeOf;
+
+ /// @dev When enabled, `set` will always write updates back to the configuration file.
+ /// Can only be enabled in a scripting context to prevent file corruption from
+ /// concurrent I/O access, as tests run in parallel.
+ bool private _writeToFile;
+
+ // -- CONSTRUCTOR ----------------------------------------------------------
+
+ /// @notice Reads the TOML file and iterates through each top-level key, which is
+ /// assumed to be a chain name or ID. For each chain, it caches its RPC
+ /// endpoint and all variables defined in typed sub-tables like `[.]`,
+ /// where type must be: `bool`, `address`, `uint`, `bytes32`, `string`, or `bytes`.
+ ///
+ /// The constructor attempts to parse each variable first as a single value,
+ /// and if that fails, as an array of that type. If a variable cannot be
+ /// parsed as either, the constructor will revert with an error.
+ ///
+ /// @param configFilePath: The local path to the TOML configuration file.
+ /// @param writeToFile: Whether to write updates back to the TOML file. Only for scripts.
+ constructor(string memory configFilePath, bool writeToFile) {
+ if (writeToFile && !vm.isContext(VmSafe.ForgeContext.ScriptGroup)) {
+ revert WriteToFileInForbiddenCtxt();
+ }
+
+ _filePath = configFilePath;
+ _writeToFile = writeToFile;
+ string memory content = vm.resolveEnv(vm.readFile(configFilePath));
+ string[] memory chain_keys = vm.parseTomlKeys(content, "$");
+
+ // Cache the entire configuration to storage
+ for (uint256 i = 0; i < chain_keys.length; i++) {
+ string memory chain_key = chain_keys[i];
+ // Ignore top-level keys that are not tables
+ if (vm.parseTomlKeys(content, string.concat("$.", chain_key)).length == 0) {
+ continue;
+ }
+ uint256 chainId = resolveChainId(chain_key);
+ _chainKeys.push(chain_key);
+
+ // Cache the configure rpc endpoint for that chain.
+ // Falls back to `[rpc_endpoints]`. Panics if no rpc endpoint is configured.
+ try vm.parseTomlString(content, string.concat("$.", chain_key, ".endpoint_url")) returns (
+ string memory url
+ ) {
+ _rpcOf[chainId] = vm.resolveEnv(url);
+ } catch {
+ _rpcOf[chainId] = vm.resolveEnv(vm.rpcUrl(chain_key));
+ }
+
+ // Iterate through all the available `TypeKind`s (except `None`) to create the sub-section paths
+ for (uint8 t = 1; t <= NUM_TYPES; t++) {
+ TypeKind ty = TypeKind(t);
+ string memory typePath = string.concat("$.", chain_key, ".", ty.toTomlKey());
+
+ try vm.parseTomlKeys(content, typePath) returns (string[] memory keys) {
+ for (uint256 j = 0; j < keys.length; j++) {
+ string memory key = keys[j];
+ if (_typeOf[chainId][key].kind == TypeKind.None) {
+ _loadAndCacheValue(content, string.concat(typePath, ".", key), chainId, key, ty);
+ } else {
+ revert AlreadyInitialized(key);
+ }
+ }
+ } catch {}
+ }
+ }
+ }
+
+ function _loadAndCacheValue(
+ string memory content,
+ string memory path,
+ uint256 chainId,
+ string memory key,
+ TypeKind ty
+ ) private {
+ bool success = false;
+ if (ty == TypeKind.Bool) {
+ try vm.parseTomlBool(content, path) returns (bool val) {
+ _dataOf[chainId][key] = abi.encode(val);
+ _typeOf[chainId][key] = Type(TypeKind.Bool, false);
+ success = true;
+ } catch {
+ try vm.parseTomlBoolArray(content, path) returns (bool[] memory val) {
+ _dataOf[chainId][key] = abi.encode(val);
+ _typeOf[chainId][key] = Type(TypeKind.Bool, true);
+ success = true;
+ } catch {}
+ }
+ } else if (ty == TypeKind.Address) {
+ try vm.parseTomlAddress(content, path) returns (address val) {
+ _dataOf[chainId][key] = abi.encode(val);
+ _typeOf[chainId][key] = Type(TypeKind.Address, false);
+ success = true;
+ } catch {
+ try vm.parseTomlAddressArray(content, path) returns (address[] memory val) {
+ _dataOf[chainId][key] = abi.encode(val);
+ _typeOf[chainId][key] = Type(TypeKind.Address, true);
+ success = true;
+ } catch {}
+ }
+ } else if (ty == TypeKind.Bytes32) {
+ try vm.parseTomlBytes32(content, path) returns (bytes32 val) {
+ _dataOf[chainId][key] = abi.encode(val);
+ _typeOf[chainId][key] = Type(TypeKind.Bytes32, false);
+ success = true;
+ } catch {
+ try vm.parseTomlBytes32Array(content, path) returns (bytes32[] memory val) {
+ _dataOf[chainId][key] = abi.encode(val);
+ _typeOf[chainId][key] = Type(TypeKind.Bytes32, true);
+ success = true;
+ } catch {}
+ }
+ } else if (ty == TypeKind.Uint256) {
+ try vm.parseTomlUint(content, path) returns (uint256 val) {
+ _dataOf[chainId][key] = abi.encode(val);
+ _typeOf[chainId][key] = Type(TypeKind.Uint256, false);
+ success = true;
+ } catch {
+ try vm.parseTomlUintArray(content, path) returns (uint256[] memory val) {
+ _dataOf[chainId][key] = abi.encode(val);
+ _typeOf[chainId][key] = Type(TypeKind.Uint256, true);
+ success = true;
+ } catch {}
+ }
+ } else if (ty == TypeKind.Int256) {
+ try vm.parseTomlInt(content, path) returns (int256 val) {
+ _dataOf[chainId][key] = abi.encode(val);
+ _typeOf[chainId][key] = Type(TypeKind.Int256, false);
+ success = true;
+ } catch {
+ try vm.parseTomlIntArray(content, path) returns (int256[] memory val) {
+ _dataOf[chainId][key] = abi.encode(val);
+ _typeOf[chainId][key] = Type(TypeKind.Int256, true);
+ success = true;
+ } catch {}
+ }
+ } else if (ty == TypeKind.Bytes) {
+ try vm.parseTomlBytes(content, path) returns (bytes memory val) {
+ _dataOf[chainId][key] = abi.encode(val);
+ _typeOf[chainId][key] = Type(TypeKind.Bytes, false);
+ success = true;
+ } catch {
+ try vm.parseTomlBytesArray(content, path) returns (bytes[] memory val) {
+ _dataOf[chainId][key] = abi.encode(val);
+ _typeOf[chainId][key] = Type(TypeKind.Bytes, true);
+ success = true;
+ } catch {}
+ }
+ } else if (ty == TypeKind.String) {
+ try vm.parseTomlString(content, path) returns (string memory val) {
+ _dataOf[chainId][key] = abi.encode(val);
+ _typeOf[chainId][key] = Type(TypeKind.String, false);
+ success = true;
+ } catch {
+ try vm.parseTomlStringArray(content, path) returns (string[] memory val) {
+ _dataOf[chainId][key] = abi.encode(val);
+ _typeOf[chainId][key] = Type(TypeKind.String, true);
+ success = true;
+ } catch {}
+ }
+ }
+
+ if (!success) {
+ revert UnableToParseVariable(key);
+ }
+ }
+
+ // -- HELPER FUNCTIONS -----------------------------------------------------
+
+ /// @notice Enable or disable automatic writing to the TOML file on `set`.
+ /// Can only be enabled when scripting.
+ function writeUpdatesBackToFile(bool enabled) public {
+ if (enabled && !vm.isContext(VmSafe.ForgeContext.ScriptGroup)) {
+ revert WriteToFileInForbiddenCtxt();
+ }
+
+ _writeToFile = enabled;
+ }
+
+ /// @notice Resolves a chain alias or a chain id string to its numerical chain id.
+ /// @param aliasOrId The string representing the chain alias (i.e. "mainnet") or a numerical ID (i.e. "1").
+ /// @return The numerical chain ID.
+ /// @dev It first attempts to parse the input as a number. If that fails, it uses `vm.getChain` to resolve a named alias.
+ /// Reverts if the alias is not valid or not a number.
+ function resolveChainId(string memory aliasOrId) public view returns (uint256) {
+ try vm.parseUint(aliasOrId) returns (uint256 chainId) {
+ return chainId;
+ } catch {
+ try vm.getChain(aliasOrId) returns (VmSafe.Chain memory chainInfo) {
+ return chainInfo.chainId;
+ } catch {
+ revert InvalidChainKey(aliasOrId);
+ }
+ }
+ }
+
+ /// @dev Retrieves the chain key/alias from the configuration based on the chain ID.
+ function _getChainKeyFromId(uint256 chainId) private view returns (string memory) {
+ for (uint256 i = 0; i < _chainKeys.length; i++) {
+ if (resolveChainId(_chainKeys[i]) == chainId) {
+ return _chainKeys[i];
+ }
+ }
+ revert ChainNotInitialized(chainId);
+ }
+
+ /// @dev Ensures type consistency when setting a value - prevents changing types unless uninitialized.
+ /// Updates type only when the previous type was `None`.
+ function _ensureTypeConsistency(uint256 chainId, string memory key, Type memory ty) private {
+ Type memory current = _typeOf[chainId][key];
+
+ if (current.kind == TypeKind.None) {
+ _typeOf[chainId][key] = ty;
+ } else {
+ current.assertEq(ty);
+ }
+ }
+
+ /// @dev Wraps a string in double quotes for JSON compatibility.
+ function _quote(string memory s) private pure returns (string memory) {
+ return string.concat('"', s, '"');
+ }
+
+ /// @dev Writes a JSON-formatted value to a specific key in the TOML file.
+ /// @param chainId The chain id to write under.
+ /// @param ty The type category ('bool', 'address', 'uint', 'bytes32', 'string', or 'bytes').
+ /// @param key The variable key name.
+ /// @param jsonValue The JSON-formatted value to write.
+ function _writeToToml(uint256 chainId, string memory ty, string memory key, string memory jsonValue) private {
+ string memory chainKey = _getChainKeyFromId(chainId);
+ string memory valueKey = string.concat("$.", chainKey, ".", ty, ".", key);
+ vm.writeToml(jsonValue, _filePath, valueKey);
+ }
+
+ // -- GETTER FUNCTIONS -----------------------------------------------------
+
+ /// @dev Reads a variable for a given chain id and key, and returns it in a generic container.
+ /// The caller should use `LibVariable` to safely coerce the type.
+ /// Example: `uint256 myVar = config.get("my_key").toUint256();`
+ ///
+ /// @param chain_id The chain ID to read from.
+ /// @param key The key of the variable to retrieve.
+ /// @return `Variable` struct containing the type and the ABI-encoded value.
+ function get(uint256 chain_id, string memory key) public view returns (Variable memory) {
+ return Variable(_typeOf[chain_id][key], _dataOf[chain_id][key]);
+ }
+
+ /// @dev Reads a variable for the current chain and a given key, and returns it in a generic container.
+ /// The caller should use `LibVariable` to safely coerce the type.
+ /// Example: `uint256 myVar = config.get("my_key").toUint256();`
+ ///
+ /// @param key The key of the variable to retrieve.
+ /// @return `Variable` struct containing the type and the ABI-encoded value.
+ function get(string memory key) public view returns (Variable memory) {
+ return get(vm.getChainId(), key);
+ }
+
+ /// @notice Returns the numerical chain ids for all configured chains.
+ function getChainIds() public view returns (uint256[] memory) {
+ string[] memory keys = _chainKeys;
+
+ uint256[] memory ids = new uint256[](keys.length);
+ for (uint256 i = 0; i < keys.length; i++) {
+ ids[i] = resolveChainId(keys[i]);
+ }
+
+ return ids;
+ }
+
+ /// @notice Reads the RPC URL for a specific chain id.
+ function getRpcUrl(uint256 chainId) public view returns (string memory) {
+ return _rpcOf[chainId];
+ }
+
+ /// @notice Reads the RPC URL for the current chain.
+ function getRpcUrl() public view returns (string memory) {
+ return _rpcOf[vm.getChainId()];
+ }
+
+ // -- SETTER FUNCTIONS (SINGLE VALUES) -------------------------------------
+
+ /// @notice Sets a boolean value for a given key and chain ID.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(uint256 chainId, string memory key, bool value) public {
+ Type memory ty = Type(TypeKind.Bool, false);
+ _ensureTypeConsistency(chainId, key, ty);
+ _dataOf[chainId][key] = abi.encode(value);
+ if (_writeToFile) _writeToToml(chainId, ty.kind.toTomlKey(), key, vm.toString(value));
+ }
+
+ /// @notice Sets a boolean value for a given key on the current chain.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(string memory key, bool value) public {
+ set(vm.getChainId(), key, value);
+ }
+
+ /// @notice Sets an address value for a given key and chain ID.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(uint256 chainId, string memory key, address value) public {
+ Type memory ty = Type(TypeKind.Address, false);
+ _ensureTypeConsistency(chainId, key, ty);
+ _dataOf[chainId][key] = abi.encode(value);
+ if (_writeToFile) _writeToToml(chainId, ty.kind.toTomlKey(), key, _quote(vm.toString(value)));
+ }
+
+ /// @notice Sets an address value for a given key on the current chain.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(string memory key, address value) public {
+ set(vm.getChainId(), key, value);
+ }
+
+ /// @notice Sets a bytes32 value for a given key and chain ID.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(uint256 chainId, string memory key, bytes32 value) public {
+ Type memory ty = Type(TypeKind.Bytes32, false);
+ _ensureTypeConsistency(chainId, key, ty);
+ _dataOf[chainId][key] = abi.encode(value);
+ if (_writeToFile) _writeToToml(chainId, ty.kind.toTomlKey(), key, _quote(vm.toString(value)));
+ }
+
+ /// @notice Sets a bytes32 value for a given key on the current chain.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(string memory key, bytes32 value) public {
+ set(vm.getChainId(), key, value);
+ }
+
+ /// @notice Sets a uint256 value for a given key and chain ID.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(uint256 chainId, string memory key, uint256 value) public {
+ Type memory ty = Type(TypeKind.Uint256, false);
+ _ensureTypeConsistency(chainId, key, ty);
+ _dataOf[chainId][key] = abi.encode(value);
+ if (_writeToFile) _writeToToml(chainId, ty.kind.toTomlKey(), key, vm.toString(value));
+ }
+
+ /// @notice Sets a uint256 value for a given key on the current chain.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(string memory key, uint256 value) public {
+ set(vm.getChainId(), key, value);
+ }
+
+ /// @notice Sets an int256 value for a given key and chain ID.
+ function set(uint256 chainId, string memory key, int256 value) public {
+ Type memory ty = Type(TypeKind.Int256, false);
+ _ensureTypeConsistency(chainId, key, ty);
+ _dataOf[chainId][key] = abi.encode(value);
+ if (_writeToFile) _writeToToml(chainId, ty.kind.toTomlKey(), key, vm.toString(value));
+ }
+
+ /// @notice Sets an int256 value for a given key on the current chain.
+ function set(string memory key, int256 value) public {
+ set(vm.getChainId(), key, value);
+ }
+
+ /// @notice Sets a string value for a given key and chain ID.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(uint256 chainId, string memory key, string memory value) public {
+ Type memory ty = Type(TypeKind.String, false);
+ _ensureTypeConsistency(chainId, key, ty);
+ _dataOf[chainId][key] = abi.encode(value);
+ if (_writeToFile) _writeToToml(chainId, ty.kind.toTomlKey(), key, _quote(value));
+ }
+
+ /// @notice Sets a string value for a given key on the current chain.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(string memory key, string memory value) public {
+ set(vm.getChainId(), key, value);
+ }
+
+ /// @notice Sets a bytes value for a given key and chain ID.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(uint256 chainId, string memory key, bytes memory value) public {
+ Type memory ty = Type(TypeKind.Bytes, false);
+ _ensureTypeConsistency(chainId, key, ty);
+ _dataOf[chainId][key] = abi.encode(value);
+ if (_writeToFile) _writeToToml(chainId, ty.kind.toTomlKey(), key, _quote(vm.toString(value)));
+ }
+
+ /// @notice Sets a bytes value for a given key on the current chain.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(string memory key, bytes memory value) public {
+ set(vm.getChainId(), key, value);
+ }
+
+ // -- SETTER FUNCTIONS (ARRAYS) --------------------------------------------
+
+ /// @notice Sets a boolean array for a given key and chain ID.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(uint256 chainId, string memory key, bool[] memory value) public {
+ Type memory ty = Type(TypeKind.Bool, true);
+ _ensureTypeConsistency(chainId, key, ty);
+ _dataOf[chainId][key] = abi.encode(value);
+ if (_writeToFile) {
+ string memory json = "[";
+ for (uint256 i = 0; i < value.length; i++) {
+ json = string.concat(json, vm.toString(value[i]));
+ if (i < value.length - 1) json = string.concat(json, ",");
+ }
+ json = string.concat(json, "]");
+ _writeToToml(chainId, ty.kind.toTomlKey(), key, json);
+ }
+ }
+
+ /// @notice Sets a boolean array for a given key on the current chain.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(string memory key, bool[] memory value) public {
+ set(vm.getChainId(), key, value);
+ }
+
+ /// @notice Sets an address array for a given key and chain ID.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(uint256 chainId, string memory key, address[] memory value) public {
+ Type memory ty = Type(TypeKind.Address, true);
+ _ensureTypeConsistency(chainId, key, ty);
+ _dataOf[chainId][key] = abi.encode(value);
+ if (_writeToFile) {
+ string memory json = "[";
+ for (uint256 i = 0; i < value.length; i++) {
+ json = string.concat(json, _quote(vm.toString(value[i])));
+ if (i < value.length - 1) json = string.concat(json, ",");
+ }
+ json = string.concat(json, "]");
+ _writeToToml(chainId, ty.kind.toTomlKey(), key, json);
+ }
+ }
+
+ /// @notice Sets an address array for a given key on the current chain.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(string memory key, address[] memory value) public {
+ set(vm.getChainId(), key, value);
+ }
+
+ /// @notice Sets a bytes32 array for a given key and chain ID.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(uint256 chainId, string memory key, bytes32[] memory value) public {
+ Type memory ty = Type(TypeKind.Bytes32, true);
+ _ensureTypeConsistency(chainId, key, ty);
+ _dataOf[chainId][key] = abi.encode(value);
+ if (_writeToFile) {
+ string memory json = "[";
+ for (uint256 i = 0; i < value.length; i++) {
+ json = string.concat(json, _quote(vm.toString(value[i])));
+ if (i < value.length - 1) json = string.concat(json, ",");
+ }
+ json = string.concat(json, "]");
+ _writeToToml(chainId, ty.kind.toTomlKey(), key, json);
+ }
+ }
+
+ /// @notice Sets a bytes32 array for a given key on the current chain.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(string memory key, bytes32[] memory value) public {
+ set(vm.getChainId(), key, value);
+ }
+
+ /// @notice Sets a uint256 array for a given key and chain ID.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(uint256 chainId, string memory key, uint256[] memory value) public {
+ Type memory ty = Type(TypeKind.Uint256, true);
+ _ensureTypeConsistency(chainId, key, ty);
+ _dataOf[chainId][key] = abi.encode(value);
+ if (_writeToFile) {
+ string memory json = "[";
+ for (uint256 i = 0; i < value.length; i++) {
+ json = string.concat(json, vm.toString(value[i]));
+ if (i < value.length - 1) json = string.concat(json, ",");
+ }
+ json = string.concat(json, "]");
+ _writeToToml(chainId, ty.kind.toTomlKey(), key, json);
+ }
+ }
+
+ /// @notice Sets a uint256 array for a given key on the current chain.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(string memory key, uint256[] memory value) public {
+ set(vm.getChainId(), key, value);
+ }
+
+ /// @notice Sets a int256 array for a given key and chain ID.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(uint256 chainId, string memory key, int256[] memory value) public {
+ Type memory ty = Type(TypeKind.Int256, true);
+ _ensureTypeConsistency(chainId, key, ty);
+ _dataOf[chainId][key] = abi.encode(value);
+ if (_writeToFile) {
+ string memory json = "[";
+ for (uint256 i = 0; i < value.length; i++) {
+ json = string.concat(json, vm.toString(value[i]));
+ if (i < value.length - 1) json = string.concat(json, ",");
+ }
+ json = string.concat(json, "]");
+ _writeToToml(chainId, ty.kind.toTomlKey(), key, json);
+ }
+ }
+
+ /// @notice Sets a int256 array for a given key on the current chain.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(string memory key, int256[] memory value) public {
+ set(vm.getChainId(), key, value);
+ }
+
+ /// @notice Sets a string array for a given key and chain ID.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(uint256 chainId, string memory key, string[] memory value) public {
+ Type memory ty = Type(TypeKind.String, true);
+ _ensureTypeConsistency(chainId, key, ty);
+ _dataOf[chainId][key] = abi.encode(value);
+ if (_writeToFile) {
+ string memory json = "[";
+ for (uint256 i = 0; i < value.length; i++) {
+ json = string.concat(json, _quote(value[i]));
+ if (i < value.length - 1) json = string.concat(json, ",");
+ }
+ json = string.concat(json, "]");
+ _writeToToml(chainId, ty.kind.toTomlKey(), key, json);
+ }
+ }
+
+ /// @notice Sets a string array for a given key on the current chain.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(string memory key, string[] memory value) public {
+ set(vm.getChainId(), key, value);
+ }
+
+ /// @notice Sets a bytes array for a given key and chain ID.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(uint256 chainId, string memory key, bytes[] memory value) public {
+ Type memory ty = Type(TypeKind.Bytes, true);
+ _ensureTypeConsistency(chainId, key, ty);
+ _dataOf[chainId][key] = abi.encode(value);
+ if (_writeToFile) {
+ string memory json = "[";
+ for (uint256 i = 0; i < value.length; i++) {
+ json = string.concat(json, _quote(vm.toString(value[i])));
+ if (i < value.length - 1) json = string.concat(json, ",");
+ }
+ json = string.concat(json, "]");
+ _writeToToml(chainId, ty.kind.toTomlKey(), key, json);
+ }
+ }
+
+ /// @notice Sets a bytes array for a given key on the current chain.
+ /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled.
+ function set(string memory key, bytes[] memory value) public {
+ set(vm.getChainId(), key, value);
+ }
+}
diff --git a/contracts/lib/forge-std/src/StdConstants.sol b/contracts/lib/forge-std/src/StdConstants.sol
new file mode 100644
index 0000000..2047d2b
--- /dev/null
+++ b/contracts/lib/forge-std/src/StdConstants.sol
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2 <0.9.0;
+
+import {IMulticall3} from "./interfaces/IMulticall3.sol";
+import {Vm} from "./Vm.sol";
+
+library StdConstants {
+ /// @dev Cheat code address.
+ /// Calculated as `address(uint160(uint256(keccak256("hevm cheat code"))))`.
+ Vm internal constant VM = Vm(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D);
+ /// @dev console.sol and console2.sol work by executing a staticcall to this address.
+ /// Calculated as `address(uint160(uint88(bytes11("console.log"))))`.
+ address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67;
+ /// @dev Used when deploying with create2.
+ /// Taken from https://github.com/Arachnid/deterministic-deployment-proxy.
+ address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;
+ /// @dev The default address for tx.origin and msg.sender.
+ /// Calculated as `address(uint160(uint256(keccak256("foundry default caller"))))`.
+ address internal constant DEFAULT_SENDER = 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38;
+ /// @dev The address of the first contract `CREATE`d by a running test contract.
+ /// When running tests, each test contract is `CREATE`d by `DEFAULT_SENDER` with nonce 1.
+ /// Calculated as `VM.computeCreateAddress(VM.computeCreateAddress(DEFAULT_SENDER, 1), 1)`.
+ address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;
+ /// @dev Deterministic deployment address of the Multicall3 contract.
+ /// Taken from https://www.multicall3.com.
+ IMulticall3 internal constant MULTICALL3_ADDRESS = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);
+ /// @dev The order of the secp256k1 curve.
+ uint256 internal constant SECP256K1_ORDER =
+ 115792089237316195423570985008687907852837564279074904382605163141518161494337;
+}
diff --git a/contracts/lib/forge-std/src/StdError.sol b/contracts/lib/forge-std/src/StdError.sol
new file mode 100644
index 0000000..a302191
--- /dev/null
+++ b/contracts/lib/forge-std/src/StdError.sol
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: MIT
+// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test
+pragma solidity >=0.6.2 <0.9.0;
+
+library stdError {
+ bytes public constant assertionError = abi.encodeWithSignature("Panic(uint256)", 0x01);
+ bytes public constant arithmeticError = abi.encodeWithSignature("Panic(uint256)", 0x11);
+ bytes public constant divisionError = abi.encodeWithSignature("Panic(uint256)", 0x12);
+ bytes public constant enumConversionError = abi.encodeWithSignature("Panic(uint256)", 0x21);
+ bytes public constant encodeStorageError = abi.encodeWithSignature("Panic(uint256)", 0x22);
+ bytes public constant popError = abi.encodeWithSignature("Panic(uint256)", 0x31);
+ bytes public constant indexOOBError = abi.encodeWithSignature("Panic(uint256)", 0x32);
+ bytes public constant memOverflowError = abi.encodeWithSignature("Panic(uint256)", 0x41);
+ bytes public constant zeroVarError = abi.encodeWithSignature("Panic(uint256)", 0x51);
+}
diff --git a/contracts/lib/forge-std/src/StdInvariant.sol b/contracts/lib/forge-std/src/StdInvariant.sol
new file mode 100644
index 0000000..056db98
--- /dev/null
+++ b/contracts/lib/forge-std/src/StdInvariant.sol
@@ -0,0 +1,122 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2 <0.9.0;
+
+pragma experimental ABIEncoderV2;
+
+abstract contract StdInvariant {
+ struct FuzzSelector {
+ address addr;
+ bytes4[] selectors;
+ }
+
+ struct FuzzArtifactSelector {
+ string artifact;
+ bytes4[] selectors;
+ }
+
+ struct FuzzInterface {
+ address addr;
+ string[] artifacts;
+ }
+
+ address[] private _excludedContracts;
+ address[] private _excludedSenders;
+ address[] private _targetedContracts;
+ address[] private _targetedSenders;
+
+ string[] private _excludedArtifacts;
+ string[] private _targetedArtifacts;
+
+ FuzzArtifactSelector[] private _targetedArtifactSelectors;
+
+ FuzzSelector[] private _excludedSelectors;
+ FuzzSelector[] private _targetedSelectors;
+
+ FuzzInterface[] private _targetedInterfaces;
+
+ // Functions for users:
+ // These are intended to be called in tests.
+
+ function excludeContract(address newExcludedContract_) internal {
+ _excludedContracts.push(newExcludedContract_);
+ }
+
+ function excludeSelector(FuzzSelector memory newExcludedSelector_) internal {
+ _excludedSelectors.push(newExcludedSelector_);
+ }
+
+ function excludeSender(address newExcludedSender_) internal {
+ _excludedSenders.push(newExcludedSender_);
+ }
+
+ function excludeArtifact(string memory newExcludedArtifact_) internal {
+ _excludedArtifacts.push(newExcludedArtifact_);
+ }
+
+ function targetArtifact(string memory newTargetedArtifact_) internal {
+ _targetedArtifacts.push(newTargetedArtifact_);
+ }
+
+ function targetArtifactSelector(FuzzArtifactSelector memory newTargetedArtifactSelector_) internal {
+ _targetedArtifactSelectors.push(newTargetedArtifactSelector_);
+ }
+
+ function targetContract(address newTargetedContract_) internal {
+ _targetedContracts.push(newTargetedContract_);
+ }
+
+ function targetSelector(FuzzSelector memory newTargetedSelector_) internal {
+ _targetedSelectors.push(newTargetedSelector_);
+ }
+
+ function targetSender(address newTargetedSender_) internal {
+ _targetedSenders.push(newTargetedSender_);
+ }
+
+ function targetInterface(FuzzInterface memory newTargetedInterface_) internal {
+ _targetedInterfaces.push(newTargetedInterface_);
+ }
+
+ // Functions for forge:
+ // These are called by forge to run invariant tests and don't need to be called in tests.
+
+ function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {
+ excludedArtifacts_ = _excludedArtifacts;
+ }
+
+ function excludeContracts() public view returns (address[] memory excludedContracts_) {
+ excludedContracts_ = _excludedContracts;
+ }
+
+ function excludeSelectors() public view returns (FuzzSelector[] memory excludedSelectors_) {
+ excludedSelectors_ = _excludedSelectors;
+ }
+
+ function excludeSenders() public view returns (address[] memory excludedSenders_) {
+ excludedSenders_ = _excludedSenders;
+ }
+
+ function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {
+ targetedArtifacts_ = _targetedArtifacts;
+ }
+
+ function targetArtifactSelectors() public view returns (FuzzArtifactSelector[] memory targetedArtifactSelectors_) {
+ targetedArtifactSelectors_ = _targetedArtifactSelectors;
+ }
+
+ function targetContracts() public view returns (address[] memory targetedContracts_) {
+ targetedContracts_ = _targetedContracts;
+ }
+
+ function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {
+ targetedSelectors_ = _targetedSelectors;
+ }
+
+ function targetSenders() public view returns (address[] memory targetedSenders_) {
+ targetedSenders_ = _targetedSenders;
+ }
+
+ function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) {
+ targetedInterfaces_ = _targetedInterfaces;
+ }
+}
diff --git a/contracts/lib/forge-std/src/StdJson.sol b/contracts/lib/forge-std/src/StdJson.sol
new file mode 100644
index 0000000..193f89a
--- /dev/null
+++ b/contracts/lib/forge-std/src/StdJson.sol
@@ -0,0 +1,277 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.0 <0.9.0;
+
+pragma experimental ABIEncoderV2;
+
+import {VmSafe} from "./Vm.sol";
+
+// Helpers for parsing and writing JSON files
+// To parse:
+// ```
+// using stdJson for string;
+// string memory json = vm.readFile("");
+// json.readUint("");
+// ```
+// To write:
+// ```
+// using stdJson for string;
+// string memory json = "json";
+// json.serialize("a", uint256(123));
+// string memory semiFinal = json.serialize("b", string("test"));
+// string memory finalJson = json.serialize("c", semiFinal);
+// finalJson.write("");
+// ```
+
+library stdJson {
+ VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code")))));
+
+ function keyExists(string memory json, string memory key) internal view returns (bool) {
+ return vm.keyExistsJson(json, key);
+ }
+
+ function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {
+ return vm.parseJson(json, key);
+ }
+
+ function readUint(string memory json, string memory key) internal pure returns (uint256) {
+ return vm.parseJsonUint(json, key);
+ }
+
+ function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {
+ return vm.parseJsonUintArray(json, key);
+ }
+
+ function readInt(string memory json, string memory key) internal pure returns (int256) {
+ return vm.parseJsonInt(json, key);
+ }
+
+ function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {
+ return vm.parseJsonIntArray(json, key);
+ }
+
+ function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {
+ return vm.parseJsonBytes32(json, key);
+ }
+
+ function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {
+ return vm.parseJsonBytes32Array(json, key);
+ }
+
+ function readString(string memory json, string memory key) internal pure returns (string memory) {
+ return vm.parseJsonString(json, key);
+ }
+
+ function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {
+ return vm.parseJsonStringArray(json, key);
+ }
+
+ function readAddress(string memory json, string memory key) internal pure returns (address) {
+ return vm.parseJsonAddress(json, key);
+ }
+
+ function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {
+ return vm.parseJsonAddressArray(json, key);
+ }
+
+ function readBool(string memory json, string memory key) internal pure returns (bool) {
+ return vm.parseJsonBool(json, key);
+ }
+
+ function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {
+ return vm.parseJsonBoolArray(json, key);
+ }
+
+ function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {
+ return vm.parseJsonBytes(json, key);
+ }
+
+ function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {
+ return vm.parseJsonBytesArray(json, key);
+ }
+
+ function readUintOr(string memory json, string memory key, uint256 defaultValue) internal view returns (uint256) {
+ return keyExists(json, key) ? readUint(json, key) : defaultValue;
+ }
+
+ function readUintArrayOr(string memory json, string memory key, uint256[] memory defaultValue)
+ internal
+ view
+ returns (uint256[] memory)
+ {
+ return keyExists(json, key) ? readUintArray(json, key) : defaultValue;
+ }
+
+ function readIntOr(string memory json, string memory key, int256 defaultValue) internal view returns (int256) {
+ return keyExists(json, key) ? readInt(json, key) : defaultValue;
+ }
+
+ function readIntArrayOr(string memory json, string memory key, int256[] memory defaultValue)
+ internal
+ view
+ returns (int256[] memory)
+ {
+ return keyExists(json, key) ? readIntArray(json, key) : defaultValue;
+ }
+
+ function readBytes32Or(string memory json, string memory key, bytes32 defaultValue)
+ internal
+ view
+ returns (bytes32)
+ {
+ return keyExists(json, key) ? readBytes32(json, key) : defaultValue;
+ }
+
+ function readBytes32ArrayOr(string memory json, string memory key, bytes32[] memory defaultValue)
+ internal
+ view
+ returns (bytes32[] memory)
+ {
+ return keyExists(json, key) ? readBytes32Array(json, key) : defaultValue;
+ }
+
+ function readStringOr(string memory json, string memory key, string memory defaultValue)
+ internal
+ view
+ returns (string memory)
+ {
+ return keyExists(json, key) ? readString(json, key) : defaultValue;
+ }
+
+ function readStringArrayOr(string memory json, string memory key, string[] memory defaultValue)
+ internal
+ view
+ returns (string[] memory)
+ {
+ return keyExists(json, key) ? readStringArray(json, key) : defaultValue;
+ }
+
+ function readAddressOr(string memory json, string memory key, address defaultValue)
+ internal
+ view
+ returns (address)
+ {
+ return keyExists(json, key) ? readAddress(json, key) : defaultValue;
+ }
+
+ function readAddressArrayOr(string memory json, string memory key, address[] memory defaultValue)
+ internal
+ view
+ returns (address[] memory)
+ {
+ return keyExists(json, key) ? readAddressArray(json, key) : defaultValue;
+ }
+
+ function readBoolOr(string memory json, string memory key, bool defaultValue) internal view returns (bool) {
+ return keyExists(json, key) ? readBool(json, key) : defaultValue;
+ }
+
+ function readBoolArrayOr(string memory json, string memory key, bool[] memory defaultValue)
+ internal
+ view
+ returns (bool[] memory)
+ {
+ return keyExists(json, key) ? readBoolArray(json, key) : defaultValue;
+ }
+
+ function readBytesOr(string memory json, string memory key, bytes memory defaultValue)
+ internal
+ view
+ returns (bytes memory)
+ {
+ return keyExists(json, key) ? readBytes(json, key) : defaultValue;
+ }
+
+ function readBytesArrayOr(string memory json, string memory key, bytes[] memory defaultValue)
+ internal
+ view
+ returns (bytes[] memory)
+ {
+ return keyExists(json, key) ? readBytesArray(json, key) : defaultValue;
+ }
+
+ function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {
+ return vm.serializeJson(jsonKey, rootObject);
+ }
+
+ function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {
+ return vm.serializeBool(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, bool[] memory value) internal returns (string memory) {
+ return vm.serializeBool(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {
+ return vm.serializeUint(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, uint256[] memory value)
+ internal
+ returns (string memory)
+ {
+ return vm.serializeUint(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {
+ return vm.serializeInt(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, int256[] memory value)
+ internal
+ returns (string memory)
+ {
+ return vm.serializeInt(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {
+ return vm.serializeAddress(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, address[] memory value)
+ internal
+ returns (string memory)
+ {
+ return vm.serializeAddress(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {
+ return vm.serializeBytes32(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, bytes32[] memory value)
+ internal
+ returns (string memory)
+ {
+ return vm.serializeBytes32(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {
+ return vm.serializeBytes(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, bytes[] memory value)
+ internal
+ returns (string memory)
+ {
+ return vm.serializeBytes(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, string memory value) internal returns (string memory) {
+ return vm.serializeString(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, string[] memory value)
+ internal
+ returns (string memory)
+ {
+ return vm.serializeString(jsonKey, key, value);
+ }
+
+ function write(string memory jsonKey, string memory path) internal {
+ vm.writeJson(jsonKey, path);
+ }
+
+ function write(string memory jsonKey, string memory path, string memory valueKey) internal {
+ vm.writeJson(jsonKey, path, valueKey);
+ }
+}
diff --git a/contracts/lib/forge-std/src/StdMath.sol b/contracts/lib/forge-std/src/StdMath.sol
new file mode 100644
index 0000000..0fe6106
--- /dev/null
+++ b/contracts/lib/forge-std/src/StdMath.sol
@@ -0,0 +1,47 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2 <0.9.0;
+
+library stdMath {
+ int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968;
+
+ function abs(int256 a) internal pure returns (uint256) {
+ // Required or it will fail when `a = type(int256).min`
+ if (a == INT256_MIN) {
+ return 57896044618658097711785492504343953926634992332820282019728792003956564819968;
+ }
+
+ return uint256(a > 0 ? a : -a);
+ }
+
+ function delta(uint256 a, uint256 b) internal pure returns (uint256) {
+ return a > b ? a - b : b - a;
+ }
+
+ function delta(int256 a, int256 b) internal pure returns (uint256) {
+ // a and b are of the same sign
+ // this works thanks to two's complement, the left-most bit is the sign bit
+ if ((a ^ b) > -1) {
+ return delta(abs(a), abs(b));
+ }
+
+ // a and b are of opposite signs
+ return abs(a) + abs(b);
+ }
+
+ function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) {
+ // Prevent division by zero
+ require(b != 0, "stdMath percentDelta(uint256,uint256): Divisor is zero");
+ uint256 absDelta = delta(a, b);
+
+ return absDelta * 1e18 / b;
+ }
+
+ function percentDelta(int256 a, int256 b) internal pure returns (uint256) {
+ uint256 absDelta = delta(a, b);
+ uint256 absB = abs(b);
+ // Prevent division by zero
+ require(absB != 0, "stdMath percentDelta(int256,int256): Divisor is zero");
+
+ return absDelta * 1e18 / absB;
+ }
+}
diff --git a/contracts/lib/forge-std/src/StdStorage.sol b/contracts/lib/forge-std/src/StdStorage.sol
new file mode 100644
index 0000000..50b5f4c
--- /dev/null
+++ b/contracts/lib/forge-std/src/StdStorage.sol
@@ -0,0 +1,473 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2 <0.9.0;
+
+import {Vm} from "./Vm.sol";
+
+struct FindData {
+ uint256 slot;
+ uint256 offsetLeft;
+ uint256 offsetRight;
+ bool found;
+}
+
+struct StdStorage {
+ mapping(address => mapping(bytes4 => mapping(bytes32 => FindData))) finds;
+ bytes32[] _keys;
+ bytes4 _sig;
+ uint256 _depth;
+ address _target;
+ bytes32 _set;
+ bool _enable_packed_slots;
+ bytes _calldata;
+}
+
+library stdStorageSafe {
+ event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot);
+ event WARNING_UninitedSlot(address who, uint256 slot);
+
+ Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code")))));
+ uint256 constant UINT256_MAX = 115792089237316195423570985008687907853269984665640564039457584007913129639935;
+
+ function sigs(string memory sigStr) internal pure returns (bytes4) {
+ return bytes4(keccak256(bytes(sigStr)));
+ }
+
+ function getCallParams(StdStorage storage self) internal view returns (bytes memory) {
+ if (self._calldata.length == 0) {
+ return flatten(self._keys);
+ } else {
+ return self._calldata;
+ }
+ }
+
+ // Calls target contract with configured parameters
+ function callTarget(StdStorage storage self) internal view returns (bool, bytes32) {
+ bytes memory cd = abi.encodePacked(self._sig, getCallParams(self));
+ (bool success, bytes memory rdat) = self._target.staticcall(cd);
+ bytes32 result = bytesToBytes32(rdat, 32 * self._depth);
+
+ return (success, result);
+ }
+
+ // Tries mutating slot value to determine if the targeted value is stored in it.
+ // If current value is 0, then we are setting slot value to type(uint256).max
+ // Otherwise, we set it to 0. That way, return value should always be affected.
+ function checkSlotMutatesCall(StdStorage storage self, bytes32 slot) internal returns (bool) {
+ bytes32 prevSlotValue = vm.load(self._target, slot);
+ (bool success, bytes32 prevReturnValue) = callTarget(self);
+
+ bytes32 testVal = prevReturnValue == bytes32(0) ? bytes32(UINT256_MAX) : bytes32(0);
+ vm.store(self._target, slot, testVal);
+
+ (, bytes32 newReturnValue) = callTarget(self);
+
+ vm.store(self._target, slot, prevSlotValue);
+
+ return (success && (prevReturnValue != newReturnValue));
+ }
+
+ // Tries setting one of the bits in slot to 1 until return value changes.
+ // Index of resulted bit is an offset packed slot has from left/right side
+ function findOffset(StdStorage storage self, bytes32 slot, bool left) internal returns (bool, uint256) {
+ for (uint256 offset = 0; offset < 256; offset++) {
+ uint256 valueToPut = left ? (1 << (255 - offset)) : (1 << offset);
+ vm.store(self._target, slot, bytes32(valueToPut));
+
+ (bool success, bytes32 data) = callTarget(self);
+
+ if (success && (uint256(data) > 0)) {
+ return (true, offset);
+ }
+ }
+ return (false, 0);
+ }
+
+ function findOffsets(StdStorage storage self, bytes32 slot) internal returns (bool, uint256, uint256) {
+ bytes32 prevSlotValue = vm.load(self._target, slot);
+
+ (bool foundLeft, uint256 offsetLeft) = findOffset(self, slot, true);
+ (bool foundRight, uint256 offsetRight) = findOffset(self, slot, false);
+
+ // `findOffset` may mutate slot value, so we are setting it to initial value
+ vm.store(self._target, slot, prevSlotValue);
+ return (foundLeft && foundRight, offsetLeft, offsetRight);
+ }
+
+ function find(StdStorage storage self) internal returns (FindData storage) {
+ return find(self, true);
+ }
+
+ /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against
+ // slot complexity:
+ // if flat, will be bytes32(uint256(uint));
+ // if map, will be keccak256(abi.encode(key, uint(slot)));
+ // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))));
+ // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth);
+ function find(StdStorage storage self, bool _clear) internal returns (FindData storage) {
+ address who = self._target;
+ bytes4 fsig = self._sig;
+ uint256 field_depth = self._depth;
+ bytes memory params = getCallParams(self);
+
+ // calldata to test against
+ if (self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))].found) {
+ if (_clear) {
+ clear(self);
+ }
+ return self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))];
+ }
+ vm.record();
+ (, bytes32 callResult) = callTarget(self);
+ (bytes32[] memory reads,) = vm.accesses(address(who));
+
+ if (reads.length == 0) {
+ revert("stdStorage find(StdStorage): No storage use detected for target.");
+ } else {
+ for (uint256 i = reads.length; --i >= 0;) {
+ bytes32 prev = vm.load(who, reads[i]);
+ if (prev == bytes32(0)) {
+ emit WARNING_UninitedSlot(who, uint256(reads[i]));
+ }
+
+ if (!checkSlotMutatesCall(self, reads[i])) {
+ continue;
+ }
+
+ (uint256 offsetLeft, uint256 offsetRight) = (0, 0);
+
+ if (self._enable_packed_slots) {
+ bool found;
+ (found, offsetLeft, offsetRight) = findOffsets(self, reads[i]);
+ if (!found) {
+ continue;
+ }
+ }
+
+ // Check that value between found offsets is equal to the current call result
+ uint256 curVal = (uint256(prev) & getMaskByOffsets(offsetLeft, offsetRight)) >> offsetRight;
+
+ if (uint256(callResult) != curVal) {
+ continue;
+ }
+
+ emit SlotFound(who, fsig, keccak256(abi.encodePacked(params, field_depth)), uint256(reads[i]));
+ self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))] =
+ FindData(uint256(reads[i]), offsetLeft, offsetRight, true);
+ break;
+ }
+ }
+
+ require(
+ self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))].found,
+ "stdStorage find(StdStorage): Slot(s) not found."
+ );
+
+ if (_clear) {
+ clear(self);
+ }
+ return self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))];
+ }
+
+ function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {
+ self._target = _target;
+ return self;
+ }
+
+ function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {
+ self._sig = _sig;
+ return self;
+ }
+
+ function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {
+ self._sig = sigs(_sig);
+ return self;
+ }
+
+ function with_calldata(StdStorage storage self, bytes memory _calldata) internal returns (StdStorage storage) {
+ self._calldata = _calldata;
+ return self;
+ }
+
+ function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {
+ self._keys.push(bytes32(uint256(uint160(who))));
+ return self;
+ }
+
+ function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {
+ self._keys.push(bytes32(amt));
+ return self;
+ }
+
+ function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {
+ self._keys.push(key);
+ return self;
+ }
+
+ function enable_packed_slots(StdStorage storage self) internal returns (StdStorage storage) {
+ self._enable_packed_slots = true;
+ return self;
+ }
+
+ function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {
+ self._depth = _depth;
+ return self;
+ }
+
+ function read(StdStorage storage self) private returns (bytes memory) {
+ FindData storage data = find(self, false);
+ uint256 mask = getMaskByOffsets(data.offsetLeft, data.offsetRight);
+ uint256 value = (uint256(vm.load(self._target, bytes32(data.slot))) & mask) >> data.offsetRight;
+ clear(self);
+ return abi.encode(value);
+ }
+
+ function read_bytes32(StdStorage storage self) internal returns (bytes32) {
+ return abi.decode(read(self), (bytes32));
+ }
+
+ function read_bool(StdStorage storage self) internal returns (bool) {
+ int256 v = read_int(self);
+ if (v == 0) return false;
+ if (v == 1) return true;
+ revert("stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.");
+ }
+
+ function read_address(StdStorage storage self) internal returns (address) {
+ return abi.decode(read(self), (address));
+ }
+
+ function read_uint(StdStorage storage self) internal returns (uint256) {
+ return abi.decode(read(self), (uint256));
+ }
+
+ function read_int(StdStorage storage self) internal returns (int256) {
+ return abi.decode(read(self), (int256));
+ }
+
+ function parent(StdStorage storage self) internal returns (uint256, bytes32) {
+ address who = self._target;
+ uint256 field_depth = self._depth;
+ vm.startMappingRecording();
+ uint256 child = find(self, true).slot - field_depth;
+ (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));
+ if (!found) {
+ revert(
+ "stdStorage parent(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called."
+ );
+ }
+ return (uint256(parent_slot), key);
+ }
+
+ function root(StdStorage storage self) internal returns (uint256) {
+ address who = self._target;
+ uint256 field_depth = self._depth;
+ vm.startMappingRecording();
+ uint256 child = find(self, true).slot - field_depth;
+ bool found;
+ bytes32 root_slot;
+ bytes32 parent_slot;
+ (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child));
+ if (!found) {
+ revert(
+ "stdStorage root(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called."
+ );
+ }
+ while (found) {
+ root_slot = parent_slot;
+ (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot));
+ }
+ return uint256(root_slot);
+ }
+
+ function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) {
+ bytes32 out;
+
+ uint256 max = b.length > 32 ? 32 : b.length;
+ for (uint256 i = 0; i < max; i++) {
+ out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);
+ }
+ return out;
+ }
+
+ function flatten(bytes32[] memory b) private pure returns (bytes memory) {
+ bytes memory result = new bytes(b.length * 32);
+ for (uint256 i = 0; i < b.length; i++) {
+ bytes32 k = b[i];
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(add(result, add(32, mul(32, i))), k)
+ }
+ }
+
+ return result;
+ }
+
+ function clear(StdStorage storage self) internal {
+ delete self._target;
+ delete self._sig;
+ delete self._keys;
+ delete self._depth;
+ delete self._enable_packed_slots;
+ delete self._calldata;
+ }
+
+ // Returns mask which contains non-zero bits for values between `offsetLeft` and `offsetRight`
+ // (slotValue & mask) >> offsetRight will be the value of the given packed variable
+ function getMaskByOffsets(uint256 offsetLeft, uint256 offsetRight) internal pure returns (uint256 mask) {
+ // mask = ((1 << (256 - (offsetRight + offsetLeft))) - 1) << offsetRight;
+ // using assembly because (1 << 256) causes overflow
+ assembly {
+ mask := shl(offsetRight, sub(shl(sub(256, add(offsetRight, offsetLeft)), 1), 1))
+ }
+ }
+
+ // Returns slot value with updated packed variable.
+ function getUpdatedSlotValue(bytes32 curValue, uint256 varValue, uint256 offsetLeft, uint256 offsetRight)
+ internal
+ pure
+ returns (bytes32 newValue)
+ {
+ return bytes32((uint256(curValue) & ~getMaskByOffsets(offsetLeft, offsetRight)) | (varValue << offsetRight));
+ }
+}
+
+library stdStorage {
+ Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code")))));
+
+ function sigs(string memory sigStr) internal pure returns (bytes4) {
+ return stdStorageSafe.sigs(sigStr);
+ }
+
+ function find(StdStorage storage self) internal returns (uint256) {
+ return find(self, true);
+ }
+
+ function find(StdStorage storage self, bool _clear) internal returns (uint256) {
+ return stdStorageSafe.find(self, _clear).slot;
+ }
+
+ function target(StdStorage storage self, address _target) internal returns (StdStorage storage) {
+ return stdStorageSafe.target(self, _target);
+ }
+
+ function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) {
+ return stdStorageSafe.sig(self, _sig);
+ }
+
+ function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) {
+ return stdStorageSafe.sig(self, _sig);
+ }
+
+ function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) {
+ return stdStorageSafe.with_key(self, who);
+ }
+
+ function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) {
+ return stdStorageSafe.with_key(self, amt);
+ }
+
+ function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) {
+ return stdStorageSafe.with_key(self, key);
+ }
+
+ function with_calldata(StdStorage storage self, bytes memory _calldata) internal returns (StdStorage storage) {
+ return stdStorageSafe.with_calldata(self, _calldata);
+ }
+
+ function enable_packed_slots(StdStorage storage self) internal returns (StdStorage storage) {
+ return stdStorageSafe.enable_packed_slots(self);
+ }
+
+ function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) {
+ return stdStorageSafe.depth(self, _depth);
+ }
+
+ function clear(StdStorage storage self) internal {
+ stdStorageSafe.clear(self);
+ }
+
+ function checked_write(StdStorage storage self, address who) internal {
+ checked_write(self, bytes32(uint256(uint160(who))));
+ }
+
+ function checked_write(StdStorage storage self, uint256 amt) internal {
+ checked_write(self, bytes32(amt));
+ }
+
+ function checked_write_int(StdStorage storage self, int256 val) internal {
+ checked_write(self, bytes32(uint256(val)));
+ }
+
+ function checked_write(StdStorage storage self, bool write) internal {
+ bytes32 t;
+ /// @solidity memory-safe-assembly
+ assembly {
+ t := write
+ }
+ checked_write(self, t);
+ }
+
+ function checked_write(StdStorage storage self, bytes32 set) internal {
+ address who = self._target;
+ bytes4 fsig = self._sig;
+ uint256 field_depth = self._depth;
+ bytes memory params = stdStorageSafe.getCallParams(self);
+
+ if (!self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))].found) {
+ find(self, false);
+ }
+ FindData storage data = self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))];
+ if ((data.offsetLeft + data.offsetRight) > 0) {
+ uint256 maxVal = 2 ** (256 - (data.offsetLeft + data.offsetRight));
+ require(
+ uint256(set) < maxVal,
+ string(
+ abi.encodePacked(
+ "stdStorage find(StdStorage): Packed slot. We can't fit value greater than ",
+ vm.toString(maxVal)
+ )
+ )
+ );
+ }
+ bytes32 curVal = vm.load(who, bytes32(data.slot));
+ bytes32 valToSet = stdStorageSafe.getUpdatedSlotValue(curVal, uint256(set), data.offsetLeft, data.offsetRight);
+
+ vm.store(who, bytes32(data.slot), valToSet);
+
+ (bool success, bytes32 callResult) = stdStorageSafe.callTarget(self);
+
+ if (!success || callResult != set) {
+ vm.store(who, bytes32(data.slot), curVal);
+ revert("stdStorage find(StdStorage): Failed to write value.");
+ }
+ clear(self);
+ }
+
+ function read_bytes32(StdStorage storage self) internal returns (bytes32) {
+ return stdStorageSafe.read_bytes32(self);
+ }
+
+ function read_bool(StdStorage storage self) internal returns (bool) {
+ return stdStorageSafe.read_bool(self);
+ }
+
+ function read_address(StdStorage storage self) internal returns (address) {
+ return stdStorageSafe.read_address(self);
+ }
+
+ function read_uint(StdStorage storage self) internal returns (uint256) {
+ return stdStorageSafe.read_uint(self);
+ }
+
+ function read_int(StdStorage storage self) internal returns (int256) {
+ return stdStorageSafe.read_int(self);
+ }
+
+ function parent(StdStorage storage self) internal returns (uint256, bytes32) {
+ return stdStorageSafe.parent(self);
+ }
+
+ function root(StdStorage storage self) internal returns (uint256) {
+ return stdStorageSafe.root(self);
+ }
+}
diff --git a/contracts/lib/forge-std/src/StdStyle.sol b/contracts/lib/forge-std/src/StdStyle.sol
new file mode 100644
index 0000000..d371e0c
--- /dev/null
+++ b/contracts/lib/forge-std/src/StdStyle.sol
@@ -0,0 +1,333 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.4.22 <0.9.0;
+
+import {VmSafe} from "./Vm.sol";
+
+library StdStyle {
+ VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code")))));
+
+ string constant RED = "\u001b[91m";
+ string constant GREEN = "\u001b[92m";
+ string constant YELLOW = "\u001b[93m";
+ string constant BLUE = "\u001b[94m";
+ string constant MAGENTA = "\u001b[95m";
+ string constant CYAN = "\u001b[96m";
+ string constant BOLD = "\u001b[1m";
+ string constant DIM = "\u001b[2m";
+ string constant ITALIC = "\u001b[3m";
+ string constant UNDERLINE = "\u001b[4m";
+ string constant INVERSE = "\u001b[7m";
+ string constant RESET = "\u001b[0m";
+
+ function styleConcat(string memory style, string memory self) private pure returns (string memory) {
+ return string(abi.encodePacked(style, self, RESET));
+ }
+
+ function red(string memory self) internal pure returns (string memory) {
+ return styleConcat(RED, self);
+ }
+
+ function red(uint256 self) internal pure returns (string memory) {
+ return red(vm.toString(self));
+ }
+
+ function red(int256 self) internal pure returns (string memory) {
+ return red(vm.toString(self));
+ }
+
+ function red(address self) internal pure returns (string memory) {
+ return red(vm.toString(self));
+ }
+
+ function red(bool self) internal pure returns (string memory) {
+ return red(vm.toString(self));
+ }
+
+ function redBytes(bytes memory self) internal pure returns (string memory) {
+ return red(vm.toString(self));
+ }
+
+ function redBytes32(bytes32 self) internal pure returns (string memory) {
+ return red(vm.toString(self));
+ }
+
+ function green(string memory self) internal pure returns (string memory) {
+ return styleConcat(GREEN, self);
+ }
+
+ function green(uint256 self) internal pure returns (string memory) {
+ return green(vm.toString(self));
+ }
+
+ function green(int256 self) internal pure returns (string memory) {
+ return green(vm.toString(self));
+ }
+
+ function green(address self) internal pure returns (string memory) {
+ return green(vm.toString(self));
+ }
+
+ function green(bool self) internal pure returns (string memory) {
+ return green(vm.toString(self));
+ }
+
+ function greenBytes(bytes memory self) internal pure returns (string memory) {
+ return green(vm.toString(self));
+ }
+
+ function greenBytes32(bytes32 self) internal pure returns (string memory) {
+ return green(vm.toString(self));
+ }
+
+ function yellow(string memory self) internal pure returns (string memory) {
+ return styleConcat(YELLOW, self);
+ }
+
+ function yellow(uint256 self) internal pure returns (string memory) {
+ return yellow(vm.toString(self));
+ }
+
+ function yellow(int256 self) internal pure returns (string memory) {
+ return yellow(vm.toString(self));
+ }
+
+ function yellow(address self) internal pure returns (string memory) {
+ return yellow(vm.toString(self));
+ }
+
+ function yellow(bool self) internal pure returns (string memory) {
+ return yellow(vm.toString(self));
+ }
+
+ function yellowBytes(bytes memory self) internal pure returns (string memory) {
+ return yellow(vm.toString(self));
+ }
+
+ function yellowBytes32(bytes32 self) internal pure returns (string memory) {
+ return yellow(vm.toString(self));
+ }
+
+ function blue(string memory self) internal pure returns (string memory) {
+ return styleConcat(BLUE, self);
+ }
+
+ function blue(uint256 self) internal pure returns (string memory) {
+ return blue(vm.toString(self));
+ }
+
+ function blue(int256 self) internal pure returns (string memory) {
+ return blue(vm.toString(self));
+ }
+
+ function blue(address self) internal pure returns (string memory) {
+ return blue(vm.toString(self));
+ }
+
+ function blue(bool self) internal pure returns (string memory) {
+ return blue(vm.toString(self));
+ }
+
+ function blueBytes(bytes memory self) internal pure returns (string memory) {
+ return blue(vm.toString(self));
+ }
+
+ function blueBytes32(bytes32 self) internal pure returns (string memory) {
+ return blue(vm.toString(self));
+ }
+
+ function magenta(string memory self) internal pure returns (string memory) {
+ return styleConcat(MAGENTA, self);
+ }
+
+ function magenta(uint256 self) internal pure returns (string memory) {
+ return magenta(vm.toString(self));
+ }
+
+ function magenta(int256 self) internal pure returns (string memory) {
+ return magenta(vm.toString(self));
+ }
+
+ function magenta(address self) internal pure returns (string memory) {
+ return magenta(vm.toString(self));
+ }
+
+ function magenta(bool self) internal pure returns (string memory) {
+ return magenta(vm.toString(self));
+ }
+
+ function magentaBytes(bytes memory self) internal pure returns (string memory) {
+ return magenta(vm.toString(self));
+ }
+
+ function magentaBytes32(bytes32 self) internal pure returns (string memory) {
+ return magenta(vm.toString(self));
+ }
+
+ function cyan(string memory self) internal pure returns (string memory) {
+ return styleConcat(CYAN, self);
+ }
+
+ function cyan(uint256 self) internal pure returns (string memory) {
+ return cyan(vm.toString(self));
+ }
+
+ function cyan(int256 self) internal pure returns (string memory) {
+ return cyan(vm.toString(self));
+ }
+
+ function cyan(address self) internal pure returns (string memory) {
+ return cyan(vm.toString(self));
+ }
+
+ function cyan(bool self) internal pure returns (string memory) {
+ return cyan(vm.toString(self));
+ }
+
+ function cyanBytes(bytes memory self) internal pure returns (string memory) {
+ return cyan(vm.toString(self));
+ }
+
+ function cyanBytes32(bytes32 self) internal pure returns (string memory) {
+ return cyan(vm.toString(self));
+ }
+
+ function bold(string memory self) internal pure returns (string memory) {
+ return styleConcat(BOLD, self);
+ }
+
+ function bold(uint256 self) internal pure returns (string memory) {
+ return bold(vm.toString(self));
+ }
+
+ function bold(int256 self) internal pure returns (string memory) {
+ return bold(vm.toString(self));
+ }
+
+ function bold(address self) internal pure returns (string memory) {
+ return bold(vm.toString(self));
+ }
+
+ function bold(bool self) internal pure returns (string memory) {
+ return bold(vm.toString(self));
+ }
+
+ function boldBytes(bytes memory self) internal pure returns (string memory) {
+ return bold(vm.toString(self));
+ }
+
+ function boldBytes32(bytes32 self) internal pure returns (string memory) {
+ return bold(vm.toString(self));
+ }
+
+ function dim(string memory self) internal pure returns (string memory) {
+ return styleConcat(DIM, self);
+ }
+
+ function dim(uint256 self) internal pure returns (string memory) {
+ return dim(vm.toString(self));
+ }
+
+ function dim(int256 self) internal pure returns (string memory) {
+ return dim(vm.toString(self));
+ }
+
+ function dim(address self) internal pure returns (string memory) {
+ return dim(vm.toString(self));
+ }
+
+ function dim(bool self) internal pure returns (string memory) {
+ return dim(vm.toString(self));
+ }
+
+ function dimBytes(bytes memory self) internal pure returns (string memory) {
+ return dim(vm.toString(self));
+ }
+
+ function dimBytes32(bytes32 self) internal pure returns (string memory) {
+ return dim(vm.toString(self));
+ }
+
+ function italic(string memory self) internal pure returns (string memory) {
+ return styleConcat(ITALIC, self);
+ }
+
+ function italic(uint256 self) internal pure returns (string memory) {
+ return italic(vm.toString(self));
+ }
+
+ function italic(int256 self) internal pure returns (string memory) {
+ return italic(vm.toString(self));
+ }
+
+ function italic(address self) internal pure returns (string memory) {
+ return italic(vm.toString(self));
+ }
+
+ function italic(bool self) internal pure returns (string memory) {
+ return italic(vm.toString(self));
+ }
+
+ function italicBytes(bytes memory self) internal pure returns (string memory) {
+ return italic(vm.toString(self));
+ }
+
+ function italicBytes32(bytes32 self) internal pure returns (string memory) {
+ return italic(vm.toString(self));
+ }
+
+ function underline(string memory self) internal pure returns (string memory) {
+ return styleConcat(UNDERLINE, self);
+ }
+
+ function underline(uint256 self) internal pure returns (string memory) {
+ return underline(vm.toString(self));
+ }
+
+ function underline(int256 self) internal pure returns (string memory) {
+ return underline(vm.toString(self));
+ }
+
+ function underline(address self) internal pure returns (string memory) {
+ return underline(vm.toString(self));
+ }
+
+ function underline(bool self) internal pure returns (string memory) {
+ return underline(vm.toString(self));
+ }
+
+ function underlineBytes(bytes memory self) internal pure returns (string memory) {
+ return underline(vm.toString(self));
+ }
+
+ function underlineBytes32(bytes32 self) internal pure returns (string memory) {
+ return underline(vm.toString(self));
+ }
+
+ function inverse(string memory self) internal pure returns (string memory) {
+ return styleConcat(INVERSE, self);
+ }
+
+ function inverse(uint256 self) internal pure returns (string memory) {
+ return inverse(vm.toString(self));
+ }
+
+ function inverse(int256 self) internal pure returns (string memory) {
+ return inverse(vm.toString(self));
+ }
+
+ function inverse(address self) internal pure returns (string memory) {
+ return inverse(vm.toString(self));
+ }
+
+ function inverse(bool self) internal pure returns (string memory) {
+ return inverse(vm.toString(self));
+ }
+
+ function inverseBytes(bytes memory self) internal pure returns (string memory) {
+ return inverse(vm.toString(self));
+ }
+
+ function inverseBytes32(bytes32 self) internal pure returns (string memory) {
+ return inverse(vm.toString(self));
+ }
+}
diff --git a/contracts/lib/forge-std/src/StdToml.sol b/contracts/lib/forge-std/src/StdToml.sol
new file mode 100644
index 0000000..7ea92e2
--- /dev/null
+++ b/contracts/lib/forge-std/src/StdToml.sol
@@ -0,0 +1,277 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.0 <0.9.0;
+
+pragma experimental ABIEncoderV2;
+
+import {VmSafe} from "./Vm.sol";
+
+// Helpers for parsing and writing TOML files
+// To parse:
+// ```
+// using stdToml for string;
+// string memory toml = vm.readFile("");
+// toml.readUint("");
+// ```
+// To write:
+// ```
+// using stdToml for string;
+// string memory json = "json";
+// json.serialize("a", uint256(123));
+// string memory semiFinal = json.serialize("b", string("test"));
+// string memory finalJson = json.serialize("c", semiFinal);
+// finalJson.write("");
+// ```
+
+library stdToml {
+ VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code")))));
+
+ function keyExists(string memory toml, string memory key) internal view returns (bool) {
+ return vm.keyExistsToml(toml, key);
+ }
+
+ function parseRaw(string memory toml, string memory key) internal pure returns (bytes memory) {
+ return vm.parseToml(toml, key);
+ }
+
+ function readUint(string memory toml, string memory key) internal pure returns (uint256) {
+ return vm.parseTomlUint(toml, key);
+ }
+
+ function readUintArray(string memory toml, string memory key) internal pure returns (uint256[] memory) {
+ return vm.parseTomlUintArray(toml, key);
+ }
+
+ function readInt(string memory toml, string memory key) internal pure returns (int256) {
+ return vm.parseTomlInt(toml, key);
+ }
+
+ function readIntArray(string memory toml, string memory key) internal pure returns (int256[] memory) {
+ return vm.parseTomlIntArray(toml, key);
+ }
+
+ function readBytes32(string memory toml, string memory key) internal pure returns (bytes32) {
+ return vm.parseTomlBytes32(toml, key);
+ }
+
+ function readBytes32Array(string memory toml, string memory key) internal pure returns (bytes32[] memory) {
+ return vm.parseTomlBytes32Array(toml, key);
+ }
+
+ function readString(string memory toml, string memory key) internal pure returns (string memory) {
+ return vm.parseTomlString(toml, key);
+ }
+
+ function readStringArray(string memory toml, string memory key) internal pure returns (string[] memory) {
+ return vm.parseTomlStringArray(toml, key);
+ }
+
+ function readAddress(string memory toml, string memory key) internal pure returns (address) {
+ return vm.parseTomlAddress(toml, key);
+ }
+
+ function readAddressArray(string memory toml, string memory key) internal pure returns (address[] memory) {
+ return vm.parseTomlAddressArray(toml, key);
+ }
+
+ function readBool(string memory toml, string memory key) internal pure returns (bool) {
+ return vm.parseTomlBool(toml, key);
+ }
+
+ function readBoolArray(string memory toml, string memory key) internal pure returns (bool[] memory) {
+ return vm.parseTomlBoolArray(toml, key);
+ }
+
+ function readBytes(string memory toml, string memory key) internal pure returns (bytes memory) {
+ return vm.parseTomlBytes(toml, key);
+ }
+
+ function readBytesArray(string memory toml, string memory key) internal pure returns (bytes[] memory) {
+ return vm.parseTomlBytesArray(toml, key);
+ }
+
+ function readUintOr(string memory toml, string memory key, uint256 defaultValue) internal view returns (uint256) {
+ return keyExists(toml, key) ? readUint(toml, key) : defaultValue;
+ }
+
+ function readUintArrayOr(string memory toml, string memory key, uint256[] memory defaultValue)
+ internal
+ view
+ returns (uint256[] memory)
+ {
+ return keyExists(toml, key) ? readUintArray(toml, key) : defaultValue;
+ }
+
+ function readIntOr(string memory toml, string memory key, int256 defaultValue) internal view returns (int256) {
+ return keyExists(toml, key) ? readInt(toml, key) : defaultValue;
+ }
+
+ function readIntArrayOr(string memory toml, string memory key, int256[] memory defaultValue)
+ internal
+ view
+ returns (int256[] memory)
+ {
+ return keyExists(toml, key) ? readIntArray(toml, key) : defaultValue;
+ }
+
+ function readBytes32Or(string memory toml, string memory key, bytes32 defaultValue)
+ internal
+ view
+ returns (bytes32)
+ {
+ return keyExists(toml, key) ? readBytes32(toml, key) : defaultValue;
+ }
+
+ function readBytes32ArrayOr(string memory toml, string memory key, bytes32[] memory defaultValue)
+ internal
+ view
+ returns (bytes32[] memory)
+ {
+ return keyExists(toml, key) ? readBytes32Array(toml, key) : defaultValue;
+ }
+
+ function readStringOr(string memory toml, string memory key, string memory defaultValue)
+ internal
+ view
+ returns (string memory)
+ {
+ return keyExists(toml, key) ? readString(toml, key) : defaultValue;
+ }
+
+ function readStringArrayOr(string memory toml, string memory key, string[] memory defaultValue)
+ internal
+ view
+ returns (string[] memory)
+ {
+ return keyExists(toml, key) ? readStringArray(toml, key) : defaultValue;
+ }
+
+ function readAddressOr(string memory toml, string memory key, address defaultValue)
+ internal
+ view
+ returns (address)
+ {
+ return keyExists(toml, key) ? readAddress(toml, key) : defaultValue;
+ }
+
+ function readAddressArrayOr(string memory toml, string memory key, address[] memory defaultValue)
+ internal
+ view
+ returns (address[] memory)
+ {
+ return keyExists(toml, key) ? readAddressArray(toml, key) : defaultValue;
+ }
+
+ function readBoolOr(string memory toml, string memory key, bool defaultValue) internal view returns (bool) {
+ return keyExists(toml, key) ? readBool(toml, key) : defaultValue;
+ }
+
+ function readBoolArrayOr(string memory toml, string memory key, bool[] memory defaultValue)
+ internal
+ view
+ returns (bool[] memory)
+ {
+ return keyExists(toml, key) ? readBoolArray(toml, key) : defaultValue;
+ }
+
+ function readBytesOr(string memory toml, string memory key, bytes memory defaultValue)
+ internal
+ view
+ returns (bytes memory)
+ {
+ return keyExists(toml, key) ? readBytes(toml, key) : defaultValue;
+ }
+
+ function readBytesArrayOr(string memory toml, string memory key, bytes[] memory defaultValue)
+ internal
+ view
+ returns (bytes[] memory)
+ {
+ return keyExists(toml, key) ? readBytesArray(toml, key) : defaultValue;
+ }
+
+ function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {
+ return vm.serializeJson(jsonKey, rootObject);
+ }
+
+ function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {
+ return vm.serializeBool(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, bool[] memory value) internal returns (string memory) {
+ return vm.serializeBool(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {
+ return vm.serializeUint(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, uint256[] memory value)
+ internal
+ returns (string memory)
+ {
+ return vm.serializeUint(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {
+ return vm.serializeInt(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, int256[] memory value)
+ internal
+ returns (string memory)
+ {
+ return vm.serializeInt(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {
+ return vm.serializeAddress(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, address[] memory value)
+ internal
+ returns (string memory)
+ {
+ return vm.serializeAddress(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {
+ return vm.serializeBytes32(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, bytes32[] memory value)
+ internal
+ returns (string memory)
+ {
+ return vm.serializeBytes32(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {
+ return vm.serializeBytes(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, bytes[] memory value)
+ internal
+ returns (string memory)
+ {
+ return vm.serializeBytes(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, string memory value) internal returns (string memory) {
+ return vm.serializeString(jsonKey, key, value);
+ }
+
+ function serialize(string memory jsonKey, string memory key, string[] memory value)
+ internal
+ returns (string memory)
+ {
+ return vm.serializeString(jsonKey, key, value);
+ }
+
+ function write(string memory jsonKey, string memory path) internal {
+ vm.writeToml(jsonKey, path);
+ }
+
+ function write(string memory jsonKey, string memory path, string memory valueKey) internal {
+ vm.writeToml(jsonKey, path, valueKey);
+ }
+}
diff --git a/contracts/lib/forge-std/src/StdUtils.sol b/contracts/lib/forge-std/src/StdUtils.sol
new file mode 100644
index 0000000..e4b3135
--- /dev/null
+++ b/contracts/lib/forge-std/src/StdUtils.sol
@@ -0,0 +1,206 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2 <0.9.0;
+
+pragma experimental ABIEncoderV2;
+
+import {IMulticall3} from "./interfaces/IMulticall3.sol";
+import {VmSafe} from "./Vm.sol";
+
+abstract contract StdUtils {
+ /*//////////////////////////////////////////////////////////////////////////
+ CONSTANTS
+ //////////////////////////////////////////////////////////////////////////*/
+
+ IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11);
+ VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code")))));
+ address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;
+ uint256 private constant INT256_MIN_ABS =
+ 57896044618658097711785492504343953926634992332820282019728792003956564819968;
+ uint256 private constant SECP256K1_ORDER =
+ 115792089237316195423570985008687907852837564279074904382605163141518161494337;
+ uint256 private constant UINT256_MAX =
+ 115792089237316195423570985008687907853269984665640564039457584007913129639935;
+
+ // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy.
+ address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C;
+
+ /*//////////////////////////////////////////////////////////////////////////
+ INTERNAL FUNCTIONS
+ //////////////////////////////////////////////////////////////////////////*/
+
+ function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {
+ require(min <= max, "StdUtils bound(uint256,uint256,uint256): Max is less than min.");
+ // If x is between min and max, return x directly. This is to ensure that dictionary values
+ // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188
+ if (x >= min && x <= max) return x;
+
+ uint256 size = max - min + 1;
+
+ // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side.
+ // This helps ensure coverage of the min/max values.
+ if (x <= 3 && size > x) return min + x;
+ if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x);
+
+ // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive.
+ if (x > max) {
+ uint256 diff = x - max;
+ uint256 rem = diff % size;
+ if (rem == 0) return max;
+ result = min + rem - 1;
+ } else if (x < min) {
+ uint256 diff = min - x;
+ uint256 rem = diff % size;
+ if (rem == 0) return min;
+ result = max - rem + 1;
+ }
+ }
+
+ function bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) {
+ result = _bound(x, min, max);
+ }
+
+ function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {
+ require(min <= max, "StdUtils bound(int256,int256,int256): Max is less than min.");
+
+ // Shifting all int256 values to uint256 to use _bound function. The range of two types are:
+ // int256 : -(2**255) ~ (2**255 - 1)
+ // uint256: 0 ~ (2**256 - 1)
+ // So, add 2**255, INT256_MIN_ABS to the integer values.
+ //
+ // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow.
+ // So, use `~uint256(x) + 1` instead.
+ uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS);
+ uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS);
+ uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS);
+
+ uint256 y = _bound(_x, _min, _max);
+
+ // To move it back to int256 value, subtract INT256_MIN_ABS at here.
+ result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS);
+ }
+
+ function bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) {
+ result = _bound(x, min, max);
+ }
+
+ function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) {
+ result = _bound(privateKey, 1, SECP256K1_ORDER - 1);
+ }
+
+ function bytesToUint(bytes memory b) internal pure virtual returns (uint256) {
+ require(b.length <= 32, "StdUtils bytesToUint(bytes): Bytes length exceeds 32.");
+ return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256));
+ }
+
+ /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce
+ function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) {
+ console2_log_StdUtils("computeCreateAddress is deprecated. Please use vm.computeCreateAddress instead.");
+ return vm.computeCreateAddress(deployer, nonce);
+ }
+
+ function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer)
+ internal
+ pure
+ virtual
+ returns (address)
+ {
+ console2_log_StdUtils("computeCreate2Address is deprecated. Please use vm.computeCreate2Address instead.");
+ return vm.computeCreate2Address(salt, initcodeHash, deployer);
+ }
+
+ /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer
+ function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) {
+ console2_log_StdUtils("computeCreate2Address is deprecated. Please use vm.computeCreate2Address instead.");
+ return vm.computeCreate2Address(salt, initCodeHash);
+ }
+
+ /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments
+ /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode
+ function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) {
+ return hashInitCode(creationCode, "");
+ }
+
+ /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2
+ /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode
+ /// @param args the ABI-encoded arguments to the constructor of C
+ function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) {
+ return keccak256(abi.encodePacked(creationCode, args));
+ }
+
+ // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses.
+ function getTokenBalances(address token, address[] memory addresses)
+ internal
+ virtual
+ returns (uint256[] memory balances)
+ {
+ uint256 tokenCodeSize;
+ assembly {
+ tokenCodeSize := extcodesize(token)
+ }
+ require(tokenCodeSize > 0, "StdUtils getTokenBalances(address,address[]): Token address is not a contract.");
+
+ // ABI encode the aggregate call to Multicall3.
+ uint256 length = addresses.length;
+ IMulticall3.Call[] memory calls = new IMulticall3.Call[](length);
+ for (uint256 i = 0; i < length; ++i) {
+ // 0x70a08231 = bytes4("balanceOf(address)"))
+ calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))});
+ }
+
+ // Make the aggregate call.
+ (, bytes[] memory returnData) = multicall.aggregate(calls);
+
+ // ABI decode the return data and return the balances.
+ balances = new uint256[](length);
+ for (uint256 i = 0; i < length; ++i) {
+ balances[i] = abi.decode(returnData[i], (uint256));
+ }
+ }
+
+ /*//////////////////////////////////////////////////////////////////////////
+ PRIVATE FUNCTIONS
+ //////////////////////////////////////////////////////////////////////////*/
+
+ function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) {
+ return address(uint160(uint256(bytesValue)));
+ }
+
+ // This section is used to prevent the compilation of console, which shortens the compilation time when console is
+ // not used elsewhere. We also trick the compiler into letting us make the console log methods as `pure` to avoid
+ // any breaking changes to function signatures.
+ function _castLogPayloadViewToPure(function(bytes memory) internal view fnIn)
+ internal
+ pure
+ returns (function(bytes memory) internal pure fnOut)
+ {
+ assembly {
+ fnOut := fnIn
+ }
+ }
+
+ function _sendLogPayload(bytes memory payload) internal pure {
+ _castLogPayloadViewToPure(_sendLogPayloadView)(payload);
+ }
+
+ function _sendLogPayloadView(bytes memory payload) private view {
+ uint256 payloadLength = payload.length;
+ address consoleAddress = CONSOLE2_ADDRESS;
+ /// @solidity memory-safe-assembly
+ assembly {
+ let payloadStart := add(payload, 32)
+ let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)
+ }
+ }
+
+ function console2_log_StdUtils(string memory p0) private pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string)", p0));
+ }
+
+ function console2_log_StdUtils(string memory p0, uint256 p1) private pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1));
+ }
+
+ function console2_log_StdUtils(string memory p0, string memory p1) private pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1));
+ }
+}
diff --git a/contracts/lib/forge-std/src/Test.sol b/contracts/lib/forge-std/src/Test.sol
new file mode 100644
index 0000000..11b18f2
--- /dev/null
+++ b/contracts/lib/forge-std/src/Test.sol
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2 <0.9.0;
+
+pragma experimental ABIEncoderV2;
+
+// 💬 ABOUT
+// Forge Std's default Test.
+
+// 🧩 MODULES
+import {console} from "./console.sol";
+import {console2} from "./console2.sol";
+import {safeconsole} from "./safeconsole.sol";
+import {StdAssertions} from "./StdAssertions.sol";
+import {StdChains} from "./StdChains.sol";
+import {StdCheats} from "./StdCheats.sol";
+import {StdConstants} from "./StdConstants.sol";
+import {stdError} from "./StdError.sol";
+import {StdInvariant} from "./StdInvariant.sol";
+import {stdJson} from "./StdJson.sol";
+import {stdMath} from "./StdMath.sol";
+import {StdStorage, stdStorage} from "./StdStorage.sol";
+import {StdStyle} from "./StdStyle.sol";
+import {stdToml} from "./StdToml.sol";
+import {StdUtils} from "./StdUtils.sol";
+import {Vm} from "./Vm.sol";
+
+// 📦 BOILERPLATE
+import {TestBase} from "./Base.sol";
+
+// ⭐️ TEST
+abstract contract Test is TestBase, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils {
+ // Note: IS_TEST() must return true.
+ bool public IS_TEST = true;
+}
diff --git a/contracts/lib/forge-std/src/Vm.sol b/contracts/lib/forge-std/src/Vm.sol
new file mode 100644
index 0000000..d98d081
--- /dev/null
+++ b/contracts/lib/forge-std/src/Vm.sol
@@ -0,0 +1,2501 @@
+// Automatically @generated by scripts/vm.py. Do not modify manually.
+
+// SPDX-License-Identifier: MIT OR Apache-2.0
+pragma solidity >=0.6.2 <0.9.0;
+pragma experimental ABIEncoderV2;
+
+/// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may
+/// result in Script simulations differing from on-chain execution. It is recommended to only use
+/// these cheats in scripts.
+interface VmSafe {
+ /// A modification applied to either `msg.sender` or `tx.origin`. Returned by `readCallers`.
+ enum CallerMode {
+ // No caller modification is currently active.
+ None,
+ // A one time broadcast triggered by a `vm.broadcast()` call is currently active.
+ Broadcast,
+ // A recurrent broadcast triggered by a `vm.startBroadcast()` call is currently active.
+ RecurrentBroadcast,
+ // A one time prank triggered by a `vm.prank()` call is currently active.
+ Prank,
+ // A recurrent prank triggered by a `vm.startPrank()` call is currently active.
+ RecurrentPrank
+ }
+
+ /// The kind of account access that occurred.
+ enum AccountAccessKind {
+ // The account was called.
+ Call,
+ // The account was called via delegatecall.
+ DelegateCall,
+ // The account was called via callcode.
+ CallCode,
+ // The account was called via staticcall.
+ StaticCall,
+ // The account was created.
+ Create,
+ // The account was selfdestructed.
+ SelfDestruct,
+ // Synthetic access indicating the current context has resumed after a previous sub-context (AccountAccess).
+ Resume,
+ // The account's balance was read.
+ Balance,
+ // The account's codesize was read.
+ Extcodesize,
+ // The account's codehash was read.
+ Extcodehash,
+ // The account's code was copied.
+ Extcodecopy
+ }
+
+ /// Forge execution contexts.
+ enum ForgeContext {
+ // Test group execution context (test, coverage or snapshot).
+ TestGroup,
+ // `forge test` execution context.
+ Test,
+ // `forge coverage` execution context.
+ Coverage,
+ // `forge snapshot` execution context.
+ Snapshot,
+ // Script group execution context (dry run, broadcast or resume).
+ ScriptGroup,
+ // `forge script` execution context.
+ ScriptDryRun,
+ // `forge script --broadcast` execution context.
+ ScriptBroadcast,
+ // `forge script --resume` execution context.
+ ScriptResume,
+ // Unknown `forge` execution context.
+ Unknown
+ }
+
+ /// The transaction type (`txType`) of the broadcast.
+ enum BroadcastTxType {
+ // Represents a CALL broadcast tx.
+ Call,
+ // Represents a CREATE broadcast tx.
+ Create,
+ // Represents a CREATE2 broadcast tx.
+ Create2
+ }
+
+ /// An Ethereum log. Returned by `getRecordedLogs`.
+ struct Log {
+ // The topics of the log, including the signature, if any.
+ bytes32[] topics;
+ // The raw data of the log.
+ bytes data;
+ // The address of the log's emitter.
+ address emitter;
+ }
+
+ /// An RPC URL and its alias. Returned by `rpcUrlStructs`.
+ struct Rpc {
+ // The alias of the RPC URL.
+ string key;
+ // The RPC URL.
+ string url;
+ }
+
+ /// An RPC log object. Returned by `eth_getLogs`.
+ struct EthGetLogs {
+ // The address of the log's emitter.
+ address emitter;
+ // The topics of the log, including the signature, if any.
+ bytes32[] topics;
+ // The raw data of the log.
+ bytes data;
+ // The block hash.
+ bytes32 blockHash;
+ // The block number.
+ uint64 blockNumber;
+ // The transaction hash.
+ bytes32 transactionHash;
+ // The transaction index in the block.
+ uint64 transactionIndex;
+ // The log index.
+ uint256 logIndex;
+ // Whether the log was removed.
+ bool removed;
+ }
+
+ /// A single entry in a directory listing. Returned by `readDir`.
+ struct DirEntry {
+ // The error message, if any.
+ string errorMessage;
+ // The path of the entry.
+ string path;
+ // The depth of the entry.
+ uint64 depth;
+ // Whether the entry is a directory.
+ bool isDir;
+ // Whether the entry is a symlink.
+ bool isSymlink;
+ }
+
+ /// Metadata information about a file.
+ /// This structure is returned from the `fsMetadata` function and represents known
+ /// metadata about a file such as its permissions, size, modification
+ /// times, etc.
+ struct FsMetadata {
+ // True if this metadata is for a directory.
+ bool isDir;
+ // True if this metadata is for a symlink.
+ bool isSymlink;
+ // The size of the file, in bytes, this metadata is for.
+ uint256 length;
+ // True if this metadata is for a readonly (unwritable) file.
+ bool readOnly;
+ // The last modification time listed in this metadata.
+ uint256 modified;
+ // The last access time of this metadata.
+ uint256 accessed;
+ // The creation time listed in this metadata.
+ uint256 created;
+ }
+
+ /// A wallet with a public and private key.
+ struct Wallet {
+ // The wallet's address.
+ address addr;
+ // The wallet's public key `X`.
+ uint256 publicKeyX;
+ // The wallet's public key `Y`.
+ uint256 publicKeyY;
+ // The wallet's private key.
+ uint256 privateKey;
+ }
+
+ /// The result of a `tryFfi` call.
+ struct FfiResult {
+ // The exit code of the call.
+ int32 exitCode;
+ // The optionally hex-decoded `stdout` data.
+ bytes stdout;
+ // The `stderr` data.
+ bytes stderr;
+ }
+
+ /// Information on the chain and fork.
+ struct ChainInfo {
+ // The fork identifier. Set to zero if no fork is active.
+ uint256 forkId;
+ // The chain ID of the current fork.
+ uint256 chainId;
+ }
+
+ /// Information about a blockchain.
+ struct Chain {
+ // The chain name.
+ string name;
+ // The chain's Chain ID.
+ uint256 chainId;
+ // The chain's alias. (i.e. what gets specified in `foundry.toml`).
+ string chainAlias;
+ // A default RPC endpoint for this chain.
+ string rpcUrl;
+ }
+
+ /// The result of a `stopAndReturnStateDiff` call.
+ struct AccountAccess {
+ // The chain and fork the access occurred.
+ ChainInfo chainInfo;
+ // The kind of account access that determines what the account is.
+ // If kind is Call, DelegateCall, StaticCall or CallCode, then the account is the callee.
+ // If kind is Create, then the account is the newly created account.
+ // If kind is SelfDestruct, then the account is the selfdestruct recipient.
+ // If kind is a Resume, then account represents a account context that has resumed.
+ AccountAccessKind kind;
+ // The account that was accessed.
+ // It's either the account created, callee or a selfdestruct recipient for CREATE, CALL or SELFDESTRUCT.
+ address account;
+ // What accessed the account.
+ address accessor;
+ // If the account was initialized or empty prior to the access.
+ // An account is considered initialized if it has code, a
+ // non-zero nonce, or a non-zero balance.
+ bool initialized;
+ // The previous balance of the accessed account.
+ uint256 oldBalance;
+ // The potential new balance of the accessed account.
+ // That is, all balance changes are recorded here, even if reverts occurred.
+ uint256 newBalance;
+ // Code of the account deployed by CREATE.
+ bytes deployedCode;
+ // Value passed along with the account access
+ uint256 value;
+ // Input data provided to the CREATE or CALL
+ bytes data;
+ // If this access reverted in either the current or parent context.
+ bool reverted;
+ // An ordered list of storage accesses made during an account access operation.
+ StorageAccess[] storageAccesses;
+ // Call depth traversed during the recording of state differences
+ uint64 depth;
+ // The previous nonce of the accessed account.
+ uint64 oldNonce;
+ // The new nonce of the accessed account.
+ uint64 newNonce;
+ }
+
+ /// The storage accessed during an `AccountAccess`.
+ struct StorageAccess {
+ // The account whose storage was accessed.
+ address account;
+ // The slot that was accessed.
+ bytes32 slot;
+ // If the access was a write.
+ bool isWrite;
+ // The previous value of the slot.
+ bytes32 previousValue;
+ // The new value of the slot.
+ bytes32 newValue;
+ // If the access was reverted.
+ bool reverted;
+ }
+
+ /// Gas used. Returned by `lastCallGas`.
+ struct Gas {
+ // The gas limit of the call.
+ uint64 gasLimit;
+ // The total gas used.
+ uint64 gasTotalUsed;
+ // DEPRECATED: The amount of gas used for memory expansion. Ref:
+ uint64 gasMemoryUsed;
+ // The amount of gas refunded.
+ int64 gasRefunded;
+ // The amount of gas remaining.
+ uint64 gasRemaining;
+ }
+
+ /// The result of the `stopDebugTraceRecording` call
+ struct DebugStep {
+ // The stack before executing the step of the run.
+ // stack\[0\] represents the top of the stack.
+ // and only stack data relevant to the opcode execution is contained.
+ uint256[] stack;
+ // The memory input data before executing the step of the run.
+ // only input data relevant to the opcode execution is contained.
+ // e.g. for MLOAD, it will have memory\[offset:offset+32\] copied here.
+ // the offset value can be get by the stack data.
+ bytes memoryInput;
+ // The opcode that was accessed.
+ uint8 opcode;
+ // The call depth of the step.
+ uint64 depth;
+ // Whether the call end up with out of gas error.
+ bool isOutOfGas;
+ // The contract address where the opcode is running
+ address contractAddr;
+ }
+
+ /// Represents a transaction's broadcast details.
+ struct BroadcastTxSummary {
+ // The hash of the transaction that was broadcasted
+ bytes32 txHash;
+ // Represent the type of transaction among CALL, CREATE, CREATE2
+ BroadcastTxType txType;
+ // The address of the contract that was called or created.
+ // This is address of the contract that is created if the txType is CREATE or CREATE2.
+ address contractAddress;
+ // The block number the transaction landed in.
+ uint64 blockNumber;
+ // Status of the transaction, retrieved from the transaction receipt.
+ bool success;
+ }
+
+ /// Holds a signed EIP-7702 authorization for an authority account to delegate to an implementation.
+ struct SignedDelegation {
+ // The y-parity of the recovered secp256k1 signature (0 or 1).
+ uint8 v;
+ // First 32 bytes of the signature.
+ bytes32 r;
+ // Second 32 bytes of the signature.
+ bytes32 s;
+ // The current nonce of the authority account at signing time.
+ // Used to ensure signature can't be replayed after account nonce changes.
+ uint64 nonce;
+ // Address of the contract implementation that will be delegated to.
+ // Gets encoded into delegation code: 0xef0100 || implementation.
+ address implementation;
+ }
+
+ /// Represents a "potential" revert reason from a single subsequent call when using `vm.assumeNoReverts`.
+ /// Reverts that match will result in a FOUNDRY::ASSUME rejection, whereas unmatched reverts will be surfaced
+ /// as normal.
+ struct PotentialRevert {
+ // The allowed origin of the revert opcode; address(0) allows reverts from any address
+ address reverter;
+ // When true, only matches on the beginning of the revert data, otherwise, matches on entire revert data
+ bool partialMatch;
+ // The data to use to match encountered reverts
+ bytes revertData;
+ }
+
+ /// An EIP-2930 access list item.
+ struct AccessListItem {
+ // The address to be added in access list.
+ address target;
+ // The storage keys to be added in access list.
+ bytes32[] storageKeys;
+ }
+
+ // ======== Crypto ========
+
+ /// Derives a private key from the name, labels the account with that name, and returns the wallet.
+ function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);
+
+ /// Generates a wallet from the private key and returns the wallet.
+ function createWallet(uint256 privateKey) external returns (Wallet memory wallet);
+
+ /// Generates a wallet from the private key, labels the account with that name, and returns the wallet.
+ function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);
+
+ /// Derive a private key from a provided mnemonic string (or mnemonic file path)
+ /// at the derivation path `m/44'/60'/0'/0/{index}`.
+ function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);
+
+ /// Derive a private key from a provided mnemonic string (or mnemonic file path)
+ /// at `{derivationPath}{index}`.
+ function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)
+ external
+ pure
+ returns (uint256 privateKey);
+
+ /// Derive a private key from a provided mnemonic string (or mnemonic file path) in the specified language
+ /// at the derivation path `m/44'/60'/0'/0/{index}`.
+ function deriveKey(string calldata mnemonic, uint32 index, string calldata language)
+ external
+ pure
+ returns (uint256 privateKey);
+
+ /// Derive a private key from a provided mnemonic string (or mnemonic file path) in the specified language
+ /// at `{derivationPath}{index}`.
+ function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index, string calldata language)
+ external
+ pure
+ returns (uint256 privateKey);
+
+ /// Derives secp256r1 public key from the provided `privateKey`.
+ function publicKeyP256(uint256 privateKey) external pure returns (uint256 publicKeyX, uint256 publicKeyY);
+
+ /// Adds a private key to the local forge wallet and returns the address.
+ function rememberKey(uint256 privateKey) external returns (address keyAddr);
+
+ /// Derive a set number of wallets from a mnemonic at the derivation path `m/44'/60'/0'/0/{0..count}`.
+ /// The respective private keys are saved to the local forge wallet for later use and their addresses are returned.
+ function rememberKeys(string calldata mnemonic, string calldata derivationPath, uint32 count)
+ external
+ returns (address[] memory keyAddrs);
+
+ /// Derive a set number of wallets from a mnemonic in the specified language at the derivation path `m/44'/60'/0'/0/{0..count}`.
+ /// The respective private keys are saved to the local forge wallet for later use and their addresses are returned.
+ function rememberKeys(
+ string calldata mnemonic,
+ string calldata derivationPath,
+ string calldata language,
+ uint32 count
+ ) external returns (address[] memory keyAddrs);
+
+ /// Signs data with a `Wallet`.
+ /// Returns a compact signature (`r`, `vs`) as per EIP-2098, where `vs` encodes both the
+ /// signature's `s` value, and the recovery id `v` in a single bytes32.
+ /// This format reduces the signature size from 65 to 64 bytes.
+ function signCompact(Wallet calldata wallet, bytes32 digest) external returns (bytes32 r, bytes32 vs);
+
+ /// Signs `digest` with `privateKey` using the secp256k1 curve.
+ /// Returns a compact signature (`r`, `vs`) as per EIP-2098, where `vs` encodes both the
+ /// signature's `s` value, and the recovery id `v` in a single bytes32.
+ /// This format reduces the signature size from 65 to 64 bytes.
+ function signCompact(uint256 privateKey, bytes32 digest) external pure returns (bytes32 r, bytes32 vs);
+
+ /// Signs `digest` with signer provided to script using the secp256k1 curve.
+ /// Returns a compact signature (`r`, `vs`) as per EIP-2098, where `vs` encodes both the
+ /// signature's `s` value, and the recovery id `v` in a single bytes32.
+ /// This format reduces the signature size from 65 to 64 bytes.
+ /// If `--sender` is provided, the signer with provided address is used, otherwise,
+ /// if exactly one signer is provided to the script, that signer is used.
+ /// Raises error if signer passed through `--sender` does not match any unlocked signers or
+ /// if `--sender` is not provided and not exactly one signer is passed to the script.
+ function signCompact(bytes32 digest) external pure returns (bytes32 r, bytes32 vs);
+
+ /// Signs `digest` with signer provided to script using the secp256k1 curve.
+ /// Returns a compact signature (`r`, `vs`) as per EIP-2098, where `vs` encodes both the
+ /// signature's `s` value, and the recovery id `v` in a single bytes32.
+ /// This format reduces the signature size from 65 to 64 bytes.
+ /// Raises error if none of the signers passed into the script have provided address.
+ function signCompact(address signer, bytes32 digest) external pure returns (bytes32 r, bytes32 vs);
+
+ /// Signs `digest` with `privateKey` using the secp256r1 curve.
+ function signP256(uint256 privateKey, bytes32 digest) external pure returns (bytes32 r, bytes32 s);
+
+ /// Signs `digest` with `privateKey` on the secp256k1 curve, using the given `nonce`
+ /// as the raw ephemeral k value in ECDSA (instead of deriving it deterministically).
+ function signWithNonceUnsafe(uint256 privateKey, bytes32 digest, uint256 nonce)
+ external
+ pure
+ returns (uint8 v, bytes32 r, bytes32 s);
+
+ /// Signs data with a `Wallet`.
+ function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);
+
+ /// Signs `digest` with `privateKey` using the secp256k1 curve.
+ function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);
+
+ /// Signs `digest` with signer provided to script using the secp256k1 curve.
+ /// If `--sender` is provided, the signer with provided address is used, otherwise,
+ /// if exactly one signer is provided to the script, that signer is used.
+ /// Raises error if signer passed through `--sender` does not match any unlocked signers or
+ /// if `--sender` is not provided and not exactly one signer is passed to the script.
+ function sign(bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);
+
+ /// Signs `digest` with signer provided to script using the secp256k1 curve.
+ /// Raises error if none of the signers passed into the script have provided address.
+ function sign(address signer, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);
+
+ // ======== Environment ========
+
+ /// Gets the environment variable `name` and parses it as `address`.
+ /// Reverts if the variable was not found or could not be parsed.
+ function envAddress(string calldata name) external view returns (address value);
+
+ /// Gets the environment variable `name` and parses it as an array of `address`, delimited by `delim`.
+ /// Reverts if the variable was not found or could not be parsed.
+ function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);
+
+ /// Gets the environment variable `name` and parses it as `bool`.
+ /// Reverts if the variable was not found or could not be parsed.
+ function envBool(string calldata name) external view returns (bool value);
+
+ /// Gets the environment variable `name` and parses it as an array of `bool`, delimited by `delim`.
+ /// Reverts if the variable was not found or could not be parsed.
+ function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);
+
+ /// Gets the environment variable `name` and parses it as `bytes32`.
+ /// Reverts if the variable was not found or could not be parsed.
+ function envBytes32(string calldata name) external view returns (bytes32 value);
+
+ /// Gets the environment variable `name` and parses it as an array of `bytes32`, delimited by `delim`.
+ /// Reverts if the variable was not found or could not be parsed.
+ function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);
+
+ /// Gets the environment variable `name` and parses it as `bytes`.
+ /// Reverts if the variable was not found or could not be parsed.
+ function envBytes(string calldata name) external view returns (bytes memory value);
+
+ /// Gets the environment variable `name` and parses it as an array of `bytes`, delimited by `delim`.
+ /// Reverts if the variable was not found or could not be parsed.
+ function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);
+
+ /// Gets the environment variable `name` and returns true if it exists, else returns false.
+ function envExists(string calldata name) external view returns (bool result);
+
+ /// Gets the environment variable `name` and parses it as `int256`.
+ /// Reverts if the variable was not found or could not be parsed.
+ function envInt(string calldata name) external view returns (int256 value);
+
+ /// Gets the environment variable `name` and parses it as an array of `int256`, delimited by `delim`.
+ /// Reverts if the variable was not found or could not be parsed.
+ function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);
+
+ /// Gets the environment variable `name` and parses it as `bool`.
+ /// Reverts if the variable could not be parsed.
+ /// Returns `defaultValue` if the variable was not found.
+ function envOr(string calldata name, bool defaultValue) external view returns (bool value);
+
+ /// Gets the environment variable `name` and parses it as `uint256`.
+ /// Reverts if the variable could not be parsed.
+ /// Returns `defaultValue` if the variable was not found.
+ function envOr(string calldata name, uint256 defaultValue) external view returns (uint256 value);
+
+ /// Gets the environment variable `name` and parses it as an array of `address`, delimited by `delim`.
+ /// Reverts if the variable could not be parsed.
+ /// Returns `defaultValue` if the variable was not found.
+ function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)
+ external
+ view
+ returns (address[] memory value);
+
+ /// Gets the environment variable `name` and parses it as an array of `bytes32`, delimited by `delim`.
+ /// Reverts if the variable could not be parsed.
+ /// Returns `defaultValue` if the variable was not found.
+ function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)
+ external
+ view
+ returns (bytes32[] memory value);
+
+ /// Gets the environment variable `name` and parses it as an array of `string`, delimited by `delim`.
+ /// Reverts if the variable could not be parsed.
+ /// Returns `defaultValue` if the variable was not found.
+ function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)
+ external
+ view
+ returns (string[] memory value);
+
+ /// Gets the environment variable `name` and parses it as an array of `bytes`, delimited by `delim`.
+ /// Reverts if the variable could not be parsed.
+ /// Returns `defaultValue` if the variable was not found.
+ function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)
+ external
+ view
+ returns (bytes[] memory value);
+
+ /// Gets the environment variable `name` and parses it as `int256`.
+ /// Reverts if the variable could not be parsed.
+ /// Returns `defaultValue` if the variable was not found.
+ function envOr(string calldata name, int256 defaultValue) external view returns (int256 value);
+
+ /// Gets the environment variable `name` and parses it as `address`.
+ /// Reverts if the variable could not be parsed.
+ /// Returns `defaultValue` if the variable was not found.
+ function envOr(string calldata name, address defaultValue) external view returns (address value);
+
+ /// Gets the environment variable `name` and parses it as `bytes32`.
+ /// Reverts if the variable could not be parsed.
+ /// Returns `defaultValue` if the variable was not found.
+ function envOr(string calldata name, bytes32 defaultValue) external view returns (bytes32 value);
+
+ /// Gets the environment variable `name` and parses it as `string`.
+ /// Reverts if the variable could not be parsed.
+ /// Returns `defaultValue` if the variable was not found.
+ function envOr(string calldata name, string calldata defaultValue) external view returns (string memory value);
+
+ /// Gets the environment variable `name` and parses it as `bytes`.
+ /// Reverts if the variable could not be parsed.
+ /// Returns `defaultValue` if the variable was not found.
+ function envOr(string calldata name, bytes calldata defaultValue) external view returns (bytes memory value);
+
+ /// Gets the environment variable `name` and parses it as an array of `bool`, delimited by `delim`.
+ /// Reverts if the variable could not be parsed.
+ /// Returns `defaultValue` if the variable was not found.
+ function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)
+ external
+ view
+ returns (bool[] memory value);
+
+ /// Gets the environment variable `name` and parses it as an array of `uint256`, delimited by `delim`.
+ /// Reverts if the variable could not be parsed.
+ /// Returns `defaultValue` if the variable was not found.
+ function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)
+ external
+ view
+ returns (uint256[] memory value);
+
+ /// Gets the environment variable `name` and parses it as an array of `int256`, delimited by `delim`.
+ /// Reverts if the variable could not be parsed.
+ /// Returns `defaultValue` if the variable was not found.
+ function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)
+ external
+ view
+ returns (int256[] memory value);
+
+ /// Gets the environment variable `name` and parses it as `string`.
+ /// Reverts if the variable was not found or could not be parsed.
+ function envString(string calldata name) external view returns (string memory value);
+
+ /// Gets the environment variable `name` and parses it as an array of `string`, delimited by `delim`.
+ /// Reverts if the variable was not found or could not be parsed.
+ function envString(string calldata name, string calldata delim) external view returns (string[] memory value);
+
+ /// Gets the environment variable `name` and parses it as `uint256`.
+ /// Reverts if the variable was not found or could not be parsed.
+ function envUint(string calldata name) external view returns (uint256 value);
+
+ /// Gets the environment variable `name` and parses it as an array of `uint256`, delimited by `delim`.
+ /// Reverts if the variable was not found or could not be parsed.
+ function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);
+
+ /// Returns true if `forge` command was executed in given context.
+ function isContext(ForgeContext context) external view returns (bool result);
+
+ /// Resolves the env variable placeholders of a given input string.
+ function resolveEnv(string calldata input) external returns (string memory);
+
+ /// Sets environment variables.
+ function setEnv(string calldata name, string calldata value) external;
+
+ // ======== EVM ========
+
+ /// Gets all accessed reads and write slot from a `vm.record` session, for a given address.
+ function accesses(address target) external view returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);
+
+ /// Gets the address for a given private key.
+ function addr(uint256 privateKey) external pure returns (address keyAddr);
+
+ /// Gets all the logs according to specified filter.
+ function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)
+ external
+ view
+ returns (EthGetLogs[] memory logs);
+
+ /// Gets the current `block.blobbasefee`.
+ /// You should use this instead of `block.blobbasefee` if you use `vm.blobBaseFee`, as `block.blobbasefee` is assumed to be constant across a transaction,
+ /// and as a result will get optimized out by the compiler.
+ /// See https://github.com/foundry-rs/foundry/issues/6180
+ function getBlobBaseFee() external view returns (uint256 blobBaseFee);
+
+ /// Gets the current `block.number`.
+ /// You should use this instead of `block.number` if you use `vm.roll`, as `block.number` is assumed to be constant across a transaction,
+ /// and as a result will get optimized out by the compiler.
+ /// See https://github.com/foundry-rs/foundry/issues/6180
+ function getBlockNumber() external view returns (uint256 height);
+
+ /// Gets the current `block.timestamp`.
+ /// You should use this instead of `block.timestamp` if you use `vm.warp`, as `block.timestamp` is assumed to be constant across a transaction,
+ /// and as a result will get optimized out by the compiler.
+ /// See https://github.com/foundry-rs/foundry/issues/6180
+ function getBlockTimestamp() external view returns (uint256 timestamp);
+
+ /// Gets the current `block.chainid` of the currently selected environment.
+ /// You should use this instead of `block.chainid` if you use `vm.selectFork` or `vm.createSelectFork`, as `block.chainid` could be assumed
+ /// to be constant across a transaction, and as a result will get optimized out by the compiler.
+ /// See https://github.com/foundry-rs/foundry/issues/6180
+ function getChainId() external view returns (uint256 blockChainId);
+
+ /// Returns the test or script execution evm version.
+ /// **Note:** The execution evm version is not the same as the compilation one.
+ function getEvmVersion() external pure returns (string memory evm);
+
+ /// Gets the map key and parent of a mapping at a given slot, for a given address.
+ function getMappingKeyAndParentOf(address target, bytes32 elementSlot)
+ external
+ view
+ returns (bool found, bytes32 key, bytes32 parent);
+
+ /// Gets the number of elements in the mapping at the given slot, for a given address.
+ function getMappingLength(address target, bytes32 mappingSlot) external view returns (uint256 length);
+
+ /// Gets the elements at index idx of the mapping at the given slot, for a given address. The
+ /// index must be less than the length of the mapping (i.e. the number of keys in the mapping).
+ function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external view returns (bytes32 value);
+
+ /// Gets the nonce of an account.
+ function getNonce(address account) external view returns (uint64 nonce);
+
+ /// Get the nonce of a `Wallet`.
+ function getNonce(Wallet calldata wallet) external view returns (uint64 nonce);
+
+ /// Gets the RLP encoded block header for a given block number.
+ /// Returns the block header in the same format as `cast block --raw`.
+ function getRawBlockHeader(uint256 blockNumber) external view returns (bytes memory rlpHeader);
+
+ /// Gets all the recorded logs.
+ function getRecordedLogs() external view returns (Log[] memory logs);
+
+ /// Returns state diffs from current `vm.startStateDiffRecording` session.
+ function getStateDiff() external view returns (string memory diff);
+
+ /// Returns state diffs from current `vm.startStateDiffRecording` session, in json format.
+ function getStateDiffJson() external view returns (string memory diff);
+
+ /// Returns an array of `StorageAccess` from current `vm.stateStateDiffRecording` session
+ function getStorageAccesses() external view returns (StorageAccess[] memory storageAccesses);
+
+ /// Returns an array of storage slots occupied by the specified variable.
+ function getStorageSlots(address target, string calldata variableName)
+ external
+ view
+ returns (uint256[] memory slots);
+
+ /// Gets the gas used in the last call from the callee perspective.
+ function lastCallGas() external view returns (Gas memory gas);
+
+ /// Loads a storage slot from an address.
+ function load(address target, bytes32 slot) external view returns (bytes32 data);
+
+ /// Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.
+ function pauseGasMetering() external;
+
+ /// Records all storage reads and writes. Use `accesses` to get the recorded data.
+ /// Subsequent calls to `record` will clear the previous data.
+ function record() external;
+
+ /// Record all the transaction logs.
+ function recordLogs() external;
+
+ /// Reset gas metering (i.e. gas usage is set to gas limit).
+ function resetGasMetering() external;
+
+ /// Resumes gas metering (i.e. gas usage is counted again). Noop if already on.
+ function resumeGasMetering() external;
+
+ /// Performs an Ethereum JSON-RPC request to the current fork URL.
+ function rpc(string calldata method, string calldata params) external returns (bytes memory data);
+
+ /// Performs an Ethereum JSON-RPC request to the given endpoint.
+ function rpc(string calldata urlOrAlias, string calldata method, string calldata params)
+ external
+ returns (bytes memory data);
+
+ /// Set the exact test or script execution evm version, e.g. `berlin`, `cancun`.
+ /// **Note:** The execution evm version is not the same as the compilation one.
+ function setEvmVersion(string calldata evm) external;
+
+ /// Records the debug trace during the run.
+ function startDebugTraceRecording() external;
+
+ /// Starts recording all map SSTOREs for later retrieval.
+ function startMappingRecording() external;
+
+ /// Record all account accesses as part of CREATE, CALL or SELFDESTRUCT opcodes in order,
+ /// along with the context of the calls
+ function startStateDiffRecording() external;
+
+ /// Stop debug trace recording and returns the recorded debug trace.
+ function stopAndReturnDebugTraceRecording() external returns (DebugStep[] memory step);
+
+ /// Returns an ordered array of all account accesses from a `vm.startStateDiffRecording` session.
+ function stopAndReturnStateDiff() external returns (AccountAccess[] memory accountAccesses);
+
+ /// Stops recording all map SSTOREs for later retrieval and clears the recorded data.
+ function stopMappingRecording() external;
+
+ /// Stops recording storage reads and writes.
+ function stopRecord() external;
+
+ // ======== Filesystem ========
+
+ /// Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.
+ /// `path` is relative to the project root.
+ function closeFile(string calldata path) external;
+
+ /// Copies the contents of one file to another. This function will **overwrite** the contents of `to`.
+ /// On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.
+ /// Both `from` and `to` are relative to the project root.
+ function copyFile(string calldata from, string calldata to) external returns (uint64 copied);
+
+ /// Creates a new, empty directory at the provided path.
+ /// This cheatcode will revert in the following situations, but is not limited to just these cases:
+ /// - User lacks permissions to modify `path`.
+ /// - A parent of the given path doesn't exist and `recursive` is false.
+ /// - `path` already exists and `recursive` is false.
+ /// `path` is relative to the project root.
+ function createDir(string calldata path, bool recursive) external;
+
+ /// Deploys a contract from an artifact file. Takes in the relative path to the json file or the path to the
+ /// artifact in the form of :: where and parts are optional.
+ /// Reverts if the target artifact contains unlinked library placeholders.
+ function deployCode(string calldata artifactPath) external returns (address deployedAddress);
+
+ /// Deploys a contract from an artifact file. Takes in the relative path to the json file or the path to the
+ /// artifact in the form of :: where and parts are optional.
+ /// Reverts if the target artifact contains unlinked library placeholders.
+ /// Additionally accepts abi-encoded constructor arguments.
+ function deployCode(string calldata artifactPath, bytes calldata constructorArgs)
+ external
+ returns (address deployedAddress);
+
+ /// Deploys a contract from an artifact file. Takes in the relative path to the json file or the path to the
+ /// artifact in the form of :: where and parts are optional.
+ /// Reverts if the target artifact contains unlinked library placeholders.
+ /// Additionally accepts `msg.value`.
+ function deployCode(string calldata artifactPath, uint256 value) external returns (address deployedAddress);
+
+ /// Deploys a contract from an artifact file. Takes in the relative path to the json file or the path to the
+ /// artifact in the form of :: where and parts are optional.
+ /// Reverts if the target artifact contains unlinked library placeholders.
+ /// Additionally accepts abi-encoded constructor arguments and `msg.value`.
+ function deployCode(string calldata artifactPath, bytes calldata constructorArgs, uint256 value)
+ external
+ returns (address deployedAddress);
+
+ /// Deploys a contract from an artifact file, using the CREATE2 salt. Takes in the relative path to the json file or the path to the
+ /// artifact in the form of :: where and parts are optional.
+ /// Reverts if the target artifact contains unlinked library placeholders.
+ function deployCode(string calldata artifactPath, bytes32 salt) external returns (address deployedAddress);
+
+ /// Deploys a contract from an artifact file, using the CREATE2 salt. Takes in the relative path to the json file or the path to the
+ /// artifact in the form of :: where and parts are optional.
+ /// Reverts if the target artifact contains unlinked library placeholders.
+ /// Additionally accepts abi-encoded constructor arguments.
+ function deployCode(string calldata artifactPath, bytes calldata constructorArgs, bytes32 salt)
+ external
+ returns (address deployedAddress);
+
+ /// Deploys a contract from an artifact file, using the CREATE2 salt. Takes in the relative path to the json file or the path to the
+ /// artifact in the form of :: where and parts are optional.
+ /// Reverts if the target artifact contains unlinked library placeholders.
+ /// Additionally accepts `msg.value`.
+ function deployCode(string calldata artifactPath, uint256 value, bytes32 salt)
+ external
+ returns (address deployedAddress);
+
+ /// Deploys a contract from an artifact file, using the CREATE2 salt. Takes in the relative path to the json file or the path to the
+ /// artifact in the form of :: where and parts are optional.
+ /// Reverts if the target artifact contains unlinked library placeholders.
+ /// Additionally accepts abi-encoded constructor arguments and `msg.value`.
+ function deployCode(string calldata artifactPath, bytes calldata constructorArgs, uint256 value, bytes32 salt)
+ external
+ returns (address deployedAddress);
+
+ /// Returns true if the given path points to an existing entity, else returns false.
+ function exists(string calldata path) external view returns (bool result);
+
+ /// Performs a foreign function call via the terminal.
+ function ffi(string[] calldata commandInput) external returns (bytes memory result);
+
+ /// Given a path, query the file system to get information about a file, directory, etc.
+ function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);
+
+ /// Gets the artifact path from code (aka. creation code).
+ function getArtifactPathByCode(bytes calldata code) external view returns (string memory path);
+
+ /// Gets the artifact path from deployed code (aka. runtime code).
+ function getArtifactPathByDeployedCode(bytes calldata deployedCode) external view returns (string memory path);
+
+ /// Returns the most recent broadcast for the given contract on `chainId` matching `txType`.
+ /// For example:
+ /// The most recent deployment can be fetched by passing `txType` as `CREATE` or `CREATE2`.
+ /// The most recent call can be fetched by passing `txType` as `CALL`.
+ function getBroadcast(string calldata contractName, uint64 chainId, BroadcastTxType txType)
+ external
+ view
+ returns (BroadcastTxSummary memory);
+
+ /// Returns all broadcasts for the given contract on `chainId` with the specified `txType`.
+ /// Sorted such that the most recent broadcast is the first element, and the oldest is the last. i.e descending order of BroadcastTxSummary.blockNumber.
+ function getBroadcasts(string calldata contractName, uint64 chainId, BroadcastTxType txType)
+ external
+ view
+ returns (BroadcastTxSummary[] memory);
+
+ /// Returns all broadcasts for the given contract on `chainId`.
+ /// Sorted such that the most recent broadcast is the first element, and the oldest is the last. i.e descending order of BroadcastTxSummary.blockNumber.
+ function getBroadcasts(string calldata contractName, uint64 chainId)
+ external
+ view
+ returns (BroadcastTxSummary[] memory);
+
+ /// Gets the creation bytecode from an artifact file. Takes in the relative path to the json file or the path to the
+ /// artifact in the form of :: where and parts are optional.
+ function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);
+
+ /// Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file or the path to the
+ /// artifact in the form of :: where and parts are optional.
+ function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);
+
+ /// Returns the most recent deployment for the current `chainId`.
+ function getDeployment(string calldata contractName) external view returns (address deployedAddress);
+
+ /// Returns the most recent deployment for the given contract on `chainId`
+ function getDeployment(string calldata contractName, uint64 chainId) external view returns (address deployedAddress);
+
+ /// Returns all deployments for the given contract on `chainId`
+ /// Sorted in descending order of deployment time i.e descending order of BroadcastTxSummary.blockNumber.
+ /// The most recent deployment is the first element, and the oldest is the last.
+ function getDeployments(string calldata contractName, uint64 chainId)
+ external
+ view
+ returns (address[] memory deployedAddresses);
+
+ /// Returns true if the path exists on disk and is pointing at a directory, else returns false.
+ function isDir(string calldata path) external view returns (bool result);
+
+ /// Returns true if the path exists on disk and is pointing at a regular file, else returns false.
+ function isFile(string calldata path) external view returns (bool result);
+
+ /// Get the path of the current project root.
+ function projectRoot() external view returns (string memory path);
+
+ /// Prompts the user for a string value in the terminal.
+ function prompt(string calldata promptText) external returns (string memory input);
+
+ /// Prompts the user for an address in the terminal.
+ function promptAddress(string calldata promptText) external returns (address);
+
+ /// Prompts the user for a hidden string value in the terminal.
+ function promptSecret(string calldata promptText) external returns (string memory input);
+
+ /// Prompts the user for hidden uint256 in the terminal (usually pk).
+ function promptSecretUint(string calldata promptText) external returns (uint256);
+
+ /// Prompts the user for uint256 in the terminal.
+ function promptUint(string calldata promptText) external returns (uint256);
+
+ /// Reads the directory at the given path recursively, up to `maxDepth`.
+ /// `maxDepth` defaults to 1, meaning only the direct children of the given directory will be returned.
+ /// Follows symbolic links if `followLinks` is true.
+ function readDir(string calldata path) external view returns (DirEntry[] memory entries);
+
+ /// See `readDir(string)`.
+ function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);
+
+ /// See `readDir(string)`.
+ function readDir(string calldata path, uint64 maxDepth, bool followLinks)
+ external
+ view
+ returns (DirEntry[] memory entries);
+
+ /// Reads the entire content of file to string. `path` is relative to the project root.
+ function readFile(string calldata path) external view returns (string memory data);
+
+ /// Reads the entire content of file as binary. `path` is relative to the project root.
+ function readFileBinary(string calldata path) external view returns (bytes memory data);
+
+ /// Reads next line of file to string.
+ function readLine(string calldata path) external view returns (string memory line);
+
+ /// Reads a symbolic link, returning the path that the link points to.
+ /// This cheatcode will revert in the following situations, but is not limited to just these cases:
+ /// - `path` is not a symbolic link.
+ /// - `path` does not exist.
+ function readLink(string calldata linkPath) external view returns (string memory targetPath);
+
+ /// Removes a directory at the provided path.
+ /// This cheatcode will revert in the following situations, but is not limited to just these cases:
+ /// - `path` doesn't exist.
+ /// - `path` isn't a directory.
+ /// - User lacks permissions to modify `path`.
+ /// - The directory is not empty and `recursive` is false.
+ /// `path` is relative to the project root.
+ function removeDir(string calldata path, bool recursive) external;
+
+ /// Removes a file from the filesystem.
+ /// This cheatcode will revert in the following situations, but is not limited to just these cases:
+ /// - `path` points to a directory.
+ /// - The file doesn't exist.
+ /// - The user lacks permissions to remove the file.
+ /// `path` is relative to the project root.
+ function removeFile(string calldata path) external;
+
+ /// Performs a foreign function call via terminal and returns the exit code, stdout, and stderr.
+ function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);
+
+ /// Returns the time since unix epoch in milliseconds.
+ function unixTime() external view returns (uint256 milliseconds);
+
+ /// Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.
+ /// `path` is relative to the project root.
+ function writeFile(string calldata path, string calldata data) external;
+
+ /// Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.
+ /// `path` is relative to the project root.
+ function writeFileBinary(string calldata path, bytes calldata data) external;
+
+ /// Writes line to file, creating a file if it does not exist.
+ /// `path` is relative to the project root.
+ function writeLine(string calldata path, string calldata data) external;
+
+ // ======== JSON ========
+
+ /// Checks if `key` exists in a JSON object.
+ function keyExistsJson(string calldata json, string calldata key) external view returns (bool);
+
+ /// Parses a string of JSON data at `key` and coerces it to `address`.
+ function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);
+
+ /// Parses a string of JSON data at `key` and coerces it to `address[]`.
+ function parseJsonAddressArray(string calldata json, string calldata key) external pure returns (address[] memory);
+
+ /// Parses a string of JSON data at `key` and coerces it to `bool`.
+ function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);
+
+ /// Parses a string of JSON data at `key` and coerces it to `bool[]`.
+ function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);
+
+ /// Parses a string of JSON data at `key` and coerces it to `bytes`.
+ function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);
+
+ /// Parses a string of JSON data at `key` and coerces it to `bytes32`.
+ function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);
+
+ /// Parses a string of JSON data at `key` and coerces it to `bytes32[]`.
+ function parseJsonBytes32Array(string calldata json, string calldata key) external pure returns (bytes32[] memory);
+
+ /// Parses a string of JSON data at `key` and coerces it to `bytes[]`.
+ function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);
+
+ /// Parses a string of JSON data at `key` and coerces it to `int256`.
+ function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);
+
+ /// Parses a string of JSON data at `key` and coerces it to `int256[]`.
+ function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);
+
+ /// Returns an array of all the keys in a JSON object.
+ function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);
+
+ /// Parses a string of JSON data at `key` and coerces it to `string`.
+ function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);
+
+ /// Parses a string of JSON data at `key` and coerces it to `string[]`.
+ function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);
+
+ /// Parses a string of JSON data at `key` and coerces it to type array corresponding to `typeDescription`.
+ function parseJsonTypeArray(string calldata json, string calldata key, string calldata typeDescription)
+ external
+ pure
+ returns (bytes memory);
+
+ /// Parses a string of JSON data and coerces it to type corresponding to `typeDescription`.
+ function parseJsonType(string calldata json, string calldata typeDescription) external pure returns (bytes memory);
+
+ /// Parses a string of JSON data at `key` and coerces it to type corresponding to `typeDescription`.
+ function parseJsonType(string calldata json, string calldata key, string calldata typeDescription)
+ external
+ pure
+ returns (bytes memory);
+
+ /// Parses a string of JSON data at `key` and coerces it to `uint256`.
+ function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);
+
+ /// Parses a string of JSON data at `key` and coerces it to `uint256[]`.
+ function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);
+
+ /// ABI-encodes a JSON object.
+ function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);
+
+ /// ABI-encodes a JSON object at `key`.
+ function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);
+
+ /// See `serializeJson`.
+ function serializeAddress(string calldata objectKey, string calldata valueKey, address value)
+ external
+ returns (string memory json);
+
+ /// See `serializeJson`.
+ function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)
+ external
+ returns (string memory json);
+
+ /// See `serializeJson`.
+ function serializeBool(string calldata objectKey, string calldata valueKey, bool value)
+ external
+ returns (string memory json);
+
+ /// See `serializeJson`.
+ function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)
+ external
+ returns (string memory json);
+
+ /// See `serializeJson`.
+ function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)
+ external
+ returns (string memory json);
+
+ /// See `serializeJson`.
+ function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)
+ external
+ returns (string memory json);
+
+ /// See `serializeJson`.
+ function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)
+ external
+ returns (string memory json);
+
+ /// See `serializeJson`.
+ function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)
+ external
+ returns (string memory json);
+
+ /// See `serializeJson`.
+ function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)
+ external
+ returns (string memory json);
+
+ /// See `serializeJson`.
+ function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)
+ external
+ returns (string memory json);
+
+ /// Serializes a key and value to a JSON object stored in-memory that can be later written to a file.
+ /// Returns the stringified version of the specific JSON file up to that moment.
+ function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);
+
+ /// See `serializeJson`.
+ function serializeJsonType(string calldata typeDescription, bytes calldata value)
+ external
+ pure
+ returns (string memory json);
+
+ /// See `serializeJson`.
+ function serializeJsonType(
+ string calldata objectKey,
+ string calldata valueKey,
+ string calldata typeDescription,
+ bytes calldata value
+ ) external returns (string memory json);
+
+ /// See `serializeJson`.
+ function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)
+ external
+ returns (string memory json);
+
+ /// See `serializeJson`.
+ function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)
+ external
+ returns (string memory json);
+
+ /// See `serializeJson`.
+ function serializeUintToHex(string calldata objectKey, string calldata valueKey, uint256 value)
+ external
+ returns (string memory json);
+
+ /// See `serializeJson`.
+ function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)
+ external
+ returns (string memory json);
+
+ /// See `serializeJson`.
+ function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)
+ external
+ returns (string memory json);
+
+ /// Write a serialized JSON object to a file. If the file exists, it will be overwritten.
+ function writeJson(string calldata json, string calldata path) external;
+
+ /// Write a serialized JSON object to an **existing** JSON file, replacing a value with key =
+ /// This is useful to replace a specific value of a JSON file, without having to parse the entire thing.
+ /// This cheatcode will create new keys if they didn't previously exist.
+ function writeJson(string calldata json, string calldata path, string calldata valueKey) external;
+
+ /// Checks if `key` exists in a JSON object
+ /// `keyExists` is being deprecated in favor of `keyExistsJson`. It will be removed in future versions.
+ function keyExists(string calldata json, string calldata key) external view returns (bool);
+
+ // ======== Scripting ========
+
+ /// Attach an EIP-4844 blob to the next call
+ function attachBlob(bytes calldata blob) external;
+
+ /// Designate the next call as an EIP-7702 transaction
+ function attachDelegation(SignedDelegation calldata signedDelegation) external;
+
+ /// Designate the next call as an EIP-7702 transaction, with optional cross-chain validity.
+ function attachDelegation(SignedDelegation calldata signedDelegation, bool crossChain) external;
+
+ /// Takes a signed transaction and broadcasts it to the network.
+ function broadcastRawTransaction(bytes calldata data) external;
+
+ /// Has the next call (at this call depth only) create transactions that can later be signed and sent onchain.
+ /// Broadcasting address is determined by checking the following in order:
+ /// 1. If `--sender` argument was provided, that address is used.
+ /// 2. If exactly one signer (e.g. private key, hw wallet, keystore) is set when `forge broadcast` is invoked, that signer is used.
+ /// 3. Otherwise, default foundry sender (1804c8AB1F12E6bbf3894d4083f33e07309d1f38) is used.
+ function broadcast() external;
+
+ /// Has the next call (at this call depth only) create a transaction with the address provided
+ /// as the sender that can later be signed and sent onchain.
+ function broadcast(address signer) external;
+
+ /// Has the next call (at this call depth only) create a transaction with the private key
+ /// provided as the sender that can later be signed and sent onchain.
+ function broadcast(uint256 privateKey) external;
+
+ /// Returns addresses of available unlocked wallets in the script environment.
+ function getWallets() external view returns (address[] memory wallets);
+
+ /// Sign an EIP-7702 authorization and designate the next call as an EIP-7702 transaction
+ function signAndAttachDelegation(address implementation, uint256 privateKey)
+ external
+ returns (SignedDelegation memory signedDelegation);
+
+ /// Sign an EIP-7702 authorization and designate the next call as an EIP-7702 transaction for specific nonce
+ function signAndAttachDelegation(address implementation, uint256 privateKey, uint64 nonce)
+ external
+ returns (SignedDelegation memory signedDelegation);
+
+ /// Sign an EIP-7702 authorization and designate the next call as an EIP-7702 transaction, with optional cross-chain validity.
+ function signAndAttachDelegation(address implementation, uint256 privateKey, bool crossChain)
+ external
+ returns (SignedDelegation memory signedDelegation);
+
+ /// Sign an EIP-7702 authorization for delegation
+ function signDelegation(address implementation, uint256 privateKey)
+ external
+ returns (SignedDelegation memory signedDelegation);
+
+ /// Sign an EIP-7702 authorization for delegation for specific nonce
+ function signDelegation(address implementation, uint256 privateKey, uint64 nonce)
+ external
+ returns (SignedDelegation memory signedDelegation);
+
+ /// Sign an EIP-7702 authorization for delegation, with optional cross-chain validity.
+ function signDelegation(address implementation, uint256 privateKey, bool crossChain)
+ external
+ returns (SignedDelegation memory signedDelegation);
+
+ /// Has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain.
+ /// Broadcasting address is determined by checking the following in order:
+ /// 1. If `--sender` argument was provided, that address is used.
+ /// 2. If exactly one signer (e.g. private key, hw wallet, keystore) is set when `forge broadcast` is invoked, that signer is used.
+ /// 3. Otherwise, default foundry sender (1804c8AB1F12E6bbf3894d4083f33e07309d1f38) is used.
+ function startBroadcast() external;
+
+ /// Has all subsequent calls (at this call depth only) create transactions with the address
+ /// provided that can later be signed and sent onchain.
+ function startBroadcast(address signer) external;
+
+ /// Has all subsequent calls (at this call depth only) create transactions with the private key
+ /// provided that can later be signed and sent onchain.
+ function startBroadcast(uint256 privateKey) external;
+
+ /// Stops collecting onchain transactions.
+ function stopBroadcast() external;
+
+ // ======== String ========
+
+ /// Returns true if `search` is found in `subject`, false otherwise.
+ function contains(string calldata subject, string calldata search) external pure returns (bool result);
+
+ /// Returns the index of the first occurrence of a `key` in an `input` string.
+ /// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `key` is not found.
+ /// Returns 0 in case of an empty `key`.
+ function indexOf(string calldata input, string calldata key) external pure returns (uint256);
+
+ /// Parses the given `string` into an `address`.
+ function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);
+
+ /// Parses the given `string` into a `bool`.
+ function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);
+
+ /// Parses the given `string` into `bytes`.
+ function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);
+
+ /// Parses the given `string` into a `bytes32`.
+ function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);
+
+ /// Parses the given `string` into a `int256`.
+ function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);
+
+ /// Parses the given `string` into a `uint256`.
+ function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);
+
+ /// Replaces occurrences of `from` in the given `string` with `to`.
+ function replace(string calldata input, string calldata from, string calldata to)
+ external
+ pure
+ returns (string memory output);
+
+ /// Splits the given `string` into an array of strings divided by the `delimiter`.
+ function split(string calldata input, string calldata delimiter) external pure returns (string[] memory outputs);
+
+ /// Converts the given `string` value to Lowercase.
+ function toLowercase(string calldata input) external pure returns (string memory output);
+
+ /// Converts the given value to a `string`.
+ function toString(address value) external pure returns (string memory stringifiedValue);
+
+ /// Converts the given value to a `string`.
+ function toString(bytes calldata value) external pure returns (string memory stringifiedValue);
+
+ /// Converts the given value to a `string`.
+ function toString(bytes32 value) external pure returns (string memory stringifiedValue);
+
+ /// Converts the given value to a `string`.
+ function toString(bool value) external pure returns (string memory stringifiedValue);
+
+ /// Converts the given value to a `string`.
+ function toString(uint256 value) external pure returns (string memory stringifiedValue);
+
+ /// Converts the given value to a `string`.
+ function toString(int256 value) external pure returns (string memory stringifiedValue);
+
+ /// Converts the given `string` value to Uppercase.
+ function toUppercase(string calldata input) external pure returns (string memory output);
+
+ /// Trims leading and trailing whitespace from the given `string` value.
+ function trim(string calldata input) external pure returns (string memory output);
+
+ // ======== Testing ========
+
+ /// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`.
+ /// Formats values with decimals in failure message.
+ function assertApproxEqAbsDecimal(uint256 left, uint256 right, uint256 maxDelta, uint256 decimals) external pure;
+
+ /// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`.
+ /// Formats values with decimals in failure message. Includes error message into revert string on failure.
+ function assertApproxEqAbsDecimal(
+ uint256 left,
+ uint256 right,
+ uint256 maxDelta,
+ uint256 decimals,
+ string calldata error
+ ) external pure;
+
+ /// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`.
+ /// Formats values with decimals in failure message.
+ function assertApproxEqAbsDecimal(int256 left, int256 right, uint256 maxDelta, uint256 decimals) external pure;
+
+ /// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`.
+ /// Formats values with decimals in failure message. Includes error message into revert string on failure.
+ function assertApproxEqAbsDecimal(
+ int256 left,
+ int256 right,
+ uint256 maxDelta,
+ uint256 decimals,
+ string calldata error
+ ) external pure;
+
+ /// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`.
+ function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta) external pure;
+
+ /// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`.
+ /// Includes error message into revert string on failure.
+ function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta, string calldata error) external pure;
+
+ /// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`.
+ function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta) external pure;
+
+ /// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`.
+ /// Includes error message into revert string on failure.
+ function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta, string calldata error) external pure;
+
+ /// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`.
+ /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100%
+ /// Formats values with decimals in failure message.
+ function assertApproxEqRelDecimal(uint256 left, uint256 right, uint256 maxPercentDelta, uint256 decimals)
+ external
+ pure;
+
+ /// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`.
+ /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100%
+ /// Formats values with decimals in failure message. Includes error message into revert string on failure.
+ function assertApproxEqRelDecimal(
+ uint256 left,
+ uint256 right,
+ uint256 maxPercentDelta,
+ uint256 decimals,
+ string calldata error
+ ) external pure;
+
+ /// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`.
+ /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100%
+ /// Formats values with decimals in failure message.
+ function assertApproxEqRelDecimal(int256 left, int256 right, uint256 maxPercentDelta, uint256 decimals)
+ external
+ pure;
+
+ /// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`.
+ /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100%
+ /// Formats values with decimals in failure message. Includes error message into revert string on failure.
+ function assertApproxEqRelDecimal(
+ int256 left,
+ int256 right,
+ uint256 maxPercentDelta,
+ uint256 decimals,
+ string calldata error
+ ) external pure;
+
+ /// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`.
+ /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100%
+ function assertApproxEqRel(uint256 left, uint256 right, uint256 maxPercentDelta) external pure;
+
+ /// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`.
+ /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100%
+ /// Includes error message into revert string on failure.
+ function assertApproxEqRel(uint256 left, uint256 right, uint256 maxPercentDelta, string calldata error)
+ external
+ pure;
+
+ /// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`.
+ /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100%
+ function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta) external pure;
+
+ /// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`.
+ /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100%
+ /// Includes error message into revert string on failure.
+ function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta, string calldata error) external pure;
+
+ /// Asserts that two `uint256` values are equal, formatting them with decimals in failure message.
+ function assertEqDecimal(uint256 left, uint256 right, uint256 decimals) external pure;
+
+ /// Asserts that two `uint256` values are equal, formatting them with decimals in failure message.
+ /// Includes error message into revert string on failure.
+ function assertEqDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure;
+
+ /// Asserts that two `int256` values are equal, formatting them with decimals in failure message.
+ function assertEqDecimal(int256 left, int256 right, uint256 decimals) external pure;
+
+ /// Asserts that two `int256` values are equal, formatting them with decimals in failure message.
+ /// Includes error message into revert string on failure.
+ function assertEqDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure;
+
+ /// Asserts that two `bool` values are equal.
+ function assertEq(bool left, bool right) external pure;
+
+ /// Asserts that two `bool` values are equal and includes error message into revert string on failure.
+ function assertEq(bool left, bool right, string calldata error) external pure;
+
+ /// Asserts that two `string` values are equal.
+ function assertEq(string calldata left, string calldata right) external pure;
+
+ /// Asserts that two `string` values are equal and includes error message into revert string on failure.
+ function assertEq(string calldata left, string calldata right, string calldata error) external pure;
+
+ /// Asserts that two `bytes` values are equal.
+ function assertEq(bytes calldata left, bytes calldata right) external pure;
+
+ /// Asserts that two `bytes` values are equal and includes error message into revert string on failure.
+ function assertEq(bytes calldata left, bytes calldata right, string calldata error) external pure;
+
+ /// Asserts that two arrays of `bool` values are equal.
+ function assertEq(bool[] calldata left, bool[] calldata right) external pure;
+
+ /// Asserts that two arrays of `bool` values are equal and includes error message into revert string on failure.
+ function assertEq(bool[] calldata left, bool[] calldata right, string calldata error) external pure;
+
+ /// Asserts that two arrays of `uint256 values are equal.
+ function assertEq(uint256[] calldata left, uint256[] calldata right) external pure;
+
+ /// Asserts that two arrays of `uint256` values are equal and includes error message into revert string on failure.
+ function assertEq(uint256[] calldata left, uint256[] calldata right, string calldata error) external pure;
+
+ /// Asserts that two arrays of `int256` values are equal.
+ function assertEq(int256[] calldata left, int256[] calldata right) external pure;
+
+ /// Asserts that two arrays of `int256` values are equal and includes error message into revert string on failure.
+ function assertEq(int256[] calldata left, int256[] calldata right, string calldata error) external pure;
+
+ /// Asserts that two `uint256` values are equal.
+ function assertEq(uint256 left, uint256 right) external pure;
+
+ /// Asserts that two arrays of `address` values are equal.
+ function assertEq(address[] calldata left, address[] calldata right) external pure;
+
+ /// Asserts that two arrays of `address` values are equal and includes error message into revert string on failure.
+ function assertEq(address[] calldata left, address[] calldata right, string calldata error) external pure;
+
+ /// Asserts that two arrays of `bytes32` values are equal.
+ function assertEq(bytes32[] calldata left, bytes32[] calldata right) external pure;
+
+ /// Asserts that two arrays of `bytes32` values are equal and includes error message into revert string on failure.
+ function assertEq(bytes32[] calldata left, bytes32[] calldata right, string calldata error) external pure;
+
+ /// Asserts that two arrays of `string` values are equal.
+ function assertEq(string[] calldata left, string[] calldata right) external pure;
+
+ /// Asserts that two arrays of `string` values are equal and includes error message into revert string on failure.
+ function assertEq(string[] calldata left, string[] calldata right, string calldata error) external pure;
+
+ /// Asserts that two arrays of `bytes` values are equal.
+ function assertEq(bytes[] calldata left, bytes[] calldata right) external pure;
+
+ /// Asserts that two arrays of `bytes` values are equal and includes error message into revert string on failure.
+ function assertEq(bytes[] calldata left, bytes[] calldata right, string calldata error) external pure;
+
+ /// Asserts that two `uint256` values are equal and includes error message into revert string on failure.
+ function assertEq(uint256 left, uint256 right, string calldata error) external pure;
+
+ /// Asserts that two `int256` values are equal.
+ function assertEq(int256 left, int256 right) external pure;
+
+ /// Asserts that two `int256` values are equal and includes error message into revert string on failure.
+ function assertEq(int256 left, int256 right, string calldata error) external pure;
+
+ /// Asserts that two `address` values are equal.
+ function assertEq(address left, address right) external pure;
+
+ /// Asserts that two `address` values are equal and includes error message into revert string on failure.
+ function assertEq(address left, address right, string calldata error) external pure;
+
+ /// Asserts that two `bytes32` values are equal.
+ function assertEq(bytes32 left, bytes32 right) external pure;
+
+ /// Asserts that two `bytes32` values are equal and includes error message into revert string on failure.
+ function assertEq(bytes32 left, bytes32 right, string calldata error) external pure;
+
+ /// Asserts that the given condition is false.
+ function assertFalse(bool condition) external pure;
+
+ /// Asserts that the given condition is false and includes error message into revert string on failure.
+ function assertFalse(bool condition, string calldata error) external pure;
+
+ /// Compares two `uint256` values. Expects first value to be greater than or equal to second.
+ /// Formats values with decimals in failure message.
+ function assertGeDecimal(uint256 left, uint256 right, uint256 decimals) external pure;
+
+ /// Compares two `uint256` values. Expects first value to be greater than or equal to second.
+ /// Formats values with decimals in failure message. Includes error message into revert string on failure.
+ function assertGeDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure;
+
+ /// Compares two `int256` values. Expects first value to be greater than or equal to second.
+ /// Formats values with decimals in failure message.
+ function assertGeDecimal(int256 left, int256 right, uint256 decimals) external pure;
+
+ /// Compares two `int256` values. Expects first value to be greater than or equal to second.
+ /// Formats values with decimals in failure message. Includes error message into revert string on failure.
+ function assertGeDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure;
+
+ /// Compares two `uint256` values. Expects first value to be greater than or equal to second.
+ function assertGe(uint256 left, uint256 right) external pure;
+
+ /// Compares two `uint256` values. Expects first value to be greater than or equal to second.
+ /// Includes error message into revert string on failure.
+ function assertGe(uint256 left, uint256 right, string calldata error) external pure;
+
+ /// Compares two `int256` values. Expects first value to be greater than or equal to second.
+ function assertGe(int256 left, int256 right) external pure;
+
+ /// Compares two `int256` values. Expects first value to be greater than or equal to second.
+ /// Includes error message into revert string on failure.
+ function assertGe(int256 left, int256 right, string calldata error) external pure;
+
+ /// Compares two `uint256` values. Expects first value to be greater than second.
+ /// Formats values with decimals in failure message.
+ function assertGtDecimal(uint256 left, uint256 right, uint256 decimals) external pure;
+
+ /// Compares two `uint256` values. Expects first value to be greater than second.
+ /// Formats values with decimals in failure message. Includes error message into revert string on failure.
+ function assertGtDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure;
+
+ /// Compares two `int256` values. Expects first value to be greater than second.
+ /// Formats values with decimals in failure message.
+ function assertGtDecimal(int256 left, int256 right, uint256 decimals) external pure;
+
+ /// Compares two `int256` values. Expects first value to be greater than second.
+ /// Formats values with decimals in failure message. Includes error message into revert string on failure.
+ function assertGtDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure;
+
+ /// Compares two `uint256` values. Expects first value to be greater than second.
+ function assertGt(uint256 left, uint256 right) external pure;
+
+ /// Compares two `uint256` values. Expects first value to be greater than second.
+ /// Includes error message into revert string on failure.
+ function assertGt(uint256 left, uint256 right, string calldata error) external pure;
+
+ /// Compares two `int256` values. Expects first value to be greater than second.
+ function assertGt(int256 left, int256 right) external pure;
+
+ /// Compares two `int256` values. Expects first value to be greater than second.
+ /// Includes error message into revert string on failure.
+ function assertGt(int256 left, int256 right, string calldata error) external pure;
+
+ /// Compares two `uint256` values. Expects first value to be less than or equal to second.
+ /// Formats values with decimals in failure message.
+ function assertLeDecimal(uint256 left, uint256 right, uint256 decimals) external pure;
+
+ /// Compares two `uint256` values. Expects first value to be less than or equal to second.
+ /// Formats values with decimals in failure message. Includes error message into revert string on failure.
+ function assertLeDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure;
+
+ /// Compares two `int256` values. Expects first value to be less than or equal to second.
+ /// Formats values with decimals in failure message.
+ function assertLeDecimal(int256 left, int256 right, uint256 decimals) external pure;
+
+ /// Compares two `int256` values. Expects first value to be less than or equal to second.
+ /// Formats values with decimals in failure message. Includes error message into revert string on failure.
+ function assertLeDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure;
+
+ /// Compares two `uint256` values. Expects first value to be less than or equal to second.
+ function assertLe(uint256 left, uint256 right) external pure;
+
+ /// Compares two `uint256` values. Expects first value to be less than or equal to second.
+ /// Includes error message into revert string on failure.
+ function assertLe(uint256 left, uint256 right, string calldata error) external pure;
+
+ /// Compares two `int256` values. Expects first value to be less than or equal to second.
+ function assertLe(int256 left, int256 right) external pure;
+
+ /// Compares two `int256` values. Expects first value to be less than or equal to second.
+ /// Includes error message into revert string on failure.
+ function assertLe(int256 left, int256 right, string calldata error) external pure;
+
+ /// Compares two `uint256` values. Expects first value to be less than second.
+ /// Formats values with decimals in failure message.
+ function assertLtDecimal(uint256 left, uint256 right, uint256 decimals) external pure;
+
+ /// Compares two `uint256` values. Expects first value to be less than second.
+ /// Formats values with decimals in failure message. Includes error message into revert string on failure.
+ function assertLtDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure;
+
+ /// Compares two `int256` values. Expects first value to be less than second.
+ /// Formats values with decimals in failure message.
+ function assertLtDecimal(int256 left, int256 right, uint256 decimals) external pure;
+
+ /// Compares two `int256` values. Expects first value to be less than second.
+ /// Formats values with decimals in failure message. Includes error message into revert string on failure.
+ function assertLtDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure;
+
+ /// Compares two `uint256` values. Expects first value to be less than second.
+ function assertLt(uint256 left, uint256 right) external pure;
+
+ /// Compares two `uint256` values. Expects first value to be less than second.
+ /// Includes error message into revert string on failure.
+ function assertLt(uint256 left, uint256 right, string calldata error) external pure;
+
+ /// Compares two `int256` values. Expects first value to be less than second.
+ function assertLt(int256 left, int256 right) external pure;
+
+ /// Compares two `int256` values. Expects first value to be less than second.
+ /// Includes error message into revert string on failure.
+ function assertLt(int256 left, int256 right, string calldata error) external pure;
+
+ /// Asserts that two `uint256` values are not equal, formatting them with decimals in failure message.
+ function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals) external pure;
+
+ /// Asserts that two `uint256` values are not equal, formatting them with decimals in failure message.
+ /// Includes error message into revert string on failure.
+ function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure;
+
+ /// Asserts that two `int256` values are not equal, formatting them with decimals in failure message.
+ function assertNotEqDecimal(int256 left, int256 right, uint256 decimals) external pure;
+
+ /// Asserts that two `int256` values are not equal, formatting them with decimals in failure message.
+ /// Includes error message into revert string on failure.
+ function assertNotEqDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure;
+
+ /// Asserts that two `bool` values are not equal.
+ function assertNotEq(bool left, bool right) external pure;
+
+ /// Asserts that two `bool` values are not equal and includes error message into revert string on failure.
+ function assertNotEq(bool left, bool right, string calldata error) external pure;
+
+ /// Asserts that two `string` values are not equal.
+ function assertNotEq(string calldata left, string calldata right) external pure;
+
+ /// Asserts that two `string` values are not equal and includes error message into revert string on failure.
+ function assertNotEq(string calldata left, string calldata right, string calldata error) external pure;
+
+ /// Asserts that two `bytes` values are not equal.
+ function assertNotEq(bytes calldata left, bytes calldata right) external pure;
+
+ /// Asserts that two `bytes` values are not equal and includes error message into revert string on failure.
+ function assertNotEq(bytes calldata left, bytes calldata right, string calldata error) external pure;
+
+ /// Asserts that two arrays of `bool` values are not equal.
+ function assertNotEq(bool[] calldata left, bool[] calldata right) external pure;
+
+ /// Asserts that two arrays of `bool` values are not equal and includes error message into revert string on failure.
+ function assertNotEq(bool[] calldata left, bool[] calldata right, string calldata error) external pure;
+
+ /// Asserts that two arrays of `uint256` values are not equal.
+ function assertNotEq(uint256[] calldata left, uint256[] calldata right) external pure;
+
+ /// Asserts that two arrays of `uint256` values are not equal and includes error message into revert string on failure.
+ function assertNotEq(uint256[] calldata left, uint256[] calldata right, string calldata error) external pure;
+
+ /// Asserts that two arrays of `int256` values are not equal.
+ function assertNotEq(int256[] calldata left, int256[] calldata right) external pure;
+
+ /// Asserts that two arrays of `int256` values are not equal and includes error message into revert string on failure.
+ function assertNotEq(int256[] calldata left, int256[] calldata right, string calldata error) external pure;
+
+ /// Asserts that two `uint256` values are not equal.
+ function assertNotEq(uint256 left, uint256 right) external pure;
+
+ /// Asserts that two arrays of `address` values are not equal.
+ function assertNotEq(address[] calldata left, address[] calldata right) external pure;
+
+ /// Asserts that two arrays of `address` values are not equal and includes error message into revert string on failure.
+ function assertNotEq(address[] calldata left, address[] calldata right, string calldata error) external pure;
+
+ /// Asserts that two arrays of `bytes32` values are not equal.
+ function assertNotEq(bytes32[] calldata left, bytes32[] calldata right) external pure;
+
+ /// Asserts that two arrays of `bytes32` values are not equal and includes error message into revert string on failure.
+ function assertNotEq(bytes32[] calldata left, bytes32[] calldata right, string calldata error) external pure;
+
+ /// Asserts that two arrays of `string` values are not equal.
+ function assertNotEq(string[] calldata left, string[] calldata right) external pure;
+
+ /// Asserts that two arrays of `string` values are not equal and includes error message into revert string on failure.
+ function assertNotEq(string[] calldata left, string[] calldata right, string calldata error) external pure;
+
+ /// Asserts that two arrays of `bytes` values are not equal.
+ function assertNotEq(bytes[] calldata left, bytes[] calldata right) external pure;
+
+ /// Asserts that two arrays of `bytes` values are not equal and includes error message into revert string on failure.
+ function assertNotEq(bytes[] calldata left, bytes[] calldata right, string calldata error) external pure;
+
+ /// Asserts that two `uint256` values are not equal and includes error message into revert string on failure.
+ function assertNotEq(uint256 left, uint256 right, string calldata error) external pure;
+
+ /// Asserts that two `int256` values are not equal.
+ function assertNotEq(int256 left, int256 right) external pure;
+
+ /// Asserts that two `int256` values are not equal and includes error message into revert string on failure.
+ function assertNotEq(int256 left, int256 right, string calldata error) external pure;
+
+ /// Asserts that two `address` values are not equal.
+ function assertNotEq(address left, address right) external pure;
+
+ /// Asserts that two `address` values are not equal and includes error message into revert string on failure.
+ function assertNotEq(address left, address right, string calldata error) external pure;
+
+ /// Asserts that two `bytes32` values are not equal.
+ function assertNotEq(bytes32 left, bytes32 right) external pure;
+
+ /// Asserts that two `bytes32` values are not equal and includes error message into revert string on failure.
+ function assertNotEq(bytes32 left, bytes32 right, string calldata error) external pure;
+
+ /// Asserts that the given condition is true.
+ function assertTrue(bool condition) external pure;
+
+ /// Asserts that the given condition is true and includes error message into revert string on failure.
+ function assertTrue(bool condition, string calldata error) external pure;
+
+ /// If the condition is false, discard this run's fuzz inputs and generate new ones.
+ function assume(bool condition) external pure;
+
+ /// Discard this run's fuzz inputs and generate new ones if next call reverted.
+ function assumeNoRevert() external pure;
+
+ /// Discard this run's fuzz inputs and generate new ones if next call reverts with the potential revert parameters.
+ function assumeNoRevert(PotentialRevert calldata potentialRevert) external pure;
+
+ /// Discard this run's fuzz inputs and generate new ones if next call reverts with the any of the potential revert parameters.
+ function assumeNoRevert(PotentialRevert[] calldata potentialReverts) external pure;
+
+ /// Writes a breakpoint to jump to in the debugger.
+ function breakpoint(string calldata char) external pure;
+
+ /// Writes a conditional breakpoint to jump to in the debugger.
+ function breakpoint(string calldata char, bool value) external pure;
+
+ /// Returns true if the current Foundry version is greater than or equal to the given version.
+ /// The given version string must be in the format `major.minor.patch`.
+ /// This is equivalent to `foundryVersionCmp(version) >= 0`.
+ function foundryVersionAtLeast(string calldata version) external view returns (bool);
+
+ /// Compares the current Foundry version with the given version string.
+ /// The given version string must be in the format `major.minor.patch`.
+ /// Returns:
+ /// -1 if current Foundry version is less than the given version
+ /// 0 if current Foundry version equals the given version
+ /// 1 if current Foundry version is greater than the given version
+ /// This result can then be used with a comparison operator against `0`.
+ /// For example, to check if the current Foundry version is greater than or equal to `1.0.0`:
+ /// `if (foundryVersionCmp("1.0.0") >= 0) { ... }`
+ function foundryVersionCmp(string calldata version) external view returns (int256);
+
+ /// Returns a Chain struct for specific alias
+ function getChain(string calldata chainAlias) external view returns (Chain memory chain);
+
+ /// Returns a Chain struct for specific chainId
+ function getChain(uint256 chainId) external view returns (Chain memory chain);
+
+ /// Returns the Foundry version.
+ /// Format: -+..
+ /// Sample output: 0.3.0-nightly+3cb96bde9b.1737036656.debug
+ /// Note: Build timestamps may vary slightly across platforms due to separate CI jobs.
+ /// For reliable version comparisons, use UNIX format (e.g., >= 1700000000)
+ /// to compare timestamps while ignoring minor time differences.
+ function getFoundryVersion() external view returns (string memory version);
+
+ /// Returns the RPC url for the given alias.
+ function rpcUrl(string calldata rpcAlias) external view returns (string memory json);
+
+ /// Returns all rpc urls and their aliases as structs.
+ function rpcUrlStructs() external view returns (Rpc[] memory urls);
+
+ /// Returns all rpc urls and their aliases `[alias, url][]`.
+ function rpcUrls() external view returns (string[2][] memory urls);
+
+ /// Suspends execution of the main thread for `duration` milliseconds.
+ function sleep(uint256 duration) external;
+
+ // ======== Toml ========
+
+ /// Checks if `key` exists in a TOML table.
+ function keyExistsToml(string calldata toml, string calldata key) external view returns (bool);
+
+ /// Parses a string of TOML data at `key` and coerces it to `address`.
+ function parseTomlAddress(string calldata toml, string calldata key) external pure returns (address);
+
+ /// Parses a string of TOML data at `key` and coerces it to `address[]`.
+ function parseTomlAddressArray(string calldata toml, string calldata key) external pure returns (address[] memory);
+
+ /// Parses a string of TOML data at `key` and coerces it to `bool`.
+ function parseTomlBool(string calldata toml, string calldata key) external pure returns (bool);
+
+ /// Parses a string of TOML data at `key` and coerces it to `bool[]`.
+ function parseTomlBoolArray(string calldata toml, string calldata key) external pure returns (bool[] memory);
+
+ /// Parses a string of TOML data at `key` and coerces it to `bytes`.
+ function parseTomlBytes(string calldata toml, string calldata key) external pure returns (bytes memory);
+
+ /// Parses a string of TOML data at `key` and coerces it to `bytes32`.
+ function parseTomlBytes32(string calldata toml, string calldata key) external pure returns (bytes32);
+
+ /// Parses a string of TOML data at `key` and coerces it to `bytes32[]`.
+ function parseTomlBytes32Array(string calldata toml, string calldata key) external pure returns (bytes32[] memory);
+
+ /// Parses a string of TOML data at `key` and coerces it to `bytes[]`.
+ function parseTomlBytesArray(string calldata toml, string calldata key) external pure returns (bytes[] memory);
+
+ /// Parses a string of TOML data at `key` and coerces it to `int256`.
+ function parseTomlInt(string calldata toml, string calldata key) external pure returns (int256);
+
+ /// Parses a string of TOML data at `key` and coerces it to `int256[]`.
+ function parseTomlIntArray(string calldata toml, string calldata key) external pure returns (int256[] memory);
+
+ /// Returns an array of all the keys in a TOML table.
+ function parseTomlKeys(string calldata toml, string calldata key) external pure returns (string[] memory keys);
+
+ /// Parses a string of TOML data at `key` and coerces it to `string`.
+ function parseTomlString(string calldata toml, string calldata key) external pure returns (string memory);
+
+ /// Parses a string of TOML data at `key` and coerces it to `string[]`.
+ function parseTomlStringArray(string calldata toml, string calldata key) external pure returns (string[] memory);
+
+ /// Parses a string of TOML data at `key` and coerces it to type array corresponding to `typeDescription`.
+ function parseTomlTypeArray(string calldata toml, string calldata key, string calldata typeDescription)
+ external
+ pure
+ returns (bytes memory);
+
+ /// Parses a string of TOML data and coerces it to type corresponding to `typeDescription`.
+ function parseTomlType(string calldata toml, string calldata typeDescription) external pure returns (bytes memory);
+
+ /// Parses a string of TOML data at `key` and coerces it to type corresponding to `typeDescription`.
+ function parseTomlType(string calldata toml, string calldata key, string calldata typeDescription)
+ external
+ pure
+ returns (bytes memory);
+
+ /// Parses a string of TOML data at `key` and coerces it to `uint256`.
+ function parseTomlUint(string calldata toml, string calldata key) external pure returns (uint256);
+
+ /// Parses a string of TOML data at `key` and coerces it to `uint256[]`.
+ function parseTomlUintArray(string calldata toml, string calldata key) external pure returns (uint256[] memory);
+
+ /// ABI-encodes a TOML table.
+ function parseToml(string calldata toml) external pure returns (bytes memory abiEncodedData);
+
+ /// ABI-encodes a TOML table at `key`.
+ function parseToml(string calldata toml, string calldata key) external pure returns (bytes memory abiEncodedData);
+
+ /// Takes serialized JSON, converts to TOML and write a serialized TOML to a file.
+ function writeToml(string calldata json, string calldata path) external;
+
+ /// Takes serialized JSON, converts to TOML and write a serialized TOML table to an **existing** TOML file, replacing a value with key =
+ /// This is useful to replace a specific value of a TOML file, without having to parse the entire thing.
+ /// This cheatcode will create new keys if they didn't previously exist.
+ function writeToml(string calldata json, string calldata path, string calldata valueKey) external;
+
+ // ======== Utilities ========
+
+ /// Returns an uint256 value bounded in given range and different from the current one.
+ function bound(uint256 current, uint256 min, uint256 max) external view returns (uint256);
+
+ /// Returns an int256 value bounded in given range and different from the current one.
+ function bound(int256 current, int256 min, int256 max) external view returns (int256);
+
+ /// Compute the address of a contract created with CREATE2 using the given CREATE2 deployer.
+ function computeCreate2Address(bytes32 salt, bytes32 initCodeHash, address deployer) external pure returns (address);
+
+ /// Compute the address of a contract created with CREATE2 using the default CREATE2 deployer.
+ function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) external pure returns (address);
+
+ /// Compute the address a contract will be deployed at for a given deployer address and nonce.
+ function computeCreateAddress(address deployer, uint256 nonce) external pure returns (address);
+
+ /// Utility cheatcode to copy storage of `from` contract to another `to` contract.
+ function copyStorage(address from, address to) external;
+
+ /// Generates the struct hash of the canonical EIP-712 type representation and its abi-encoded data.
+ /// Supports 2 different inputs:
+ /// 1. Name of the type (i.e. "PermitSingle"):
+ /// * requires previous binding generation with `forge bind-json`.
+ /// * bindings will be retrieved from the path configured in `foundry.toml`.
+ /// 2. String representation of the type (i.e. "Foo(Bar bar) Bar(uint256 baz)").
+ /// * Note: the cheatcode will use the canonical type even if the input is malformated
+ /// with the wrong order of elements or with extra whitespaces.
+ function eip712HashStruct(string calldata typeNameOrDefinition, bytes calldata abiEncodedData)
+ external
+ pure
+ returns (bytes32 typeHash);
+
+ /// Generates the struct hash of the canonical EIP-712 type representation and its abi-encoded data.
+ /// Requires previous binding generation with `forge bind-json`.
+ /// Params:
+ /// * `bindingsPath`: path where the output of `forge bind-json` is stored.
+ /// * `typeName`: Name of the type (i.e. "PermitSingle").
+ /// * `abiEncodedData`: ABI-encoded data for the struct that is being hashed.
+ function eip712HashStruct(string calldata bindingsPath, string calldata typeName, bytes calldata abiEncodedData)
+ external
+ pure
+ returns (bytes32 typeHash);
+
+ /// Generates the hash of the canonical EIP-712 type representation.
+ /// Supports 2 different inputs:
+ /// 1. Name of the type (i.e. "Transaction"):
+ /// * requires previous binding generation with `forge bind-json`.
+ /// * bindings will be retrieved from the path configured in `foundry.toml`.
+ /// 2. String representation of the type (i.e. "Foo(Bar bar) Bar(uint256 baz)").
+ /// * Note: the cheatcode will output the canonical type even if the input is malformated
+ /// with the wrong order of elements or with extra whitespaces.
+ function eip712HashType(string calldata typeNameOrDefinition) external pure returns (bytes32 typeHash);
+
+ /// Generates the hash of the canonical EIP-712 type representation.
+ /// Requires previous binding generation with `forge bind-json`.
+ /// Params:
+ /// * `bindingsPath`: path where the output of `forge bind-json` is stored.
+ /// * `typeName`: Name of the type (i.e. "Transaction").
+ function eip712HashType(string calldata bindingsPath, string calldata typeName)
+ external
+ pure
+ returns (bytes32 typeHash);
+
+ /// Generates a ready-to-sign digest of human-readable typed data following the EIP-712 standard.
+ function eip712HashTypedData(string calldata jsonData) external pure returns (bytes32 digest);
+
+ /// Returns ENS namehash for provided string.
+ function ensNamehash(string calldata name) external pure returns (bytes32);
+
+ /// RLP decodes an RLP payload into a list of bytes.
+ function fromRlp(bytes calldata rlp) external pure returns (bytes[] memory data);
+
+ /// Gets the label for the specified address.
+ function getLabel(address account) external view returns (string memory currentLabel);
+
+ /// Labels an address in call traces.
+ function label(address account, string calldata newLabel) external;
+
+ /// Pauses collection of call traces. Useful in cases when you want to skip tracing of
+ /// complex calls which are not useful for debugging.
+ function pauseTracing() external view;
+
+ /// Returns a random `address`.
+ function randomAddress() external view returns (address);
+
+ /// Returns a random `bool`.
+ function randomBool() external view returns (bool);
+
+ /// Returns a random byte array value of the given length.
+ function randomBytes(uint256 len) external view returns (bytes memory);
+
+ /// Returns a random fixed-size byte array of length 4.
+ function randomBytes4() external view returns (bytes4);
+
+ /// Returns a random fixed-size byte array of length 8.
+ function randomBytes8() external view returns (bytes8);
+
+ /// Returns a random `int256` value.
+ function randomInt() external view returns (int256);
+
+ /// Returns a random `int256` value of given bits.
+ function randomInt(uint256 bits) external view returns (int256);
+
+ /// Returns a random uint256 value.
+ function randomUint() external view returns (uint256);
+
+ /// Returns random uint256 value between the provided range (=min..=max).
+ function randomUint(uint256 min, uint256 max) external view returns (uint256);
+
+ /// Returns a random `uint256` value of given bits.
+ function randomUint(uint256 bits) external view returns (uint256);
+
+ /// Unpauses collection of call traces.
+ function resumeTracing() external view;
+
+ /// Utility cheatcode to set arbitrary storage for given target address.
+ function setArbitraryStorage(address target) external;
+
+ /// Utility cheatcode to set arbitrary storage for given target address and overwrite
+ /// any storage slots that have been previously set.
+ function setArbitraryStorage(address target, bool overwrite) external;
+
+ /// Set RNG seed.
+ function setSeed(uint256 seed) external;
+
+ /// Randomly shuffles an array.
+ function shuffle(uint256[] calldata array) external returns (uint256[] memory);
+
+ /// Sorts an array in ascending order.
+ function sort(uint256[] calldata array) external returns (uint256[] memory);
+
+ /// Encodes a `bytes` value to a base64url string.
+ function toBase64URL(bytes calldata data) external pure returns (string memory);
+
+ /// Encodes a `string` value to a base64url string.
+ function toBase64URL(string calldata data) external pure returns (string memory);
+
+ /// Encodes a `bytes` value to a base64 string.
+ function toBase64(bytes calldata data) external pure returns (string memory);
+
+ /// Encodes a `string` value to a base64 string.
+ function toBase64(string calldata data) external pure returns (string memory);
+
+ /// RLP encodes a list of bytes into an RLP payload.
+ function toRlp(bytes[] calldata data) external pure returns (bytes memory);
+}
+
+/// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used
+/// in tests, but it is not recommended to use these cheats in scripts.
+interface Vm is VmSafe {
+ // ======== EVM ========
+
+ /// Utility cheatcode to set an EIP-2930 access list for all subsequent transactions.
+ function accessList(AccessListItem[] calldata access) external;
+
+ /// Returns the identifier of the currently active fork. Reverts if no fork is currently active.
+ function activeFork() external view returns (uint256 forkId);
+
+ /// In forking mode, explicitly grant the given address cheatcode access.
+ function allowCheatcodes(address account) external;
+
+ /// Sets `block.blobbasefee`
+ function blobBaseFee(uint256 newBlobBaseFee) external;
+
+ /// Sets the blobhashes in the transaction.
+ /// Not available on EVM versions before Cancun.
+ /// If used on unsupported EVM versions it will revert.
+ function blobhashes(bytes32[] calldata hashes) external;
+
+ /// Sets `block.chainid`.
+ function chainId(uint256 newChainId) external;
+
+ /// Clears all mocked calls.
+ function clearMockedCalls() external;
+
+ /// Clones a source account code, state, balance and nonce to a target account and updates in-memory EVM state.
+ function cloneAccount(address source, address target) external;
+
+ /// Sets `block.coinbase`.
+ function coinbase(address newCoinbase) external;
+
+ /// Marks the slots of an account and the account address as cold.
+ function cool(address target) external;
+
+ /// Utility cheatcode to mark specific storage slot as cold, simulating no prior read.
+ function coolSlot(address target, bytes32 slot) external;
+
+ /// Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork.
+ function createFork(string calldata urlOrAlias) external returns (uint256 forkId);
+
+ /// Creates a new fork with the given endpoint and block and returns the identifier of the fork.
+ function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);
+
+ /// Creates a new fork with the given endpoint and at the block the given transaction was mined in,
+ /// replays all transaction mined in the block before the transaction, and returns the identifier of the fork.
+ function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);
+
+ /// Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork.
+ function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);
+
+ /// Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork.
+ function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);
+
+ /// Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in,
+ /// replays all transaction mined in the block before the transaction, returns the identifier of the fork.
+ function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);
+
+ /// Sets an address' balance.
+ function deal(address account, uint256 newBalance) external;
+
+ /// Removes the snapshot with the given ID created by `snapshot`.
+ /// Takes the snapshot ID to delete.
+ /// Returns `true` if the snapshot was successfully deleted.
+ /// Returns `false` if the snapshot does not exist.
+ function deleteStateSnapshot(uint256 snapshotId) external returns (bool success);
+
+ /// Removes _all_ snapshots previously created by `snapshot`.
+ function deleteStateSnapshots() external;
+
+ /// Sets `block.difficulty`.
+ /// Not available on EVM versions from Paris onwards. Use `prevrandao` instead.
+ /// Reverts if used on unsupported EVM versions.
+ function difficulty(uint256 newDifficulty) external;
+
+ /// Dump a genesis JSON file's `allocs` to disk.
+ function dumpState(string calldata pathToStateJson) external;
+
+ /// Sets an address' code.
+ function etch(address target, bytes calldata newRuntimeBytecode) external;
+
+ /// Sets `block.basefee`.
+ function fee(uint256 newBasefee) external;
+
+ /// Gets the blockhashes from the current transaction.
+ /// Not available on EVM versions before Cancun.
+ /// If used on unsupported EVM versions it will revert.
+ function getBlobhashes() external view returns (bytes32[] memory hashes);
+
+ /// Returns true if the account is marked as persistent.
+ function isPersistent(address account) external view returns (bool persistent);
+
+ /// Load a genesis JSON file's `allocs` into the in-memory EVM state.
+ function loadAllocs(string calldata pathToAllocsJson) external;
+
+ /// Marks that the account(s) should use persistent storage across fork swaps in a multifork setup
+ /// Meaning, changes made to the state of this account will be kept when switching forks.
+ function makePersistent(address account) external;
+
+ /// See `makePersistent(address)`.
+ function makePersistent(address account0, address account1) external;
+
+ /// See `makePersistent(address)`.
+ function makePersistent(address account0, address account1, address account2) external;
+
+ /// See `makePersistent(address)`.
+ function makePersistent(address[] calldata accounts) external;
+
+ /// Reverts a call to an address with specified revert data.
+ function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;
+
+ /// Reverts a call to an address with a specific `msg.value`, with specified revert data.
+ function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData) external;
+
+ /// Reverts a call to an address with specified revert data.
+ /// Overload to pass the function selector directly `token.approve.selector` instead of `abi.encodeWithSelector(token.approve.selector)`.
+ function mockCallRevert(address callee, bytes4 data, bytes calldata revertData) external;
+
+ /// Reverts a call to an address with a specific `msg.value`, with specified revert data.
+ /// Overload to pass the function selector directly `token.approve.selector` instead of `abi.encodeWithSelector(token.approve.selector)`.
+ function mockCallRevert(address callee, uint256 msgValue, bytes4 data, bytes calldata revertData) external;
+
+ /// Mocks a call to an address, returning specified data.
+ /// Calldata can either be strict or a partial match, e.g. if you only
+ /// pass a Solidity selector to the expected calldata, then the entire Solidity
+ /// function will be mocked.
+ function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;
+
+ /// Mocks a call to an address with a specific `msg.value`, returning specified data.
+ /// Calldata match takes precedence over `msg.value` in case of ambiguity.
+ function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;
+
+ /// Mocks a call to an address, returning specified data.
+ /// Calldata can either be strict or a partial match, e.g. if you only
+ /// pass a Solidity selector to the expected calldata, then the entire Solidity
+ /// function will be mocked.
+ /// Overload to pass the function selector directly `token.approve.selector` instead of `abi.encodeWithSelector(token.approve.selector)`.
+ function mockCall(address callee, bytes4 data, bytes calldata returnData) external;
+
+ /// Mocks a call to an address with a specific `msg.value`, returning specified data.
+ /// Calldata match takes precedence over `msg.value` in case of ambiguity.
+ /// Overload to pass the function selector directly `token.approve.selector` instead of `abi.encodeWithSelector(token.approve.selector)`.
+ function mockCall(address callee, uint256 msgValue, bytes4 data, bytes calldata returnData) external;
+
+ /// Mocks multiple calls to an address, returning specified data for each call.
+ function mockCalls(address callee, bytes calldata data, bytes[] calldata returnData) external;
+
+ /// Mocks multiple calls to an address with a specific `msg.value`, returning specified data for each call.
+ function mockCalls(address callee, uint256 msgValue, bytes calldata data, bytes[] calldata returnData) external;
+
+ /// Whenever a call is made to `callee` with calldata `data`, this cheatcode instead calls
+ /// `target` with the same calldata. This functionality is similar to a delegate call made to
+ /// `target` contract from `callee`.
+ /// Can be used to substitute a call to a function with another implementation that captures
+ /// the primary logic of the original function but is easier to reason about.
+ /// If calldata is not a strict match then partial match by selector is attempted.
+ function mockFunction(address callee, address target, bytes calldata data) external;
+
+ /// Utility cheatcode to remove any EIP-2930 access list set by `accessList` cheatcode.
+ function noAccessList() external;
+
+ /// Sets the *next* call's `msg.sender` to be the input address.
+ function prank(address msgSender) external;
+
+ /// Sets the *next* call's `msg.sender` to be the input address, and the `tx.origin` to be the second input.
+ function prank(address msgSender, address txOrigin) external;
+
+ /// Sets the *next* delegate call's `msg.sender` to be the input address.
+ function prank(address msgSender, bool delegateCall) external;
+
+ /// Sets the *next* delegate call's `msg.sender` to be the input address, and the `tx.origin` to be the second input.
+ function prank(address msgSender, address txOrigin, bool delegateCall) external;
+
+ /// Sets `block.prevrandao`.
+ /// Not available on EVM versions before Paris. Use `difficulty` instead.
+ /// If used on unsupported EVM versions it will revert.
+ function prevrandao(bytes32 newPrevrandao) external;
+
+ /// Sets `block.prevrandao`.
+ /// Not available on EVM versions before Paris. Use `difficulty` instead.
+ /// If used on unsupported EVM versions it will revert.
+ function prevrandao(uint256 newPrevrandao) external;
+
+ /// Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification.
+ function readCallers() external view returns (CallerMode callerMode, address msgSender, address txOrigin);
+
+ /// Resets the nonce of an account to 0 for EOAs and 1 for contract accounts.
+ function resetNonce(address account) external;
+
+ /// Revert the state of the EVM to a previous snapshot
+ /// Takes the snapshot ID to revert to.
+ /// Returns `true` if the snapshot was successfully reverted.
+ /// Returns `false` if the snapshot does not exist.
+ /// **Note:** This does not automatically delete the snapshot. To delete the snapshot use `deleteStateSnapshot`.
+ function revertToState(uint256 snapshotId) external returns (bool success);
+
+ /// Revert the state of the EVM to a previous snapshot and automatically deletes the snapshots
+ /// Takes the snapshot ID to revert to.
+ /// Returns `true` if the snapshot was successfully reverted and deleted.
+ /// Returns `false` if the snapshot does not exist.
+ function revertToStateAndDelete(uint256 snapshotId) external returns (bool success);
+
+ /// Revokes persistent status from the address, previously added via `makePersistent`.
+ function revokePersistent(address account) external;
+
+ /// See `revokePersistent(address)`.
+ function revokePersistent(address[] calldata accounts) external;
+
+ /// Sets `block.height`.
+ function roll(uint256 newHeight) external;
+
+ /// Updates the currently active fork to given block number
+ /// This is similar to `roll` but for the currently active fork.
+ function rollFork(uint256 blockNumber) external;
+
+ /// Updates the currently active fork to given transaction. This will `rollFork` with the number
+ /// of the block the transaction was mined in and replays all transaction mined before it in the block.
+ function rollFork(bytes32 txHash) external;
+
+ /// Updates the given fork to given block number.
+ function rollFork(uint256 forkId, uint256 blockNumber) external;
+
+ /// Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block.
+ function rollFork(uint256 forkId, bytes32 txHash) external;
+
+ /// Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.
+ function selectFork(uint256 forkId) external;
+
+ /// Set blockhash for the current block.
+ /// It only sets the blockhash for blocks where `block.number - 256 <= number < block.number`.
+ function setBlockhash(uint256 blockNumber, bytes32 blockHash) external;
+
+ /// Sets the nonce of an account. Must be higher than the current nonce of the account.
+ function setNonce(address account, uint64 newNonce) external;
+
+ /// Sets the nonce of an account to an arbitrary value.
+ function setNonceUnsafe(address account, uint64 newNonce) external;
+
+ /// Snapshot capture the gas usage of the last call by name from the callee perspective.
+ function snapshotGasLastCall(string calldata name) external returns (uint256 gasUsed);
+
+ /// Snapshot capture the gas usage of the last call by name in a group from the callee perspective.
+ function snapshotGasLastCall(string calldata group, string calldata name) external returns (uint256 gasUsed);
+
+ /// Snapshot the current state of the evm.
+ /// Returns the ID of the snapshot that was created.
+ /// To revert a snapshot use `revertToState`.
+ function snapshotState() external returns (uint256 snapshotId);
+
+ /// Snapshot capture an arbitrary numerical value by name.
+ /// The group name is derived from the contract name.
+ function snapshotValue(string calldata name, uint256 value) external;
+
+ /// Snapshot capture an arbitrary numerical value by name in a group.
+ function snapshotValue(string calldata group, string calldata name, uint256 value) external;
+
+ /// Sets all subsequent calls' `msg.sender` to be the input address until `stopPrank` is called.
+ function startPrank(address msgSender) external;
+
+ /// Sets all subsequent calls' `msg.sender` to be the input address until `stopPrank` is called, and the `tx.origin` to be the second input.
+ function startPrank(address msgSender, address txOrigin) external;
+
+ /// Sets all subsequent delegate calls' `msg.sender` to be the input address until `stopPrank` is called.
+ function startPrank(address msgSender, bool delegateCall) external;
+
+ /// Sets all subsequent delegate calls' `msg.sender` to be the input address until `stopPrank` is called, and the `tx.origin` to be the second input.
+ function startPrank(address msgSender, address txOrigin, bool delegateCall) external;
+
+ /// Start a snapshot capture of the current gas usage by name.
+ /// The group name is derived from the contract name.
+ function startSnapshotGas(string calldata name) external;
+
+ /// Start a snapshot capture of the current gas usage by name in a group.
+ function startSnapshotGas(string calldata group, string calldata name) external;
+
+ /// Resets subsequent calls' `msg.sender` to be `address(this)`.
+ function stopPrank() external;
+
+ /// Stop the snapshot capture of the current gas by latest snapshot name, capturing the gas used since the start.
+ function stopSnapshotGas() external returns (uint256 gasUsed);
+
+ /// Stop the snapshot capture of the current gas usage by name, capturing the gas used since the start.
+ /// The group name is derived from the contract name.
+ function stopSnapshotGas(string calldata name) external returns (uint256 gasUsed);
+
+ /// Stop the snapshot capture of the current gas usage by name in a group, capturing the gas used since the start.
+ function stopSnapshotGas(string calldata group, string calldata name) external returns (uint256 gasUsed);
+
+ /// Stores a value to an address' storage slot.
+ function store(address target, bytes32 slot, bytes32 value) external;
+
+ /// Fetches the given transaction from the active fork and executes it on the current state.
+ function transact(bytes32 txHash) external;
+
+ /// Fetches the given transaction from the given fork and executes it on the current state.
+ function transact(uint256 forkId, bytes32 txHash) external;
+
+ /// Sets `tx.gasprice`.
+ function txGasPrice(uint256 newGasPrice) external;
+
+ /// Utility cheatcode to mark specific storage slot as warm, simulating a prior read.
+ function warmSlot(address target, bytes32 slot) external;
+
+ /// Sets `block.timestamp`.
+ function warp(uint256 newTimestamp) external;
+
+ /// `deleteSnapshot` is being deprecated in favor of `deleteStateSnapshot`. It will be removed in future versions.
+ function deleteSnapshot(uint256 snapshotId) external returns (bool success);
+
+ /// `deleteSnapshots` is being deprecated in favor of `deleteStateSnapshots`. It will be removed in future versions.
+ function deleteSnapshots() external;
+
+ /// `revertToAndDelete` is being deprecated in favor of `revertToStateAndDelete`. It will be removed in future versions.
+ function revertToAndDelete(uint256 snapshotId) external returns (bool success);
+
+ /// `revertTo` is being deprecated in favor of `revertToState`. It will be removed in future versions.
+ function revertTo(uint256 snapshotId) external returns (bool success);
+
+ /// `snapshot` is being deprecated in favor of `snapshotState`. It will be removed in future versions.
+ function snapshot() external returns (uint256 snapshotId);
+
+ // ======== Testing ========
+
+ /// Expect a call to an address with the specified `msg.value` and calldata, and a *minimum* amount of gas.
+ function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;
+
+ /// Expect given number of calls to an address with the specified `msg.value` and calldata, and a *minimum* amount of gas.
+ function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)
+ external;
+
+ /// Expects a call to an address with the specified calldata.
+ /// Calldata can either be a strict or a partial match.
+ function expectCall(address callee, bytes calldata data) external;
+
+ /// Expects given number of calls to an address with the specified calldata.
+ function expectCall(address callee, bytes calldata data, uint64 count) external;
+
+ /// Expects a call to an address with the specified `msg.value` and calldata.
+ function expectCall(address callee, uint256 msgValue, bytes calldata data) external;
+
+ /// Expects given number of calls to an address with the specified `msg.value` and calldata.
+ function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;
+
+ /// Expect a call to an address with the specified `msg.value`, gas, and calldata.
+ function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;
+
+ /// Expects given number of calls to an address with the specified `msg.value`, gas, and calldata.
+ function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;
+
+ /// Expects the deployment of the specified bytecode by the specified address using the CREATE opcode
+ function expectCreate(bytes calldata bytecode, address deployer) external;
+
+ /// Expects the deployment of the specified bytecode by the specified address using the CREATE2 opcode
+ function expectCreate2(bytes calldata bytecode, address deployer) external;
+
+ /// Prepare an expected anonymous log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData.).
+ /// Call this function, then emit an anonymous event, then call a function. Internally after the call, we check if
+ /// logs were emitted in the expected order with the expected topics and data (as specified by the booleans).
+ function expectEmitAnonymous(bool checkTopic0, bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData)
+ external;
+
+ /// Same as the previous method, but also checks supplied address against emitting contract.
+ function expectEmitAnonymous(
+ bool checkTopic0,
+ bool checkTopic1,
+ bool checkTopic2,
+ bool checkTopic3,
+ bool checkData,
+ address emitter
+ ) external;
+
+ /// Prepare an expected anonymous log with all topic and data checks enabled.
+ /// Call this function, then emit an anonymous event, then call a function. Internally after the call, we check if
+ /// logs were emitted in the expected order with the expected topics and data.
+ function expectEmitAnonymous() external;
+
+ /// Same as the previous method, but also checks supplied address against emitting contract.
+ function expectEmitAnonymous(address emitter) external;
+
+ /// Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData.).
+ /// Call this function, then emit an event, then call a function. Internally after the call, we check if
+ /// logs were emitted in the expected order with the expected topics and data (as specified by the booleans).
+ function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;
+
+ /// Same as the previous method, but also checks supplied address against emitting contract.
+ function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter) external;
+
+ /// Prepare an expected log with all topic and data checks enabled.
+ /// Call this function, then emit an event, then call a function. Internally after the call, we check if
+ /// logs were emitted in the expected order with the expected topics and data.
+ function expectEmit() external;
+
+ /// Same as the previous method, but also checks supplied address against emitting contract.
+ function expectEmit(address emitter) external;
+
+ /// Expect a given number of logs with the provided topics.
+ function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, uint64 count) external;
+
+ /// Expect a given number of logs from a specific emitter with the provided topics.
+ function expectEmit(
+ bool checkTopic1,
+ bool checkTopic2,
+ bool checkTopic3,
+ bool checkData,
+ address emitter,
+ uint64 count
+ ) external;
+
+ /// Expect a given number of logs with all topic and data checks enabled.
+ function expectEmit(uint64 count) external;
+
+ /// Expect a given number of logs from a specific emitter with all topic and data checks enabled.
+ function expectEmit(address emitter, uint64 count) external;
+
+ /// Expects an error on next call that starts with the revert data.
+ function expectPartialRevert(bytes4 revertData) external;
+
+ /// Expects an error on next call to reverter address, that starts with the revert data.
+ function expectPartialRevert(bytes4 revertData, address reverter) external;
+
+ /// Expects an error on next call with any revert data.
+ function expectRevert() external;
+
+ /// Expects an error on next call that exactly matches the revert data.
+ function expectRevert(bytes4 revertData) external;
+
+ /// Expects a `count` number of reverts from the upcoming calls from the reverter address that match the revert data.
+ function expectRevert(bytes4 revertData, address reverter, uint64 count) external;
+
+ /// Expects a `count` number of reverts from the upcoming calls from the reverter address that exactly match the revert data.
+ function expectRevert(bytes calldata revertData, address reverter, uint64 count) external;
+
+ /// Expects an error on next call that exactly matches the revert data.
+ function expectRevert(bytes calldata revertData) external;
+
+ /// Expects an error with any revert data on next call to reverter address.
+ function expectRevert(address reverter) external;
+
+ /// Expects an error from reverter address on next call, with any revert data.
+ function expectRevert(bytes4 revertData, address reverter) external;
+
+ /// Expects an error from reverter address on next call, that exactly matches the revert data.
+ function expectRevert(bytes calldata revertData, address reverter) external;
+
+ /// Expects a `count` number of reverts from the upcoming calls with any revert data or reverter.
+ function expectRevert(uint64 count) external;
+
+ /// Expects a `count` number of reverts from the upcoming calls that match the revert data.
+ function expectRevert(bytes4 revertData, uint64 count) external;
+
+ /// Expects a `count` number of reverts from the upcoming calls that exactly match the revert data.
+ function expectRevert(bytes calldata revertData, uint64 count) external;
+
+ /// Expects a `count` number of reverts from the upcoming calls from the reverter address.
+ function expectRevert(address reverter, uint64 count) external;
+
+ /// Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other
+ /// memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.
+ function expectSafeMemory(uint64 min, uint64 max) external;
+
+ /// Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.
+ /// If any other memory is written to, the test will fail. Can be called multiple times to add more ranges
+ /// to the set.
+ function expectSafeMemoryCall(uint64 min, uint64 max) external;
+
+ /// Marks a test as skipped. Must be called at the top level of a test.
+ function skip(bool skipTest) external;
+
+ /// Marks a test as skipped with a reason. Must be called at the top level of a test.
+ function skip(bool skipTest, string calldata reason) external;
+
+ /// Stops all safe memory expectation in the current subcontext.
+ function stopExpectSafeMemory() external;
+
+ // ======== Utilities ========
+
+ /// Causes the next contract creation (via new) to fail and return its initcode in the returndata buffer.
+ /// This allows type-safe access to the initcode payload that would be used for contract creation.
+ /// Example usage:
+ /// vm.interceptInitcode();
+ /// bytes memory initcode;
+ /// try new MyContract(param1, param2) { assert(false); }
+ /// catch (bytes memory interceptedInitcode) { initcode = interceptedInitcode; }
+ function interceptInitcode() external;
+}
diff --git a/contracts/lib/forge-std/src/console.sol b/contracts/lib/forge-std/src/console.sol
new file mode 100644
index 0000000..4fdb667
--- /dev/null
+++ b/contracts/lib/forge-std/src/console.sol
@@ -0,0 +1,1560 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.4.22 <0.9.0;
+
+library console {
+ address constant CONSOLE_ADDRESS =
+ 0x000000000000000000636F6e736F6c652e6c6f67;
+
+ function _sendLogPayloadImplementation(bytes memory payload) internal view {
+ address consoleAddress = CONSOLE_ADDRESS;
+ /// @solidity memory-safe-assembly
+ assembly {
+ pop(
+ staticcall(
+ gas(),
+ consoleAddress,
+ add(payload, 32),
+ mload(payload),
+ 0,
+ 0
+ )
+ )
+ }
+ }
+
+ function _castToPure(
+ function(bytes memory) internal view fnIn
+ ) internal pure returns (function(bytes memory) pure fnOut) {
+ assembly {
+ fnOut := fnIn
+ }
+ }
+
+ function _sendLogPayload(bytes memory payload) internal pure {
+ _castToPure(_sendLogPayloadImplementation)(payload);
+ }
+
+ function log() internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log()"));
+ }
+
+ function logInt(int256 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(int256)", p0));
+ }
+
+ function logUint(uint256 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0));
+ }
+
+ function logString(string memory p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string)", p0));
+ }
+
+ function logBool(bool p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
+ }
+
+ function logAddress(address p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address)", p0));
+ }
+
+ function logBytes(bytes memory p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0));
+ }
+
+ function logBytes1(bytes1 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0));
+ }
+
+ function logBytes2(bytes2 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0));
+ }
+
+ function logBytes3(bytes3 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0));
+ }
+
+ function logBytes4(bytes4 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0));
+ }
+
+ function logBytes5(bytes5 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0));
+ }
+
+ function logBytes6(bytes6 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0));
+ }
+
+ function logBytes7(bytes7 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0));
+ }
+
+ function logBytes8(bytes8 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0));
+ }
+
+ function logBytes9(bytes9 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0));
+ }
+
+ function logBytes10(bytes10 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0));
+ }
+
+ function logBytes11(bytes11 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0));
+ }
+
+ function logBytes12(bytes12 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0));
+ }
+
+ function logBytes13(bytes13 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0));
+ }
+
+ function logBytes14(bytes14 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0));
+ }
+
+ function logBytes15(bytes15 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0));
+ }
+
+ function logBytes16(bytes16 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0));
+ }
+
+ function logBytes17(bytes17 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0));
+ }
+
+ function logBytes18(bytes18 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0));
+ }
+
+ function logBytes19(bytes19 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0));
+ }
+
+ function logBytes20(bytes20 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0));
+ }
+
+ function logBytes21(bytes21 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0));
+ }
+
+ function logBytes22(bytes22 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0));
+ }
+
+ function logBytes23(bytes23 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0));
+ }
+
+ function logBytes24(bytes24 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0));
+ }
+
+ function logBytes25(bytes25 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0));
+ }
+
+ function logBytes26(bytes26 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0));
+ }
+
+ function logBytes27(bytes27 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0));
+ }
+
+ function logBytes28(bytes28 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0));
+ }
+
+ function logBytes29(bytes29 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0));
+ }
+
+ function logBytes30(bytes30 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0));
+ }
+
+ function logBytes31(bytes31 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0));
+ }
+
+ function logBytes32(bytes32 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0));
+ }
+
+ function log(uint256 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0));
+ }
+
+ function log(int256 p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(int256)", p0));
+ }
+
+ function log(string memory p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string)", p0));
+ }
+
+ function log(bool p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
+ }
+
+ function log(address p0) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address)", p0));
+ }
+
+ function log(uint256 p0, uint256 p1) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256)", p0, p1));
+ }
+
+ function log(uint256 p0, string memory p1) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string)", p0, p1));
+ }
+
+ function log(uint256 p0, bool p1) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool)", p0, p1));
+ }
+
+ function log(uint256 p0, address p1) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address)", p0, p1));
+ }
+
+ function log(string memory p0, uint256 p1) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1));
+ }
+
+ function log(string memory p0, int256 p1) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,int256)", p0, p1));
+ }
+
+ function log(string memory p0, string memory p1) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1));
+ }
+
+ function log(string memory p0, bool p1) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1));
+ }
+
+ function log(string memory p0, address p1) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1));
+ }
+
+ function log(bool p0, uint256 p1) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256)", p0, p1));
+ }
+
+ function log(bool p0, string memory p1) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1));
+ }
+
+ function log(bool p0, bool p1) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1));
+ }
+
+ function log(bool p0, address p1) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1));
+ }
+
+ function log(address p0, uint256 p1) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256)", p0, p1));
+ }
+
+ function log(address p0, string memory p1) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1));
+ }
+
+ function log(address p0, bool p1) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1));
+ }
+
+ function log(address p0, address p1) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1));
+ }
+
+ function log(uint256 p0, uint256 p1, uint256 p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256)", p0, p1, p2));
+ }
+
+ function log(uint256 p0, uint256 p1, string memory p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string)", p0, p1, p2));
+ }
+
+ function log(uint256 p0, uint256 p1, bool p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool)", p0, p1, p2));
+ }
+
+ function log(uint256 p0, uint256 p1, address p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address)", p0, p1, p2));
+ }
+
+ function log(uint256 p0, string memory p1, uint256 p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256)", p0, p1, p2));
+ }
+
+ function log(uint256 p0, string memory p1, string memory p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string)", p0, p1, p2));
+ }
+
+ function log(uint256 p0, string memory p1, bool p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool)", p0, p1, p2));
+ }
+
+ function log(uint256 p0, string memory p1, address p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address)", p0, p1, p2));
+ }
+
+ function log(uint256 p0, bool p1, uint256 p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256)", p0, p1, p2));
+ }
+
+ function log(uint256 p0, bool p1, string memory p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string)", p0, p1, p2));
+ }
+
+ function log(uint256 p0, bool p1, bool p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool)", p0, p1, p2));
+ }
+
+ function log(uint256 p0, bool p1, address p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address)", p0, p1, p2));
+ }
+
+ function log(uint256 p0, address p1, uint256 p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256)", p0, p1, p2));
+ }
+
+ function log(uint256 p0, address p1, string memory p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string)", p0, p1, p2));
+ }
+
+ function log(uint256 p0, address p1, bool p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool)", p0, p1, p2));
+ }
+
+ function log(uint256 p0, address p1, address p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address)", p0, p1, p2));
+ }
+
+ function log(string memory p0, uint256 p1, uint256 p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256)", p0, p1, p2));
+ }
+
+ function log(string memory p0, uint256 p1, string memory p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string)", p0, p1, p2));
+ }
+
+ function log(string memory p0, uint256 p1, bool p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool)", p0, p1, p2));
+ }
+
+ function log(string memory p0, uint256 p1, address p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address)", p0, p1, p2));
+ }
+
+ function log(string memory p0, string memory p1, uint256 p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256)", p0, p1, p2));
+ }
+
+ function log(string memory p0, string memory p1, string memory p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2));
+ }
+
+ function log(string memory p0, string memory p1, bool p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2));
+ }
+
+ function log(string memory p0, string memory p1, address p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2));
+ }
+
+ function log(string memory p0, bool p1, uint256 p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256)", p0, p1, p2));
+ }
+
+ function log(string memory p0, bool p1, string memory p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2));
+ }
+
+ function log(string memory p0, bool p1, bool p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2));
+ }
+
+ function log(string memory p0, bool p1, address p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2));
+ }
+
+ function log(string memory p0, address p1, uint256 p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256)", p0, p1, p2));
+ }
+
+ function log(string memory p0, address p1, string memory p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2));
+ }
+
+ function log(string memory p0, address p1, bool p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2));
+ }
+
+ function log(string memory p0, address p1, address p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2));
+ }
+
+ function log(bool p0, uint256 p1, uint256 p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256)", p0, p1, p2));
+ }
+
+ function log(bool p0, uint256 p1, string memory p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string)", p0, p1, p2));
+ }
+
+ function log(bool p0, uint256 p1, bool p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool)", p0, p1, p2));
+ }
+
+ function log(bool p0, uint256 p1, address p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address)", p0, p1, p2));
+ }
+
+ function log(bool p0, string memory p1, uint256 p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256)", p0, p1, p2));
+ }
+
+ function log(bool p0, string memory p1, string memory p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2));
+ }
+
+ function log(bool p0, string memory p1, bool p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2));
+ }
+
+ function log(bool p0, string memory p1, address p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2));
+ }
+
+ function log(bool p0, bool p1, uint256 p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256)", p0, p1, p2));
+ }
+
+ function log(bool p0, bool p1, string memory p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2));
+ }
+
+ function log(bool p0, bool p1, bool p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2));
+ }
+
+ function log(bool p0, bool p1, address p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2));
+ }
+
+ function log(bool p0, address p1, uint256 p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256)", p0, p1, p2));
+ }
+
+ function log(bool p0, address p1, string memory p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2));
+ }
+
+ function log(bool p0, address p1, bool p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2));
+ }
+
+ function log(bool p0, address p1, address p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2));
+ }
+
+ function log(address p0, uint256 p1, uint256 p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256)", p0, p1, p2));
+ }
+
+ function log(address p0, uint256 p1, string memory p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string)", p0, p1, p2));
+ }
+
+ function log(address p0, uint256 p1, bool p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool)", p0, p1, p2));
+ }
+
+ function log(address p0, uint256 p1, address p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address)", p0, p1, p2));
+ }
+
+ function log(address p0, string memory p1, uint256 p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256)", p0, p1, p2));
+ }
+
+ function log(address p0, string memory p1, string memory p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2));
+ }
+
+ function log(address p0, string memory p1, bool p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2));
+ }
+
+ function log(address p0, string memory p1, address p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2));
+ }
+
+ function log(address p0, bool p1, uint256 p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256)", p0, p1, p2));
+ }
+
+ function log(address p0, bool p1, string memory p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2));
+ }
+
+ function log(address p0, bool p1, bool p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2));
+ }
+
+ function log(address p0, bool p1, address p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2));
+ }
+
+ function log(address p0, address p1, uint256 p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256)", p0, p1, p2));
+ }
+
+ function log(address p0, address p1, string memory p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2));
+ }
+
+ function log(address p0, address p1, bool p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2));
+ }
+
+ function log(address p0, address p1, address p2) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2));
+ }
+
+ function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,string)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,bool)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,address)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,string)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,bool)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,address)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,string)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,bool)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,address)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,string)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,bool)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,address)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,string)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,bool)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,address)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,string)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,bool)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,address)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,string)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,bool)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,address)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,string)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,bool)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, string memory p1, address p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,address)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,string)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,bool)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,address)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,string)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,bool)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,address)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,string)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,bool)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, bool p1, bool p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,address)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,string)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, bool p1, address p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,bool)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, bool p1, address p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,address)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,string)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,bool)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,address)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,string)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,bool)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, address p1, string memory p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,address)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,string)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, address p1, bool p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,bool)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, address p1, bool p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,address)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, address p1, address p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,string)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, address p1, address p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,bool)", p0, p1, p2, p3));
+ }
+
+ function log(uint256 p0, address p1, address p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,address)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,string)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,bool)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,address)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,string)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,bool)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,address)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,string)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,bool)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,address)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,string)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,bool)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, uint256 p1, address p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,address)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,string)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,bool)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,address)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, string memory p1, bool p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, string memory p1, address p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, string memory p1, address p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,string)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,bool)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,address)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, bool p1, string memory p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, bool p1, bool p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, bool p1, bool p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, bool p1, address p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, bool p1, address p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, bool p1, address p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,string)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,bool)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, address p1, uint256 p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,address)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, address p1, string memory p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, address p1, string memory p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, address p1, bool p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, address p1, bool p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, address p1, bool p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, address p1, address p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, address p1, address p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, address p1, address p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3));
+ }
+
+ function log(string memory p0, address p1, address p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,string)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,bool)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,address)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,string)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,bool)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,address)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,string)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,bool)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, uint256 p1, bool p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,address)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,string)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, uint256 p1, address p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,bool)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, uint256 p1, address p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,address)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,string)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,bool)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,address)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, string memory p1, string memory p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, string memory p1, bool p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, string memory p1, bool p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, string memory p1, address p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, string memory p1, address p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, string memory p1, address p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,string)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,bool)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, bool p1, uint256 p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,address)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, bool p1, string memory p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, bool p1, string memory p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, bool p1, bool p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, bool p1, bool p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, bool p1, bool p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, bool p1, address p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, bool p1, address p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, bool p1, address p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, bool p1, address p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,string)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, address p1, uint256 p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,bool)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, address p1, uint256 p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,address)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, address p1, string memory p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, address p1, string memory p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, address p1, string memory p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, address p1, bool p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, address p1, bool p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, address p1, bool p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, address p1, bool p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, address p1, address p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, address p1, address p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, address p1, address p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3));
+ }
+
+ function log(bool p0, address p1, address p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,string)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,bool)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,address)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,string)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,bool)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, uint256 p1, string memory p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,address)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,string)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, uint256 p1, bool p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,bool)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, uint256 p1, bool p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,address)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, uint256 p1, address p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,string)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, uint256 p1, address p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,bool)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, uint256 p1, address p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,address)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,string)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,bool)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, string memory p1, uint256 p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,address)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, string memory p1, string memory p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, string memory p1, string memory p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, string memory p1, bool p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, string memory p1, bool p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, string memory p1, bool p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, string memory p1, address p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, string memory p1, address p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, string memory p1, address p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, string memory p1, address p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,string)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, bool p1, uint256 p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,bool)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, bool p1, uint256 p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,address)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, bool p1, string memory p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, bool p1, string memory p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, bool p1, string memory p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, bool p1, bool p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, bool p1, bool p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, bool p1, bool p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, bool p1, bool p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, bool p1, address p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, bool p1, address p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, bool p1, address p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, bool p1, address p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, address p1, uint256 p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,string)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, address p1, uint256 p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,bool)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, address p1, uint256 p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,address)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, address p1, string memory p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, address p1, string memory p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, address p1, string memory p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, address p1, string memory p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, address p1, bool p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, address p1, bool p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, address p1, bool p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, address p1, bool p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, address p1, address p2, uint256 p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint256)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, address p1, address p2, string memory p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, address p1, address p2, bool p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3));
+ }
+
+ function log(address p0, address p1, address p2, address p3) internal pure {
+ _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3));
+ }
+}
diff --git a/contracts/lib/forge-std/src/console2.sol b/contracts/lib/forge-std/src/console2.sol
new file mode 100644
index 0000000..03531d9
--- /dev/null
+++ b/contracts/lib/forge-std/src/console2.sol
@@ -0,0 +1,4 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.4.22 <0.9.0;
+
+import {console as console2} from "./console.sol";
diff --git a/contracts/lib/forge-std/src/interfaces/IERC1155.sol b/contracts/lib/forge-std/src/interfaces/IERC1155.sol
new file mode 100644
index 0000000..ffc8298
--- /dev/null
+++ b/contracts/lib/forge-std/src/interfaces/IERC1155.sol
@@ -0,0 +1,105 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2;
+
+import {IERC165} from "./IERC165.sol";
+
+/// @title ERC-1155 Multi Token Standard
+/// @dev See https://eips.ethereum.org/EIPS/eip-1155
+/// Note: The ERC-165 identifier for this interface is 0xd9b67a26.
+interface IERC1155 is IERC165 {
+ /// @dev
+ /// - Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard).
+ /// - The `_operator` argument MUST be the address of an account/contract that is approved to make the transfer (SHOULD be msg.sender).
+ /// - The `_from` argument MUST be the address of the holder whose balance is decreased.
+ /// - The `_to` argument MUST be the address of the recipient whose balance is increased.
+ /// - The `_id` argument MUST be the token type being transferred.
+ /// - The `_value` argument MUST be the number of tokens the holder balance is decreased by and match what the recipient balance is increased by.
+ /// - When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).
+ /// - When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).
+ event TransferSingle(
+ address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value
+ );
+
+ /// @dev
+ /// - Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard).
+ /// - The `_operator` argument MUST be the address of an account/contract that is approved to make the transfer (SHOULD be msg.sender).
+ /// - The `_from` argument MUST be the address of the holder whose balance is decreased.
+ /// - The `_to` argument MUST be the address of the recipient whose balance is increased.
+ /// - The `_ids` argument MUST be the list of tokens being transferred.
+ /// - The `_values` argument MUST be the list of number of tokens (matching the list and order of tokens specified in _ids) the holder balance is decreased by and match what the recipient balance is increased by.
+ /// - When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).
+ /// - When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).
+ event TransferBatch(
+ address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values
+ );
+
+ /// @dev MUST emit when approval for a second party/operator address to manage all tokens for an owner address is enabled or disabled (absence of an event assumes disabled).
+ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);
+
+ /// @dev MUST emit when the URI is updated for a token ID. URIs are defined in RFC 3986.
+ /// The URI MUST point to a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema".
+ event URI(string _value, uint256 indexed _id);
+
+ /// @notice Transfers `_value` amount of an `_id` from the `_from` address to the `_to` address specified (with safety call).
+ /// @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard).
+ /// - MUST revert if `_to` is the zero address.
+ /// - MUST revert if balance of holder for token `_id` is lower than the `_value` sent.
+ /// - MUST revert on any other error.
+ /// - MUST emit the `TransferSingle` event to reflect the balance change (see "Safe Transfer Rules" section of the standard).
+ /// - After the above conditions are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard).
+ /// @param _from Source address
+ /// @param _to Target address
+ /// @param _id ID of the token type
+ /// @param _value Transfer amount
+ /// @param _data Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `_to`
+ function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data) external;
+
+ /// @notice Transfers `_values` amount(s) of `_ids` from the `_from` address to the `_to` address specified (with safety call).
+ /// @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard).
+ /// - MUST revert if `_to` is the zero address.
+ /// - MUST revert if length of `_ids` is not the same as length of `_values`.
+ /// - MUST revert if any of the balance(s) of the holder(s) for token(s) in `_ids` is lower than the respective amount(s) in `_values` sent to the recipient.
+ /// - MUST revert on any other error.
+ /// - MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see "Safe Transfer Rules" section of the standard).
+ /// - Balance changes and events MUST follow the ordering of the arrays (_ids[0]/_values[0] before _ids[1]/_values[1], etc).
+ /// - After the above conditions for the transfer(s) in the batch are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard).
+ /// @param _from Source address
+ /// @param _to Target address
+ /// @param _ids IDs of each token type (order and length must match _values array)
+ /// @param _values Transfer amounts per token type (order and length must match _ids array)
+ /// @param _data Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `_to`
+ function safeBatchTransferFrom(
+ address _from,
+ address _to,
+ uint256[] calldata _ids,
+ uint256[] calldata _values,
+ bytes calldata _data
+ ) external;
+
+ /// @notice Get the balance of an account's tokens.
+ /// @param _owner The address of the token holder
+ /// @param _id ID of the token
+ /// @return The _owner's balance of the token type requested
+ function balanceOf(address _owner, uint256 _id) external view returns (uint256);
+
+ /// @notice Get the balance of multiple account/token pairs
+ /// @param _owners The addresses of the token holders
+ /// @param _ids ID of the tokens
+ /// @return The _owner's balance of the token types requested (i.e. balance for each (owner, id) pair)
+ function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids)
+ external
+ view
+ returns (uint256[] memory);
+
+ /// @notice Enable or disable approval for a third party ("operator") to manage all of the caller's tokens.
+ /// @dev MUST emit the ApprovalForAll event on success.
+ /// @param _operator Address to add to the set of authorized operators
+ /// @param _approved True if the operator is approved, false to revoke approval
+ function setApprovalForAll(address _operator, bool _approved) external;
+
+ /// @notice Queries the approval status of an operator for a given owner.
+ /// @param _owner The owner of the tokens
+ /// @param _operator Address of authorized operator
+ /// @return True if the operator is approved, false if not
+ function isApprovedForAll(address _owner, address _operator) external view returns (bool);
+}
diff --git a/contracts/lib/forge-std/src/interfaces/IERC165.sol b/contracts/lib/forge-std/src/interfaces/IERC165.sol
new file mode 100644
index 0000000..9af4bf8
--- /dev/null
+++ b/contracts/lib/forge-std/src/interfaces/IERC165.sol
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2;
+
+interface IERC165 {
+ /// @notice Query if a contract implements an interface
+ /// @param interfaceID The interface identifier, as specified in ERC-165
+ /// @dev Interface identification is specified in ERC-165. This function
+ /// uses less than 30,000 gas.
+ /// @return `true` if the contract implements `interfaceID` and
+ /// `interfaceID` is not 0xffffffff, `false` otherwise
+ function supportsInterface(bytes4 interfaceID) external view returns (bool);
+}
diff --git a/contracts/lib/forge-std/src/interfaces/IERC20.sol b/contracts/lib/forge-std/src/interfaces/IERC20.sol
new file mode 100644
index 0000000..ba40806
--- /dev/null
+++ b/contracts/lib/forge-std/src/interfaces/IERC20.sol
@@ -0,0 +1,43 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2;
+
+/// @dev Interface of the ERC20 standard as defined in the EIP.
+/// @dev This includes the optional name, symbol, and decimals metadata.
+interface IERC20 {
+ /// @dev Emitted when `value` tokens are moved from one account (`from`) to another (`to`).
+ event Transfer(address indexed from, address indexed to, uint256 value);
+
+ /// @dev Emitted when the allowance of a `spender` for an `owner` is set, where `value`
+ /// is the new allowance.
+ event Approval(address indexed owner, address indexed spender, uint256 value);
+
+ /// @notice Returns the amount of tokens in existence.
+ function totalSupply() external view returns (uint256);
+
+ /// @notice Returns the amount of tokens owned by `account`.
+ function balanceOf(address account) external view returns (uint256);
+
+ /// @notice Moves `amount` tokens from the caller's account to `to`.
+ function transfer(address to, uint256 amount) external returns (bool);
+
+ /// @notice Returns the remaining number of tokens that `spender` is allowed
+ /// to spend on behalf of `owner`
+ function allowance(address owner, address spender) external view returns (uint256);
+
+ /// @notice Sets `amount` as the allowance of `spender` over the caller's tokens.
+ /// @dev Be aware of front-running risks: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
+ function approve(address spender, uint256 amount) external returns (bool);
+
+ /// @notice Moves `amount` tokens from `from` to `to` using the allowance mechanism.
+ /// `amount` is then deducted from the caller's allowance.
+ function transferFrom(address from, address to, uint256 amount) external returns (bool);
+
+ /// @notice Returns the name of the token.
+ function name() external view returns (string memory);
+
+ /// @notice Returns the symbol of the token.
+ function symbol() external view returns (string memory);
+
+ /// @notice Returns the decimals places of the token.
+ function decimals() external view returns (uint8);
+}
diff --git a/contracts/lib/forge-std/src/interfaces/IERC4626.sol b/contracts/lib/forge-std/src/interfaces/IERC4626.sol
new file mode 100644
index 0000000..c645a0f
--- /dev/null
+++ b/contracts/lib/forge-std/src/interfaces/IERC4626.sol
@@ -0,0 +1,190 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2;
+
+import {IERC20} from "./IERC20.sol";
+
+/// @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in
+/// https://eips.ethereum.org/EIPS/eip-4626
+interface IERC4626 is IERC20 {
+ event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);
+
+ event Withdraw(
+ address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares
+ );
+
+ /// @notice Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.
+ /// @dev
+ /// - MUST be an ERC-20 token contract.
+ /// - MUST NOT revert.
+ function asset() external view returns (address assetTokenAddress);
+
+ /// @notice Returns the total amount of the underlying asset that is “managed” by Vault.
+ /// @dev
+ /// - SHOULD include any compounding that occurs from yield.
+ /// - MUST be inclusive of any fees that are charged against assets in the Vault.
+ /// - MUST NOT revert.
+ function totalAssets() external view returns (uint256 totalManagedAssets);
+
+ /// @notice Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal
+ /// scenario where all the conditions are met.
+ /// @dev
+ /// - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
+ /// - MUST NOT show any variations depending on the caller.
+ /// - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
+ /// - MUST NOT revert.
+ ///
+ /// NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
+ /// “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
+ /// from.
+ function convertToShares(uint256 assets) external view returns (uint256 shares);
+
+ /// @notice Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal
+ /// scenario where all the conditions are met.
+ /// @dev
+ /// - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
+ /// - MUST NOT show any variations depending on the caller.
+ /// - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
+ /// - MUST NOT revert.
+ ///
+ /// NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
+ /// “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
+ /// from.
+ function convertToAssets(uint256 shares) external view returns (uint256 assets);
+
+ /// @notice Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,
+ /// through a deposit call.
+ /// @dev
+ /// - MUST return a limited value if receiver is subject to some deposit limit.
+ /// - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.
+ /// - MUST NOT revert.
+ function maxDeposit(address receiver) external view returns (uint256 maxAssets);
+
+ /// @notice Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given
+ /// current on-chain conditions.
+ /// @dev
+ /// - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit
+ /// call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called
+ /// in the same transaction.
+ /// - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the
+ /// deposit would be accepted, regardless if the user has enough tokens approved, etc.
+ /// - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
+ /// - MUST NOT revert.
+ ///
+ /// NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in
+ /// share price or some other type of condition, meaning the depositor will lose assets by depositing.
+ function previewDeposit(uint256 assets) external view returns (uint256 shares);
+
+ /// @notice Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.
+ /// @dev
+ /// - MUST emit the Deposit event.
+ /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
+ /// deposit execution, and are accounted for during deposit.
+ /// - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not
+ /// approving enough underlying tokens to the Vault contract, etc).
+ ///
+ /// NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
+ function deposit(uint256 assets, address receiver) external returns (uint256 shares);
+
+ /// @notice Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.
+ /// @dev
+ /// - MUST return a limited value if receiver is subject to some mint limit.
+ /// - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.
+ /// - MUST NOT revert.
+ function maxMint(address receiver) external view returns (uint256 maxShares);
+
+ /// @notice Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given
+ /// current on-chain conditions.
+ /// @dev
+ /// - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call
+ /// in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the
+ /// same transaction.
+ /// - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint
+ /// would be accepted, regardless if the user has enough tokens approved, etc.
+ /// - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
+ /// - MUST NOT revert.
+ ///
+ /// NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in
+ /// share price or some other type of condition, meaning the depositor will lose assets by minting.
+ function previewMint(uint256 shares) external view returns (uint256 assets);
+
+ /// @notice Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.
+ /// @dev
+ /// - MUST emit the Deposit event.
+ /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint
+ /// execution, and are accounted for during mint.
+ /// - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not
+ /// approving enough underlying tokens to the Vault contract, etc).
+ ///
+ /// NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
+ function mint(uint256 shares, address receiver) external returns (uint256 assets);
+
+ /// @notice Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the
+ /// Vault, through a withdrawal call.
+ /// @dev
+ /// - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
+ /// - MUST NOT revert.
+ function maxWithdraw(address owner) external view returns (uint256 maxAssets);
+
+ /// @notice Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,
+ /// given current on-chain conditions.
+ /// @dev
+ /// - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw
+ /// call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if
+ /// called
+ /// in the same transaction.
+ /// - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though
+ /// the withdrawal would be accepted, regardless if the user has enough shares, etc.
+ /// - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
+ /// - MUST NOT revert.
+ ///
+ /// NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in
+ /// share price or some other type of condition, meaning the depositor will lose assets by depositing.
+ function previewWithdraw(uint256 assets) external view returns (uint256 shares);
+
+ /// @notice Burns shares from owner and sends exactly assets of underlying tokens to receiver.
+ /// @dev
+ /// - MUST emit the Withdraw event.
+ /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
+ /// withdraw execution, and are accounted for during withdrawal.
+ /// - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner
+ /// not having enough shares, etc).
+ ///
+ /// Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
+ /// Those methods should be performed separately.
+ function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);
+
+ /// @notice Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,
+ /// through a redeem call.
+ /// @dev
+ /// - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
+ /// - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.
+ /// - MUST NOT revert.
+ function maxRedeem(address owner) external view returns (uint256 maxShares);
+
+ /// @notice Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,
+ /// given current on-chain conditions.
+ /// @dev
+ /// - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call
+ /// in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the
+ /// same transaction.
+ /// - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the
+ /// redemption would be accepted, regardless if the user has enough shares, etc.
+ /// - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
+ /// - MUST NOT revert.
+ ///
+ /// NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in
+ /// share price or some other type of condition, meaning the depositor will lose assets by redeeming.
+ function previewRedeem(uint256 shares) external view returns (uint256 assets);
+
+ /// @notice Burns exactly shares from owner and sends assets of underlying tokens to receiver.
+ /// @dev
+ /// - MUST emit the Withdraw event.
+ /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
+ /// redeem execution, and are accounted for during redeem.
+ /// - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner
+ /// not having enough shares, etc).
+ ///
+ /// NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
+ /// Those methods should be performed separately.
+ function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);
+}
diff --git a/contracts/lib/forge-std/src/interfaces/IERC6909.sol b/contracts/lib/forge-std/src/interfaces/IERC6909.sol
new file mode 100644
index 0000000..6e11cb4
--- /dev/null
+++ b/contracts/lib/forge-std/src/interfaces/IERC6909.sol
@@ -0,0 +1,72 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2;
+
+import {IERC165} from "./IERC165.sol";
+
+/// @dev Required interface of an ERC-6909 compliant contract, as defined in
+/// https://eips.ethereum.org/EIPS/eip-6909
+interface IERC6909 is IERC165 {
+ /// @dev Emitted when the allowance of a `spender` for an `owner` is set for a token of type `id`.
+ event Approval(address indexed owner, address indexed spender, uint256 indexed id, uint256 amount);
+
+ /// @dev Emitted when `owner` grants or revokes operator status for a `spender`.
+ event OperatorSet(address indexed owner, address indexed spender, bool approved);
+
+ /// @dev Emitted when `amount` tokens of type `id` are moved from `sender` to `receiver` initiated by `caller`.
+ event Transfer(
+ address caller, address indexed sender, address indexed receiver, uint256 indexed id, uint256 amount
+ );
+
+ ///@dev Returns the amount of tokens of type `id` owned by `owner`.
+ function balanceOf(address owner, uint256 id) external view returns (uint256);
+
+ /// @dev Returns the amount of tokens of type `id` that `spender` is allowed to spend on behalf of `owner`.
+ /// NOTE: Does not include operator allowances.
+ function allowance(address owner, address spender, uint256 id) external view returns (uint256);
+
+ /// @dev Returns true if `spender` is set as an operator for `owner`.
+ function isOperator(address owner, address spender) external view returns (bool);
+
+ /// @dev Sets an approval to `spender` for `amount` tokens of type `id` from the caller's tokens.
+ /// Must return true.
+ function approve(address spender, uint256 id, uint256 amount) external returns (bool);
+
+ /// @dev Grants or revokes unlimited transfer permission of any token id to `spender` for the caller's tokens.
+ /// Must return true.
+ function setOperator(address spender, bool approved) external returns (bool);
+
+ /// @dev Transfers `amount` of token type `id` from the caller's account to `receiver`.
+ /// Must return true.
+ function transfer(address receiver, uint256 id, uint256 amount) external returns (bool);
+
+ /// @dev Transfers `amount` of token type `id` from `sender` to `receiver`.
+ /// Must return true.
+ function transferFrom(address sender, address receiver, uint256 id, uint256 amount) external returns (bool);
+}
+
+/// @dev Optional extension of {IERC6909} that adds metadata functions.
+interface IERC6909Metadata is IERC6909 {
+ /// @dev Returns the name of the token of type `id`.
+ function name(uint256 id) external view returns (string memory);
+
+ /// @dev Returns the ticker symbol of the token of type `id`.
+ function symbol(uint256 id) external view returns (string memory);
+
+ /// @dev Returns the number of decimals for the token of type `id`.
+ function decimals(uint256 id) external view returns (uint8);
+}
+
+/// @dev Optional extension of {IERC6909} that adds content URI functions.
+interface IERC6909ContentURI is IERC6909 {
+ /// @dev Returns URI for the contract.
+ function contractURI() external view returns (string memory);
+
+ /// @dev Returns the URI for the token of type `id`.
+ function tokenURI(uint256 id) external view returns (string memory);
+}
+
+/// @dev Optional extension of {IERC6909} that adds a token supply function.
+interface IERC6909TokenSupply is IERC6909 {
+ /// @dev Returns the total supply of the token of type `id`.
+ function totalSupply(uint256 id) external view returns (uint256);
+}
diff --git a/contracts/lib/forge-std/src/interfaces/IERC721.sol b/contracts/lib/forge-std/src/interfaces/IERC721.sol
new file mode 100644
index 0000000..21a4a94
--- /dev/null
+++ b/contracts/lib/forge-std/src/interfaces/IERC721.sol
@@ -0,0 +1,164 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2;
+
+import {IERC165} from "./IERC165.sol";
+
+/// @title ERC-721 Non-Fungible Token Standard
+/// @dev See https://eips.ethereum.org/EIPS/eip-721
+/// Note: the ERC-165 identifier for this interface is 0x80ac58cd.
+interface IERC721 is IERC165 {
+ /// @dev This emits when ownership of any NFT changes by any mechanism.
+ /// This event emits when NFTs are created (`from` == 0) and destroyed
+ /// (`to` == 0). Exception: during contract creation, any number of NFTs
+ /// may be created and assigned without emitting Transfer. At the time of
+ /// any transfer, the approved address for that NFT (if any) is reset to none.
+ event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);
+
+ /// @dev This emits when the approved address for an NFT is changed or
+ /// reaffirmed. The zero address indicates there is no approved address.
+ /// When a Transfer event emits, this also indicates that the approved
+ /// address for that NFT (if any) is reset to none.
+ event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);
+
+ /// @dev This emits when an operator is enabled or disabled for an owner.
+ /// The operator can manage all NFTs of the owner.
+ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);
+
+ /// @notice Count all NFTs assigned to an owner
+ /// @dev NFTs assigned to the zero address are considered invalid, and this
+ /// function throws for queries about the zero address.
+ /// @param _owner An address for whom to query the balance
+ /// @return The number of NFTs owned by `_owner`, possibly zero
+ function balanceOf(address _owner) external view returns (uint256);
+
+ /// @notice Find the owner of an NFT
+ /// @dev NFTs assigned to zero address are considered invalid, and queries
+ /// about them do throw.
+ /// @param _tokenId The identifier for an NFT
+ /// @return The address of the owner of the NFT
+ function ownerOf(uint256 _tokenId) external view returns (address);
+
+ /// @notice Transfers the ownership of an NFT from one address to another address
+ /// @dev Throws unless `msg.sender` is the current owner, an authorized
+ /// operator, or the approved address for this NFT. Throws if `_from` is
+ /// not the current owner. Throws if `_to` is the zero address. Throws if
+ /// `_tokenId` is not a valid NFT. When transfer is complete, this function
+ /// checks if `_to` is a smart contract (code size > 0). If so, it calls
+ /// `onERC721Received` on `_to` and throws if the return value is not
+ /// `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`.
+ /// @param _from The current owner of the NFT
+ /// @param _to The new owner
+ /// @param _tokenId The NFT to transfer
+ /// @param data Additional data with no specified format, sent in call to `_to`
+ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes calldata data) external payable;
+
+ /// @notice Transfers the ownership of an NFT from one address to another address
+ /// @dev This works identically to the other function with an extra data parameter,
+ /// except this function just sets data to "".
+ /// @param _from The current owner of the NFT
+ /// @param _to The new owner
+ /// @param _tokenId The NFT to transfer
+ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;
+
+ /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
+ /// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE
+ /// THEY MAY BE PERMANENTLY LOST
+ /// @dev Throws unless `msg.sender` is the current owner, an authorized
+ /// operator, or the approved address for this NFT. Throws if `_from` is
+ /// not the current owner. Throws if `_to` is the zero address. Throws if
+ /// `_tokenId` is not a valid NFT.
+ /// @param _from The current owner of the NFT
+ /// @param _to The new owner
+ /// @param _tokenId The NFT to transfer
+ function transferFrom(address _from, address _to, uint256 _tokenId) external payable;
+
+ /// @notice Change or reaffirm the approved address for an NFT
+ /// @dev The zero address indicates there is no approved address.
+ /// Throws unless `msg.sender` is the current NFT owner, or an authorized
+ /// operator of the current owner.
+ /// @param _approved The new approved NFT controller
+ /// @param _tokenId The NFT to approve
+ function approve(address _approved, uint256 _tokenId) external payable;
+
+ /// @notice Enable or disable approval for a third party ("operator") to manage
+ /// all of `msg.sender`'s assets
+ /// @dev Emits the ApprovalForAll event. The contract MUST allow
+ /// multiple operators per owner.
+ /// @param _operator Address to add to the set of authorized operators
+ /// @param _approved True if the operator is approved, false to revoke approval
+ function setApprovalForAll(address _operator, bool _approved) external;
+
+ /// @notice Get the approved address for a single NFT
+ /// @dev Throws if `_tokenId` is not a valid NFT.
+ /// @param _tokenId The NFT to find the approved address for
+ /// @return The approved address for this NFT, or the zero address if there is none
+ function getApproved(uint256 _tokenId) external view returns (address);
+
+ /// @notice Query if an address is an authorized operator for another address
+ /// @param _owner The address that owns the NFTs
+ /// @param _operator The address that acts on behalf of the owner
+ /// @return True if `_operator` is an approved operator for `_owner`, false otherwise
+ function isApprovedForAll(address _owner, address _operator) external view returns (bool);
+}
+
+/// @dev Note: the ERC-165 identifier for this interface is 0x150b7a02.
+interface IERC721TokenReceiver {
+ /// @notice Handle the receipt of an NFT
+ /// @dev The ERC721 smart contract calls this function on the recipient
+ /// after a `transfer`. This function MAY throw to revert and reject the
+ /// transfer. Return of other than the magic value MUST result in the
+ /// transaction being reverted.
+ /// Note: the contract address is always the message sender.
+ /// @param _operator The address which called `safeTransferFrom` function
+ /// @param _from The address which previously owned the token
+ /// @param _tokenId The NFT identifier which is being transferred
+ /// @param _data Additional data with no specified format
+ /// @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
+ /// unless throwing
+ function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes calldata _data)
+ external
+ returns (bytes4);
+}
+
+/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
+/// @dev See https://eips.ethereum.org/EIPS/eip-721
+/// Note: the ERC-165 identifier for this interface is 0x5b5e139f.
+interface IERC721Metadata is IERC721 {
+ /// @notice A descriptive name for a collection of NFTs in this contract
+ function name() external view returns (string memory _name);
+
+ /// @notice An abbreviated name for NFTs in this contract
+ function symbol() external view returns (string memory _symbol);
+
+ /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
+ /// @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC
+ /// 3986. The URI may point to a JSON file that conforms to the "ERC721
+ /// Metadata JSON Schema".
+ function tokenURI(uint256 _tokenId) external view returns (string memory);
+}
+
+/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
+/// @dev See https://eips.ethereum.org/EIPS/eip-721
+/// Note: the ERC-165 identifier for this interface is 0x780e9d63.
+interface IERC721Enumerable is IERC721 {
+ /// @notice Count NFTs tracked by this contract
+ /// @return A count of valid NFTs tracked by this contract, where each one of
+ /// them has an assigned and queryable owner not equal to the zero address
+ function totalSupply() external view returns (uint256);
+
+ /// @notice Enumerate valid NFTs
+ /// @dev Throws if `_index` >= `totalSupply()`.
+ /// @param _index A counter less than `totalSupply()`
+ /// @return The token identifier for the `_index`th NFT,
+ /// (sort order not specified)
+ function tokenByIndex(uint256 _index) external view returns (uint256);
+
+ /// @notice Enumerate NFTs assigned to an owner
+ /// @dev Throws if `_index` >= `balanceOf(_owner)` or if
+ /// `_owner` is the zero address, representing invalid NFTs.
+ /// @param _owner An address where we are interested in NFTs owned by them
+ /// @param _index A counter less than `balanceOf(_owner)`
+ /// @return The token identifier for the `_index`th NFT assigned to `_owner`,
+ /// (sort order not specified)
+ function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256);
+}
diff --git a/contracts/lib/forge-std/src/interfaces/IERC7540.sol b/contracts/lib/forge-std/src/interfaces/IERC7540.sol
new file mode 100644
index 0000000..9b3ca08
--- /dev/null
+++ b/contracts/lib/forge-std/src/interfaces/IERC7540.sol
@@ -0,0 +1,144 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2;
+
+import {IERC7575} from "./IERC7575.sol";
+
+/// @dev Interface of the base operator logic of ERC7540, as defined in
+/// https://eips.ethereum.org/EIPS/eip-7540
+interface IERC7540Operator {
+ /**
+ * @dev The event emitted when an operator is set.
+ *
+ * @param controller The address of the controller.
+ * @param operator The address of the operator.
+ * @param approved The approval status.
+ */
+ event OperatorSet(address indexed controller, address indexed operator, bool approved);
+
+ /**
+ * @dev Sets or removes an operator for the caller.
+ *
+ * @param operator The address of the operator.
+ * @param approved The approval status.
+ * @return Whether the call was executed successfully or not
+ */
+ function setOperator(address operator, bool approved) external returns (bool);
+
+ /**
+ * @dev Returns `true` if the `operator` is approved as an operator for an `controller`.
+ *
+ * @param controller The address of the controller.
+ * @param operator The address of the operator.
+ * @return status The approval status
+ */
+ function isOperator(address controller, address operator) external view returns (bool status);
+}
+
+/// @dev Interface of the asynchronous deposit Vault interface of ERC7540, as defined in
+/// https://eips.ethereum.org/EIPS/eip-7540
+interface IERC7540Deposit is IERC7540Operator {
+ event DepositRequest(
+ address indexed controller, address indexed owner, uint256 indexed requestId, address sender, uint256 assets
+ );
+ /**
+ * @dev Transfers assets from sender into the Vault and submits a Request for asynchronous deposit.
+ *
+ * - MUST support ERC-20 approve / transferFrom on asset as a deposit Request flow.
+ * - MUST revert if all of assets cannot be requested for deposit.
+ * - owner MUST be msg.sender unless some unspecified explicit approval is given by the caller,
+ * approval of ERC-20 tokens from owner to sender is NOT enough.
+ *
+ * @param assets the amount of deposit assets to transfer from owner
+ * @param controller the controller of the request who will be able to operate the request
+ * @param owner the source of the deposit assets
+ *
+ * NOTE: most implementations will require pre-approval of the Vault with the Vault's underlying asset token.
+ */
+
+ function requestDeposit(uint256 assets, address controller, address owner) external returns (uint256 requestId);
+
+ /**
+ * @dev Returns the amount of requested assets in Pending state.
+ *
+ * - MUST NOT include any assets in Claimable state for deposit or mint.
+ * - MUST NOT show any variations depending on the caller.
+ * - MUST NOT revert unless due to integer overflow caused by an unreasonably large input.
+ */
+ function pendingDepositRequest(uint256 requestId, address controller) external view returns (uint256 pendingAssets);
+
+ /**
+ * @dev Returns the amount of requested assets in Claimable state for the controller to deposit or mint.
+ *
+ * - MUST NOT include any assets in Pending state.
+ * - MUST NOT show any variations depending on the caller.
+ * - MUST NOT revert unless due to integer overflow caused by an unreasonably large input.
+ */
+ function claimableDepositRequest(uint256 requestId, address controller)
+ external
+ view
+ returns (uint256 claimableAssets);
+
+ /**
+ * @dev Mints shares Vault shares to receiver by claiming the Request of the controller.
+ *
+ * - MUST emit the Deposit event.
+ * - controller MUST equal msg.sender unless the controller has approved the msg.sender as an operator.
+ */
+ function deposit(uint256 assets, address receiver, address controller) external returns (uint256 shares);
+
+ /**
+ * @dev Mints exactly shares Vault shares to receiver by claiming the Request of the controller.
+ *
+ * - MUST emit the Deposit event.
+ * - controller MUST equal msg.sender unless the controller has approved the msg.sender as an operator.
+ */
+ function mint(uint256 shares, address receiver, address controller) external returns (uint256 assets);
+}
+
+/// @dev Interface of the asynchronous deposit Vault interface of ERC7540, as defined in
+/// https://eips.ethereum.org/EIPS/eip-7540
+interface IERC7540Redeem is IERC7540Operator {
+ event RedeemRequest(
+ address indexed controller, address indexed owner, uint256 indexed requestId, address sender, uint256 assets
+ );
+
+ /**
+ * @dev Assumes control of shares from sender into the Vault and submits a Request for asynchronous redeem.
+ *
+ * - MUST support a redeem Request flow where the control of shares is taken from sender directly
+ * where msg.sender has ERC-20 approval over the shares of owner.
+ * - MUST revert if all of shares cannot be requested for redeem.
+ *
+ * @param shares the amount of shares to be redeemed to transfer from owner
+ * @param controller the controller of the request who will be able to operate the request
+ * @param owner the source of the shares to be redeemed
+ *
+ * NOTE: most implementations will require pre-approval of the Vault with the Vault's share token.
+ */
+ function requestRedeem(uint256 shares, address controller, address owner) external returns (uint256 requestId);
+
+ /**
+ * @dev Returns the amount of requested shares in Pending state.
+ *
+ * - MUST NOT include any shares in Claimable state for redeem or withdraw.
+ * - MUST NOT show any variations depending on the caller.
+ * - MUST NOT revert unless due to integer overflow caused by an unreasonably large input.
+ */
+ function pendingRedeemRequest(uint256 requestId, address controller) external view returns (uint256 pendingShares);
+
+ /**
+ * @dev Returns the amount of requested shares in Claimable state for the controller to redeem or withdraw.
+ *
+ * - MUST NOT include any shares in Pending state for redeem or withdraw.
+ * - MUST NOT show any variations depending on the caller.
+ * - MUST NOT revert unless due to integer overflow caused by an unreasonably large input.
+ */
+ function claimableRedeemRequest(uint256 requestId, address controller)
+ external
+ view
+ returns (uint256 claimableShares);
+}
+
+/// @dev Interface of the fully asynchronous Vault interface of ERC7540, as defined in
+/// https://eips.ethereum.org/EIPS/eip-7540
+interface IERC7540 is IERC7540Deposit, IERC7540Redeem, IERC7575 {}
diff --git a/contracts/lib/forge-std/src/interfaces/IERC7575.sol b/contracts/lib/forge-std/src/interfaces/IERC7575.sol
new file mode 100644
index 0000000..207e3e7
--- /dev/null
+++ b/contracts/lib/forge-std/src/interfaces/IERC7575.sol
@@ -0,0 +1,241 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2;
+
+import {IERC165} from "./IERC165.sol";
+
+/// @dev Interface of the ERC7575 "Multi-Asset ERC-4626 Vaults", as defined in
+/// https://eips.ethereum.org/EIPS/eip-7575
+interface IERC7575 is IERC165 {
+ event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);
+ event Withdraw(
+ address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares
+ );
+
+ /**
+ * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.
+ *
+ * - MUST be an ERC-20 token contract.
+ * - MUST NOT revert.
+ */
+ function asset() external view returns (address assetTokenAddress);
+
+ /**
+ * @dev Returns the address of the share token
+ *
+ * - MUST be an ERC-20 token contract.
+ * - MUST NOT revert.
+ */
+ function share() external view returns (address shareTokenAddress);
+
+ /**
+ * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal
+ * scenario where all the conditions are met.
+ *
+ * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
+ * - MUST NOT show any variations depending on the caller.
+ * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
+ * - MUST NOT revert.
+ *
+ * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
+ * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
+ * from.
+ */
+ function convertToShares(uint256 assets) external view returns (uint256 shares);
+
+ /**
+ * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal
+ * scenario where all the conditions are met.
+ *
+ * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
+ * - MUST NOT show any variations depending on the caller.
+ * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
+ * - MUST NOT revert.
+ *
+ * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
+ * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
+ * from.
+ */
+ function convertToAssets(uint256 shares) external view returns (uint256 assets);
+
+ /**
+ * @dev Returns the total amount of the underlying asset that is “managed” by Vault.
+ *
+ * - SHOULD include any compounding that occurs from yield.
+ * - MUST be inclusive of any fees that are charged against assets in the Vault.
+ * - MUST NOT revert.
+ */
+ function totalAssets() external view returns (uint256 totalManagedAssets);
+
+ /**
+ * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,
+ * through a deposit call.
+ *
+ * - MUST return a limited value if receiver is subject to some deposit limit.
+ * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.
+ * - MUST NOT revert.
+ */
+ function maxDeposit(address receiver) external view returns (uint256 maxAssets);
+
+ /**
+ * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given
+ * current on-chain conditions.
+ *
+ * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit
+ * call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called
+ * in the same transaction.
+ * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the
+ * deposit would be accepted, regardless if the user has enough tokens approved, etc.
+ * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
+ * - MUST NOT revert.
+ *
+ * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in
+ * share price or some other type of condition, meaning the depositor will lose assets by depositing.
+ */
+ function previewDeposit(uint256 assets) external view returns (uint256 shares);
+
+ /**
+ * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.
+ *
+ * - MUST emit the Deposit event.
+ * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
+ * deposit execution, and are accounted for during deposit.
+ * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not
+ * approving enough underlying tokens to the Vault contract, etc).
+ *
+ * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
+ */
+ function deposit(uint256 assets, address receiver) external returns (uint256 shares);
+
+ /**
+ * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.
+ * - MUST return a limited value if receiver is subject to some mint limit.
+ * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.
+ * - MUST NOT revert.
+ */
+ function maxMint(address receiver) external view returns (uint256 maxShares);
+
+ /**
+ * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given
+ * current on-chain conditions.
+ *
+ * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call
+ * in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the
+ * same transaction.
+ * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint
+ * would be accepted, regardless if the user has enough tokens approved, etc.
+ * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
+ * - MUST NOT revert.
+ *
+ * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in
+ * share price or some other type of condition, meaning the depositor will lose assets by minting.
+ */
+ function previewMint(uint256 shares) external view returns (uint256 assets);
+
+ /**
+ * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.
+ *
+ * - MUST emit the Deposit event.
+ * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint
+ * execution, and are accounted for during mint.
+ * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not
+ * approving enough underlying tokens to the Vault contract, etc).
+ *
+ * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
+ */
+ function mint(uint256 shares, address receiver) external returns (uint256 assets);
+
+ /**
+ * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the
+ * Vault, through a withdraw call.
+ *
+ * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
+ * - MUST NOT revert.
+ */
+ function maxWithdraw(address owner) external view returns (uint256 maxAssets);
+
+ /**
+ * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,
+ * given current on-chain conditions.
+ *
+ * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw
+ * call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if
+ * called
+ * in the same transaction.
+ * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though
+ * the withdrawal would be accepted, regardless if the user has enough shares, etc.
+ * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
+ * - MUST NOT revert.
+ *
+ * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in
+ * share price or some other type of condition, meaning the depositor will lose assets by depositing.
+ */
+ function previewWithdraw(uint256 assets) external view returns (uint256 shares);
+
+ /**
+ * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver.
+ *
+ * - MUST emit the Withdraw event.
+ * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
+ * withdraw execution, and are accounted for during withdraw.
+ * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner
+ * not having enough shares, etc).
+ *
+ * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
+ * Those methods should be performed separately.
+ */
+ function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);
+
+ /**
+ * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,
+ * through a redeem call.
+ *
+ * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
+ * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.
+ * - MUST NOT revert.
+ */
+ function maxRedeem(address owner) external view returns (uint256 maxShares);
+
+ /**
+ * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,
+ * given current on-chain conditions.
+ *
+ * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call
+ * in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the
+ * same transaction.
+ * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the
+ * redemption would be accepted, regardless if the user has enough shares, etc.
+ * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
+ * - MUST NOT revert.
+ *
+ * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in
+ * share price or some other type of condition, meaning the depositor will lose assets by redeeming.
+ */
+ function previewRedeem(uint256 shares) external view returns (uint256 assets);
+
+ /**
+ * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver.
+ *
+ * - MUST emit the Withdraw event.
+ * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
+ * redeem execution, and are accounted for during redeem.
+ * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner
+ * not having enough shares, etc).
+ *
+ * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
+ * Those methods should be performed separately.
+ */
+ function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);
+}
+
+/// @dev Interface of the ERC20 share token, as defined in
+/// https://eips.ethereum.org/EIPS/eip-7575
+interface IERC7575Share is IERC165 {
+ event VaultUpdate(address indexed asset, address vault);
+
+ /**
+ * @dev Returns the address of the Vault for the given asset.
+ *
+ * @param asset the ERC-20 token to deposit with into the Vault
+ */
+ function vault(address asset) external view returns (address);
+}
diff --git a/contracts/lib/forge-std/src/interfaces/IMulticall3.sol b/contracts/lib/forge-std/src/interfaces/IMulticall3.sol
new file mode 100644
index 0000000..3b79851
--- /dev/null
+++ b/contracts/lib/forge-std/src/interfaces/IMulticall3.sol
@@ -0,0 +1,70 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2 <0.9.0;
+
+pragma experimental ABIEncoderV2;
+
+interface IMulticall3 {
+ struct Call {
+ address target;
+ bytes callData;
+ }
+
+ struct Call3 {
+ address target;
+ bool allowFailure;
+ bytes callData;
+ }
+
+ struct Call3Value {
+ address target;
+ bool allowFailure;
+ uint256 value;
+ bytes callData;
+ }
+
+ struct Result {
+ bool success;
+ bytes returnData;
+ }
+
+ function aggregate(Call[] calldata calls) external payable returns (uint256 blockNumber, bytes[] memory returnData);
+
+ function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);
+
+ function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);
+
+ function blockAndAggregate(Call[] calldata calls)
+ external
+ payable
+ returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);
+
+ function getBasefee() external view returns (uint256 basefee);
+
+ function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);
+
+ function getBlockNumber() external view returns (uint256 blockNumber);
+
+ function getChainId() external view returns (uint256 chainid);
+
+ function getCurrentBlockCoinbase() external view returns (address coinbase);
+
+ function getCurrentBlockDifficulty() external view returns (uint256 difficulty);
+
+ function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);
+
+ function getCurrentBlockTimestamp() external view returns (uint256 timestamp);
+
+ function getEthBalance(address addr) external view returns (uint256 balance);
+
+ function getLastBlockHash() external view returns (bytes32 blockHash);
+
+ function tryAggregate(bool requireSuccess, Call[] calldata calls)
+ external
+ payable
+ returns (Result[] memory returnData);
+
+ function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)
+ external
+ payable
+ returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);
+}
diff --git a/contracts/lib/forge-std/src/safeconsole.sol b/contracts/lib/forge-std/src/safeconsole.sol
new file mode 100644
index 0000000..87c475a
--- /dev/null
+++ b/contracts/lib/forge-std/src/safeconsole.sol
@@ -0,0 +1,13937 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2 <0.9.0;
+
+/// @author philogy
+/// @dev Code generated automatically by script.
+library safeconsole {
+ uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67;
+
+ // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374)
+ // for the view-to-pure log trick.
+ function _sendLogPayload(uint256 offset, uint256 size) private pure {
+ function(uint256, uint256) internal view fnIn = _sendLogPayloadView;
+ function(uint256, uint256) internal pure pureSendLogPayload;
+ /// @solidity memory-safe-assembly
+ assembly {
+ pureSendLogPayload := fnIn
+ }
+ pureSendLogPayload(offset, size);
+ }
+
+ function _sendLogPayloadView(uint256 offset, uint256 size) private view {
+ /// @solidity memory-safe-assembly
+ assembly {
+ pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0))
+ }
+ }
+
+ function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure {
+ function(uint256, uint256, uint256) internal view fnIn = _memcopyView;
+ function(uint256, uint256, uint256) internal pure pureMemcopy;
+ /// @solidity memory-safe-assembly
+ assembly {
+ pureMemcopy := fnIn
+ }
+ pureMemcopy(fromOffset, toOffset, length);
+ }
+
+ function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view {
+ /// @solidity memory-safe-assembly
+ assembly {
+ pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length))
+ }
+ }
+
+ function logMemory(uint256 offset, uint256 length) internal pure {
+ if (offset >= 0x60) {
+ // Sufficient memory before slice to prepare call header.
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(sub(offset, 0x60))
+ m1 := mload(sub(offset, 0x40))
+ m2 := mload(sub(offset, 0x20))
+ // Selector of `log(bytes)`.
+ mstore(sub(offset, 0x60), 0x0be77f56)
+ mstore(sub(offset, 0x40), 0x20)
+ mstore(sub(offset, 0x20), length)
+ }
+ _sendLogPayload(offset - 0x44, length + 0x44);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(sub(offset, 0x60), m0)
+ mstore(sub(offset, 0x40), m1)
+ mstore(sub(offset, 0x20), m2)
+ }
+ } else {
+ // Insufficient space, so copy slice forward, add header and reverse.
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ uint256 endOffset = offset + length;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(add(endOffset, 0x00))
+ m1 := mload(add(endOffset, 0x20))
+ m2 := mload(add(endOffset, 0x40))
+ }
+ _memcopy(offset, offset + 0x60, length);
+ /// @solidity memory-safe-assembly
+ assembly {
+ // Selector of `log(bytes)`.
+ mstore(add(offset, 0x00), 0x0be77f56)
+ mstore(add(offset, 0x20), 0x20)
+ mstore(add(offset, 0x40), length)
+ }
+ _sendLogPayload(offset + 0x1c, length + 0x44);
+ _memcopy(offset + 0x60, offset, length);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(add(endOffset, 0x00), m0)
+ mstore(add(endOffset, 0x20), m1)
+ mstore(add(endOffset, 0x40), m2)
+ }
+ }
+ }
+
+ function log(address p0) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ // Selector of `log(address)`.
+ mstore(0x00, 0x2c2ecbc2)
+ mstore(0x20, p0)
+ }
+ _sendLogPayload(0x1c, 0x24);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ }
+ }
+
+ function log(bool p0) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ // Selector of `log(bool)`.
+ mstore(0x00, 0x32458eed)
+ mstore(0x20, p0)
+ }
+ _sendLogPayload(0x1c, 0x24);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ }
+ }
+
+ function log(uint256 p0) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ // Selector of `log(uint256)`.
+ mstore(0x00, 0xf82c50f1)
+ mstore(0x20, p0)
+ }
+ _sendLogPayload(0x1c, 0x24);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ }
+ }
+
+ function log(bytes32 p0) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(string)`.
+ mstore(0x00, 0x41304fac)
+ mstore(0x20, 0x20)
+ writeString(0x40, p0)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(address p0, address p1) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ // Selector of `log(address,address)`.
+ mstore(0x00, 0xdaf0d4aa)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ }
+ _sendLogPayload(0x1c, 0x44);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ }
+ }
+
+ function log(address p0, bool p1) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ // Selector of `log(address,bool)`.
+ mstore(0x00, 0x75b605d3)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ }
+ _sendLogPayload(0x1c, 0x44);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ }
+ }
+
+ function log(address p0, uint256 p1) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ // Selector of `log(address,uint256)`.
+ mstore(0x00, 0x8309e8a8)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ }
+ _sendLogPayload(0x1c, 0x44);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ }
+ }
+
+ function log(address p0, bytes32 p1) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,string)`.
+ mstore(0x00, 0x759f86bb)
+ mstore(0x20, p0)
+ mstore(0x40, 0x40)
+ writeString(0x60, p1)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, address p1) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ // Selector of `log(bool,address)`.
+ mstore(0x00, 0x853c4849)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ }
+ _sendLogPayload(0x1c, 0x44);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ }
+ }
+
+ function log(bool p0, bool p1) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ // Selector of `log(bool,bool)`.
+ mstore(0x00, 0x2a110e83)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ }
+ _sendLogPayload(0x1c, 0x44);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ }
+ }
+
+ function log(bool p0, uint256 p1) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ // Selector of `log(bool,uint256)`.
+ mstore(0x00, 0x399174d3)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ }
+ _sendLogPayload(0x1c, 0x44);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ }
+ }
+
+ function log(bool p0, bytes32 p1) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,string)`.
+ mstore(0x00, 0x8feac525)
+ mstore(0x20, p0)
+ mstore(0x40, 0x40)
+ writeString(0x60, p1)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, address p1) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ // Selector of `log(uint256,address)`.
+ mstore(0x00, 0x69276c86)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ }
+ _sendLogPayload(0x1c, 0x44);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ }
+ }
+
+ function log(uint256 p0, bool p1) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ // Selector of `log(uint256,bool)`.
+ mstore(0x00, 0x1c9d7eb3)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ }
+ _sendLogPayload(0x1c, 0x44);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ // Selector of `log(uint256,uint256)`.
+ mstore(0x00, 0xf666715a)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ }
+ _sendLogPayload(0x1c, 0x44);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,string)`.
+ mstore(0x00, 0x643fd0df)
+ mstore(0x20, p0)
+ mstore(0x40, 0x40)
+ writeString(0x60, p1)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bytes32 p0, address p1) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(string,address)`.
+ mstore(0x00, 0x319af333)
+ mstore(0x20, 0x40)
+ mstore(0x40, p1)
+ writeString(0x60, p0)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bytes32 p0, bool p1) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(string,bool)`.
+ mstore(0x00, 0xc3b55635)
+ mstore(0x20, 0x40)
+ mstore(0x40, p1)
+ writeString(0x60, p0)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(string,uint256)`.
+ mstore(0x00, 0xb60e72cc)
+ mstore(0x20, 0x40)
+ mstore(0x40, p1)
+ writeString(0x60, p0)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,string)`.
+ mstore(0x00, 0x4b5c4277)
+ mstore(0x20, 0x40)
+ mstore(0x40, 0x80)
+ writeString(0x60, p0)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, address p1, address p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(address,address,address)`.
+ mstore(0x00, 0x018c84c2)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(address p0, address p1, bool p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(address,address,bool)`.
+ mstore(0x00, 0xf2a66286)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(address p0, address p1, uint256 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(address,address,uint256)`.
+ mstore(0x00, 0x17fe6185)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(address p0, address p1, bytes32 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(address,address,string)`.
+ mstore(0x00, 0x007150be)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x60)
+ writeString(0x80, p2)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(address p0, bool p1, address p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(address,bool,address)`.
+ mstore(0x00, 0xf11699ed)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(address p0, bool p1, bool p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(address,bool,bool)`.
+ mstore(0x00, 0xeb830c92)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(address p0, bool p1, uint256 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(address,bool,uint256)`.
+ mstore(0x00, 0x9c4f99fb)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(address p0, bool p1, bytes32 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(address,bool,string)`.
+ mstore(0x00, 0x212255cc)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x60)
+ writeString(0x80, p2)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(address p0, uint256 p1, address p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(address,uint256,address)`.
+ mstore(0x00, 0x7bc0d848)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(address p0, uint256 p1, bool p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(address,uint256,bool)`.
+ mstore(0x00, 0x678209a8)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(address p0, uint256 p1, uint256 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(address,uint256,uint256)`.
+ mstore(0x00, 0xb69bcaf6)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(address p0, uint256 p1, bytes32 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(address,uint256,string)`.
+ mstore(0x00, 0xa1f2e8aa)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x60)
+ writeString(0x80, p2)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(address p0, bytes32 p1, address p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(address,string,address)`.
+ mstore(0x00, 0xf08744e8)
+ mstore(0x20, p0)
+ mstore(0x40, 0x60)
+ mstore(0x60, p2)
+ writeString(0x80, p1)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(address p0, bytes32 p1, bool p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(address,string,bool)`.
+ mstore(0x00, 0xcf020fb1)
+ mstore(0x20, p0)
+ mstore(0x40, 0x60)
+ mstore(0x60, p2)
+ writeString(0x80, p1)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(address p0, bytes32 p1, uint256 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(address,string,uint256)`.
+ mstore(0x00, 0x67dd6ff1)
+ mstore(0x20, p0)
+ mstore(0x40, 0x60)
+ mstore(0x60, p2)
+ writeString(0x80, p1)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(address p0, bytes32 p1, bytes32 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ // Selector of `log(address,string,string)`.
+ mstore(0x00, 0xfb772265)
+ mstore(0x20, p0)
+ mstore(0x40, 0x60)
+ mstore(0x60, 0xa0)
+ writeString(0x80, p1)
+ writeString(0xc0, p2)
+ }
+ _sendLogPayload(0x1c, 0xe4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ }
+ }
+
+ function log(bool p0, address p1, address p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(bool,address,address)`.
+ mstore(0x00, 0xd2763667)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(bool p0, address p1, bool p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(bool,address,bool)`.
+ mstore(0x00, 0x18c9c746)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(bool p0, address p1, uint256 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(bool,address,uint256)`.
+ mstore(0x00, 0x5f7b9afb)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(bool p0, address p1, bytes32 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(bool,address,string)`.
+ mstore(0x00, 0xde9a9270)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x60)
+ writeString(0x80, p2)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(bool p0, bool p1, address p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(bool,bool,address)`.
+ mstore(0x00, 0x1078f68d)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(bool p0, bool p1, bool p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(bool,bool,bool)`.
+ mstore(0x00, 0x50709698)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(bool p0, bool p1, uint256 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(bool,bool,uint256)`.
+ mstore(0x00, 0x12f21602)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(bool p0, bool p1, bytes32 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(bool,bool,string)`.
+ mstore(0x00, 0x2555fa46)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x60)
+ writeString(0x80, p2)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(bool p0, uint256 p1, address p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(bool,uint256,address)`.
+ mstore(0x00, 0x088ef9d2)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(bool p0, uint256 p1, bool p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(bool,uint256,bool)`.
+ mstore(0x00, 0xe8defba9)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(bool p0, uint256 p1, uint256 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(bool,uint256,uint256)`.
+ mstore(0x00, 0x37103367)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(bool p0, uint256 p1, bytes32 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(bool,uint256,string)`.
+ mstore(0x00, 0xc3fc3970)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x60)
+ writeString(0x80, p2)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, address p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(bool,string,address)`.
+ mstore(0x00, 0x9591b953)
+ mstore(0x20, p0)
+ mstore(0x40, 0x60)
+ mstore(0x60, p2)
+ writeString(0x80, p1)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, bool p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(bool,string,bool)`.
+ mstore(0x00, 0xdbb4c247)
+ mstore(0x20, p0)
+ mstore(0x40, 0x60)
+ mstore(0x60, p2)
+ writeString(0x80, p1)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, uint256 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(bool,string,uint256)`.
+ mstore(0x00, 0x1093ee11)
+ mstore(0x20, p0)
+ mstore(0x40, 0x60)
+ mstore(0x60, p2)
+ writeString(0x80, p1)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, bytes32 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ // Selector of `log(bool,string,string)`.
+ mstore(0x00, 0xb076847f)
+ mstore(0x20, p0)
+ mstore(0x40, 0x60)
+ mstore(0x60, 0xa0)
+ writeString(0x80, p1)
+ writeString(0xc0, p2)
+ }
+ _sendLogPayload(0x1c, 0xe4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ }
+ }
+
+ function log(uint256 p0, address p1, address p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(uint256,address,address)`.
+ mstore(0x00, 0xbcfd9be0)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(uint256 p0, address p1, bool p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(uint256,address,bool)`.
+ mstore(0x00, 0x9b6ec042)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(uint256 p0, address p1, uint256 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(uint256,address,uint256)`.
+ mstore(0x00, 0x5a9b5ed5)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(uint256 p0, address p1, bytes32 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(uint256,address,string)`.
+ mstore(0x00, 0x63cb41f9)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x60)
+ writeString(0x80, p2)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(uint256 p0, bool p1, address p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(uint256,bool,address)`.
+ mstore(0x00, 0x35085f7b)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(uint256 p0, bool p1, bool p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(uint256,bool,bool)`.
+ mstore(0x00, 0x20718650)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(uint256 p0, bool p1, uint256 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(uint256,bool,uint256)`.
+ mstore(0x00, 0x20098014)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(uint256 p0, bool p1, bytes32 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(uint256,bool,string)`.
+ mstore(0x00, 0x85775021)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x60)
+ writeString(0x80, p2)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, address p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(uint256,uint256,address)`.
+ mstore(0x00, 0x5c96b331)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, bool p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(uint256,uint256,bool)`.
+ mstore(0x00, 0x4766da72)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, uint256 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ // Selector of `log(uint256,uint256,uint256)`.
+ mstore(0x00, 0xd1ed7a3c)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ }
+ _sendLogPayload(0x1c, 0x64);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, bytes32 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(uint256,uint256,string)`.
+ mstore(0x00, 0x71d04af2)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x60)
+ writeString(0x80, p2)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, address p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(uint256,string,address)`.
+ mstore(0x00, 0x7afac959)
+ mstore(0x20, p0)
+ mstore(0x40, 0x60)
+ mstore(0x60, p2)
+ writeString(0x80, p1)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, bool p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(uint256,string,bool)`.
+ mstore(0x00, 0x4ceda75a)
+ mstore(0x20, p0)
+ mstore(0x40, 0x60)
+ mstore(0x60, p2)
+ writeString(0x80, p1)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, uint256 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(uint256,string,uint256)`.
+ mstore(0x00, 0x37aa7d4c)
+ mstore(0x20, p0)
+ mstore(0x40, 0x60)
+ mstore(0x60, p2)
+ writeString(0x80, p1)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ // Selector of `log(uint256,string,string)`.
+ mstore(0x00, 0xb115611f)
+ mstore(0x20, p0)
+ mstore(0x40, 0x60)
+ mstore(0x60, 0xa0)
+ writeString(0x80, p1)
+ writeString(0xc0, p2)
+ }
+ _sendLogPayload(0x1c, 0xe4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ }
+ }
+
+ function log(bytes32 p0, address p1, address p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(string,address,address)`.
+ mstore(0x00, 0xfcec75e0)
+ mstore(0x20, 0x60)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ writeString(0x80, p0)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(bytes32 p0, address p1, bool p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(string,address,bool)`.
+ mstore(0x00, 0xc91d5ed4)
+ mstore(0x20, 0x60)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ writeString(0x80, p0)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(bytes32 p0, address p1, uint256 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(string,address,uint256)`.
+ mstore(0x00, 0x0d26b925)
+ mstore(0x20, 0x60)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ writeString(0x80, p0)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(bytes32 p0, address p1, bytes32 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ // Selector of `log(string,address,string)`.
+ mstore(0x00, 0xe0e9ad4f)
+ mstore(0x20, 0x60)
+ mstore(0x40, p1)
+ mstore(0x60, 0xa0)
+ writeString(0x80, p0)
+ writeString(0xc0, p2)
+ }
+ _sendLogPayload(0x1c, 0xe4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, address p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(string,bool,address)`.
+ mstore(0x00, 0x932bbb38)
+ mstore(0x20, 0x60)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ writeString(0x80, p0)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, bool p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(string,bool,bool)`.
+ mstore(0x00, 0x850b7ad6)
+ mstore(0x20, 0x60)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ writeString(0x80, p0)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, uint256 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(string,bool,uint256)`.
+ mstore(0x00, 0xc95958d6)
+ mstore(0x20, 0x60)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ writeString(0x80, p0)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, bytes32 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ // Selector of `log(string,bool,string)`.
+ mstore(0x00, 0xe298f47d)
+ mstore(0x20, 0x60)
+ mstore(0x40, p1)
+ mstore(0x60, 0xa0)
+ writeString(0x80, p0)
+ writeString(0xc0, p2)
+ }
+ _sendLogPayload(0x1c, 0xe4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, address p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(string,uint256,address)`.
+ mstore(0x00, 0x1c7ec448)
+ mstore(0x20, 0x60)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ writeString(0x80, p0)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, bool p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(string,uint256,bool)`.
+ mstore(0x00, 0xca7733b1)
+ mstore(0x20, 0x60)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ writeString(0x80, p0)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, uint256 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ // Selector of `log(string,uint256,uint256)`.
+ mstore(0x00, 0xca47c4eb)
+ mstore(0x20, 0x60)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ writeString(0x80, p0)
+ }
+ _sendLogPayload(0x1c, 0xa4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ // Selector of `log(string,uint256,string)`.
+ mstore(0x00, 0x5970e089)
+ mstore(0x20, 0x60)
+ mstore(0x40, p1)
+ mstore(0x60, 0xa0)
+ writeString(0x80, p0)
+ writeString(0xc0, p2)
+ }
+ _sendLogPayload(0x1c, 0xe4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, address p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ // Selector of `log(string,string,address)`.
+ mstore(0x00, 0x95ed0195)
+ mstore(0x20, 0x60)
+ mstore(0x40, 0xa0)
+ mstore(0x60, p2)
+ writeString(0x80, p0)
+ writeString(0xc0, p1)
+ }
+ _sendLogPayload(0x1c, 0xe4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, bool p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ // Selector of `log(string,string,bool)`.
+ mstore(0x00, 0xb0e0f9b5)
+ mstore(0x20, 0x60)
+ mstore(0x40, 0xa0)
+ mstore(0x60, p2)
+ writeString(0x80, p0)
+ writeString(0xc0, p1)
+ }
+ _sendLogPayload(0x1c, 0xe4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ // Selector of `log(string,string,uint256)`.
+ mstore(0x00, 0x5821efa1)
+ mstore(0x20, 0x60)
+ mstore(0x40, 0xa0)
+ mstore(0x60, p2)
+ writeString(0x80, p0)
+ writeString(0xc0, p1)
+ }
+ _sendLogPayload(0x1c, 0xe4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ bytes32 m9;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ m9 := mload(0x120)
+ // Selector of `log(string,string,string)`.
+ mstore(0x00, 0x2ced7cef)
+ mstore(0x20, 0x60)
+ mstore(0x40, 0xa0)
+ mstore(0x60, 0xe0)
+ writeString(0x80, p0)
+ writeString(0xc0, p1)
+ writeString(0x100, p2)
+ }
+ _sendLogPayload(0x1c, 0x124);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ mstore(0x120, m9)
+ }
+ }
+
+ function log(address p0, address p1, address p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,address,address,address)`.
+ mstore(0x00, 0x665bf134)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, address p1, address p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,address,address,bool)`.
+ mstore(0x00, 0x0e378994)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, address p1, address p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,address,address,uint256)`.
+ mstore(0x00, 0x94250d77)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, address p1, address p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,address,address,string)`.
+ mstore(0x00, 0xf808da20)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, address p1, bool p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,address,bool,address)`.
+ mstore(0x00, 0x9f1bc36e)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, address p1, bool p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,address,bool,bool)`.
+ mstore(0x00, 0x2cd4134a)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, address p1, bool p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,address,bool,uint256)`.
+ mstore(0x00, 0x3971e78c)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, address p1, bool p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,address,bool,string)`.
+ mstore(0x00, 0xaa6540c8)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, address p1, uint256 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,address,uint256,address)`.
+ mstore(0x00, 0x8da6def5)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, address p1, uint256 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,address,uint256,bool)`.
+ mstore(0x00, 0x9b4254e2)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,address,uint256,uint256)`.
+ mstore(0x00, 0xbe553481)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,address,uint256,string)`.
+ mstore(0x00, 0xfdb4f990)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, address p1, bytes32 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,address,string,address)`.
+ mstore(0x00, 0x8f736d16)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, address p1, bytes32 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,address,string,bool)`.
+ mstore(0x00, 0x6f1a594e)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,address,string,uint256)`.
+ mstore(0x00, 0xef1cefe7)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(address,address,string,string)`.
+ mstore(0x00, 0x21bdaf25)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p2)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(address p0, bool p1, address p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,bool,address,address)`.
+ mstore(0x00, 0x660375dd)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, bool p1, address p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,bool,address,bool)`.
+ mstore(0x00, 0xa6f50b0f)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, bool p1, address p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,bool,address,uint256)`.
+ mstore(0x00, 0xa75c59de)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, bool p1, address p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,bool,address,string)`.
+ mstore(0x00, 0x2dd778e6)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, bool p1, bool p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,bool,bool,address)`.
+ mstore(0x00, 0xcf394485)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, bool p1, bool p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,bool,bool,bool)`.
+ mstore(0x00, 0xcac43479)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, bool p1, bool p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,bool,bool,uint256)`.
+ mstore(0x00, 0x8c4e5de6)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, bool p1, bool p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,bool,bool,string)`.
+ mstore(0x00, 0xdfc4a2e8)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, bool p1, uint256 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,bool,uint256,address)`.
+ mstore(0x00, 0xccf790a1)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, bool p1, uint256 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,bool,uint256,bool)`.
+ mstore(0x00, 0xc4643e20)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,bool,uint256,uint256)`.
+ mstore(0x00, 0x386ff5f4)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,bool,uint256,string)`.
+ mstore(0x00, 0x0aa6cfad)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, bool p1, bytes32 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,bool,string,address)`.
+ mstore(0x00, 0x19fd4956)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, bool p1, bytes32 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,bool,string,bool)`.
+ mstore(0x00, 0x50ad461d)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,bool,string,uint256)`.
+ mstore(0x00, 0x80e6a20b)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(address,bool,string,string)`.
+ mstore(0x00, 0x475c5c33)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p2)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(address p0, uint256 p1, address p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,uint256,address,address)`.
+ mstore(0x00, 0x478d1c62)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, uint256 p1, address p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,uint256,address,bool)`.
+ mstore(0x00, 0xa1bcc9b3)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,uint256,address,uint256)`.
+ mstore(0x00, 0x100f650e)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,uint256,address,string)`.
+ mstore(0x00, 0x1da986ea)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, uint256 p1, bool p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,uint256,bool,address)`.
+ mstore(0x00, 0xa31bfdcc)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, uint256 p1, bool p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,uint256,bool,bool)`.
+ mstore(0x00, 0x3bf5e537)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,uint256,bool,uint256)`.
+ mstore(0x00, 0x22f6b999)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,uint256,bool,string)`.
+ mstore(0x00, 0xc5ad85f9)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,uint256,uint256,address)`.
+ mstore(0x00, 0x20e3984d)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,uint256,uint256,bool)`.
+ mstore(0x00, 0x66f1bc67)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(address,uint256,uint256,uint256)`.
+ mstore(0x00, 0x34f0e636)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,uint256,uint256,string)`.
+ mstore(0x00, 0x4a28c017)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,uint256,string,address)`.
+ mstore(0x00, 0x5c430d47)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,uint256,string,bool)`.
+ mstore(0x00, 0xcf18105c)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,uint256,string,uint256)`.
+ mstore(0x00, 0xbf01f891)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(address,uint256,string,string)`.
+ mstore(0x00, 0x88a8c406)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p2)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(address p0, bytes32 p1, address p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,string,address,address)`.
+ mstore(0x00, 0x0d36fa20)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, bytes32 p1, address p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,string,address,bool)`.
+ mstore(0x00, 0x0df12b76)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,string,address,uint256)`.
+ mstore(0x00, 0x457fe3cf)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(address,string,address,string)`.
+ mstore(0x00, 0xf7e36245)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p1)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(address p0, bytes32 p1, bool p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,string,bool,address)`.
+ mstore(0x00, 0x205871c2)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, bytes32 p1, bool p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,string,bool,bool)`.
+ mstore(0x00, 0x5f1d5c9f)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,string,bool,uint256)`.
+ mstore(0x00, 0x515e38b6)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(address,string,bool,string)`.
+ mstore(0x00, 0xbc0b61fe)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p1)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,string,uint256,address)`.
+ mstore(0x00, 0x63183678)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,string,uint256,bool)`.
+ mstore(0x00, 0x0ef7e050)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(address,string,uint256,uint256)`.
+ mstore(0x00, 0x1dc8e1b8)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(address,string,uint256,string)`.
+ mstore(0x00, 0x448830a8)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p1)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(address,string,string,address)`.
+ mstore(0x00, 0xa04e2f87)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, 0xc0)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ writeString(0xe0, p2)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(address,string,string,bool)`.
+ mstore(0x00, 0x35a5071f)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, 0xc0)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ writeString(0xe0, p2)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(address,string,string,uint256)`.
+ mstore(0x00, 0x159f8927)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, 0xc0)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ writeString(0xe0, p2)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ bytes32 m9;
+ bytes32 m10;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ m9 := mload(0x120)
+ m10 := mload(0x140)
+ // Selector of `log(address,string,string,string)`.
+ mstore(0x00, 0x5d02c50b)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, 0xc0)
+ mstore(0x80, 0x100)
+ writeString(0xa0, p1)
+ writeString(0xe0, p2)
+ writeString(0x120, p3)
+ }
+ _sendLogPayload(0x1c, 0x144);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ mstore(0x120, m9)
+ mstore(0x140, m10)
+ }
+ }
+
+ function log(bool p0, address p1, address p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,address,address,address)`.
+ mstore(0x00, 0x1d14d001)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, address p1, address p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,address,address,bool)`.
+ mstore(0x00, 0x46600be0)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, address p1, address p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,address,address,uint256)`.
+ mstore(0x00, 0x0c66d1be)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, address p1, address p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,address,address,string)`.
+ mstore(0x00, 0xd812a167)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, address p1, bool p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,address,bool,address)`.
+ mstore(0x00, 0x1c41a336)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, address p1, bool p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,address,bool,bool)`.
+ mstore(0x00, 0x6a9c478b)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, address p1, bool p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,address,bool,uint256)`.
+ mstore(0x00, 0x07831502)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, address p1, bool p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,address,bool,string)`.
+ mstore(0x00, 0x4a66cb34)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, address p1, uint256 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,address,uint256,address)`.
+ mstore(0x00, 0x136b05dd)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, address p1, uint256 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,address,uint256,bool)`.
+ mstore(0x00, 0xd6019f1c)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,address,uint256,uint256)`.
+ mstore(0x00, 0x7bf181a1)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,address,uint256,string)`.
+ mstore(0x00, 0x51f09ff8)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, address p1, bytes32 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,address,string,address)`.
+ mstore(0x00, 0x6f7c603e)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, address p1, bytes32 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,address,string,bool)`.
+ mstore(0x00, 0xe2bfd60b)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,address,string,uint256)`.
+ mstore(0x00, 0xc21f64c7)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(bool,address,string,string)`.
+ mstore(0x00, 0xa73c1db6)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p2)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bool p0, bool p1, address p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,bool,address,address)`.
+ mstore(0x00, 0xf4880ea4)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, bool p1, address p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,bool,address,bool)`.
+ mstore(0x00, 0xc0a302d8)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, bool p1, address p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,bool,address,uint256)`.
+ mstore(0x00, 0x4c123d57)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, bool p1, address p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,bool,address,string)`.
+ mstore(0x00, 0xa0a47963)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, bool p1, bool p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,bool,bool,address)`.
+ mstore(0x00, 0x8c329b1a)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, bool p1, bool p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,bool,bool,bool)`.
+ mstore(0x00, 0x3b2a5ce0)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,bool,bool,uint256)`.
+ mstore(0x00, 0x6d7045c1)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,bool,bool,string)`.
+ mstore(0x00, 0x2ae408d4)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, bool p1, uint256 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,bool,uint256,address)`.
+ mstore(0x00, 0x54a7a9a0)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,bool,uint256,bool)`.
+ mstore(0x00, 0x619e4d0e)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,bool,uint256,uint256)`.
+ mstore(0x00, 0x0bb00eab)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,bool,uint256,string)`.
+ mstore(0x00, 0x7dd4d0e0)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, bool p1, bytes32 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,bool,string,address)`.
+ mstore(0x00, 0xf9ad2b89)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,bool,string,bool)`.
+ mstore(0x00, 0xb857163a)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,bool,string,uint256)`.
+ mstore(0x00, 0xe3a9ca2f)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(bool,bool,string,string)`.
+ mstore(0x00, 0x6d1e8751)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p2)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bool p0, uint256 p1, address p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,uint256,address,address)`.
+ mstore(0x00, 0x26f560a8)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, uint256 p1, address p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,uint256,address,bool)`.
+ mstore(0x00, 0xb4c314ff)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,uint256,address,uint256)`.
+ mstore(0x00, 0x1537dc87)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,uint256,address,string)`.
+ mstore(0x00, 0x1bb3b09a)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, uint256 p1, bool p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,uint256,bool,address)`.
+ mstore(0x00, 0x9acd3616)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,uint256,bool,bool)`.
+ mstore(0x00, 0xceb5f4d7)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,uint256,bool,uint256)`.
+ mstore(0x00, 0x7f9bbca2)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,uint256,bool,string)`.
+ mstore(0x00, 0x9143dbb1)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,uint256,uint256,address)`.
+ mstore(0x00, 0x00dd87b9)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,uint256,uint256,bool)`.
+ mstore(0x00, 0xbe984353)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(bool,uint256,uint256,uint256)`.
+ mstore(0x00, 0x374bb4b2)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,uint256,uint256,string)`.
+ mstore(0x00, 0x8e69fb5d)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,uint256,string,address)`.
+ mstore(0x00, 0xfedd1fff)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,uint256,string,bool)`.
+ mstore(0x00, 0xe5e70b2b)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,uint256,string,uint256)`.
+ mstore(0x00, 0x6a1199e2)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(bool,uint256,string,string)`.
+ mstore(0x00, 0xf5bc2249)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p2)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, address p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,string,address,address)`.
+ mstore(0x00, 0x2b2b18dc)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, address p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,string,address,bool)`.
+ mstore(0x00, 0x6dd434ca)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,string,address,uint256)`.
+ mstore(0x00, 0xa5cada94)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(bool,string,address,string)`.
+ mstore(0x00, 0x12d6c788)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p1)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, bool p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,string,bool,address)`.
+ mstore(0x00, 0x538e06ab)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,string,bool,bool)`.
+ mstore(0x00, 0xdc5e935b)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,string,bool,uint256)`.
+ mstore(0x00, 0x1606a393)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(bool,string,bool,string)`.
+ mstore(0x00, 0x483d0416)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p1)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,string,uint256,address)`.
+ mstore(0x00, 0x1596a1ce)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,string,uint256,bool)`.
+ mstore(0x00, 0x6b0e5d53)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(bool,string,uint256,uint256)`.
+ mstore(0x00, 0x28863fcb)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(bool,string,uint256,string)`.
+ mstore(0x00, 0x1ad96de6)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p1)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(bool,string,string,address)`.
+ mstore(0x00, 0x97d394d8)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, 0xc0)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ writeString(0xe0, p2)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(bool,string,string,bool)`.
+ mstore(0x00, 0x1e4b87e5)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, 0xc0)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ writeString(0xe0, p2)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(bool,string,string,uint256)`.
+ mstore(0x00, 0x7be0c3eb)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, 0xc0)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ writeString(0xe0, p2)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ bytes32 m9;
+ bytes32 m10;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ m9 := mload(0x120)
+ m10 := mload(0x140)
+ // Selector of `log(bool,string,string,string)`.
+ mstore(0x00, 0x1762e32a)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, 0xc0)
+ mstore(0x80, 0x100)
+ writeString(0xa0, p1)
+ writeString(0xe0, p2)
+ writeString(0x120, p3)
+ }
+ _sendLogPayload(0x1c, 0x144);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ mstore(0x120, m9)
+ mstore(0x140, m10)
+ }
+ }
+
+ function log(uint256 p0, address p1, address p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,address,address,address)`.
+ mstore(0x00, 0x2488b414)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, address p1, address p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,address,address,bool)`.
+ mstore(0x00, 0x091ffaf5)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,address,address,uint256)`.
+ mstore(0x00, 0x736efbb6)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,address,address,string)`.
+ mstore(0x00, 0x031c6f73)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, address p1, bool p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,address,bool,address)`.
+ mstore(0x00, 0xef72c513)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, address p1, bool p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,address,bool,bool)`.
+ mstore(0x00, 0xe351140f)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,address,bool,uint256)`.
+ mstore(0x00, 0x5abd992a)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,address,bool,string)`.
+ mstore(0x00, 0x90fb06aa)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,address,uint256,address)`.
+ mstore(0x00, 0x15c127b5)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,address,uint256,bool)`.
+ mstore(0x00, 0x5f743a7c)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,address,uint256,uint256)`.
+ mstore(0x00, 0x0c9cd9c1)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,address,uint256,string)`.
+ mstore(0x00, 0xddb06521)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,address,string,address)`.
+ mstore(0x00, 0x9cba8fff)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,address,string,bool)`.
+ mstore(0x00, 0xcc32ab07)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,address,string,uint256)`.
+ mstore(0x00, 0x46826b5d)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(uint256,address,string,string)`.
+ mstore(0x00, 0x3e128ca3)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p2)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(uint256 p0, bool p1, address p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,bool,address,address)`.
+ mstore(0x00, 0xa1ef4cbb)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, bool p1, address p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,bool,address,bool)`.
+ mstore(0x00, 0x454d54a5)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,bool,address,uint256)`.
+ mstore(0x00, 0x078287f5)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,bool,address,string)`.
+ mstore(0x00, 0xade052c7)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, bool p1, bool p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,bool,bool,address)`.
+ mstore(0x00, 0x69640b59)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,bool,bool,bool)`.
+ mstore(0x00, 0xb6f577a1)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,bool,bool,uint256)`.
+ mstore(0x00, 0x7464ce23)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,bool,bool,string)`.
+ mstore(0x00, 0xdddb9561)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,bool,uint256,address)`.
+ mstore(0x00, 0x88cb6041)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,bool,uint256,bool)`.
+ mstore(0x00, 0x91a02e2a)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,bool,uint256,uint256)`.
+ mstore(0x00, 0xc6acc7a8)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,bool,uint256,string)`.
+ mstore(0x00, 0xde03e774)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,bool,string,address)`.
+ mstore(0x00, 0xef529018)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,bool,string,bool)`.
+ mstore(0x00, 0xeb928d7f)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,bool,string,uint256)`.
+ mstore(0x00, 0x2c1d0746)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(uint256,bool,string,string)`.
+ mstore(0x00, 0x68c8b8bd)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p2)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,uint256,address,address)`.
+ mstore(0x00, 0x56a5d1b1)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,uint256,address,bool)`.
+ mstore(0x00, 0x15cac476)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,uint256,address,uint256)`.
+ mstore(0x00, 0x88f6e4b2)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,uint256,address,string)`.
+ mstore(0x00, 0x6cde40b8)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,uint256,bool,address)`.
+ mstore(0x00, 0x9a816a83)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,uint256,bool,bool)`.
+ mstore(0x00, 0xab085ae6)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,uint256,bool,uint256)`.
+ mstore(0x00, 0xeb7f6fd2)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,uint256,bool,string)`.
+ mstore(0x00, 0xa5b4fc99)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,uint256,uint256,address)`.
+ mstore(0x00, 0xfa8185af)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,uint256,uint256,bool)`.
+ mstore(0x00, 0xc598d185)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ /// @solidity memory-safe-assembly
+ assembly {
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ // Selector of `log(uint256,uint256,uint256,uint256)`.
+ mstore(0x00, 0x193fb800)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ }
+ _sendLogPayload(0x1c, 0x84);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,uint256,uint256,string)`.
+ mstore(0x00, 0x59cfcbe3)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0x80)
+ writeString(0xa0, p3)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,uint256,string,address)`.
+ mstore(0x00, 0x42d21db7)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,uint256,string,bool)`.
+ mstore(0x00, 0x7af6ab25)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,uint256,string,uint256)`.
+ mstore(0x00, 0x5da297eb)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, p3)
+ writeString(0xa0, p2)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(uint256,uint256,string,string)`.
+ mstore(0x00, 0x27d8afd2)
+ mstore(0x20, p0)
+ mstore(0x40, p1)
+ mstore(0x60, 0x80)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p2)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,string,address,address)`.
+ mstore(0x00, 0x6168ed61)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,string,address,bool)`.
+ mstore(0x00, 0x90c30a56)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,string,address,uint256)`.
+ mstore(0x00, 0xe8d3018d)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(uint256,string,address,string)`.
+ mstore(0x00, 0x9c3adfa1)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p1)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,string,bool,address)`.
+ mstore(0x00, 0xae2ec581)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,string,bool,bool)`.
+ mstore(0x00, 0xba535d9c)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,string,bool,uint256)`.
+ mstore(0x00, 0xcf009880)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(uint256,string,bool,string)`.
+ mstore(0x00, 0xd2d423cd)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p1)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,string,uint256,address)`.
+ mstore(0x00, 0x3b2279b4)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,string,uint256,bool)`.
+ mstore(0x00, 0x691a8f74)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(uint256,string,uint256,uint256)`.
+ mstore(0x00, 0x82c25b74)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(uint256,string,uint256,string)`.
+ mstore(0x00, 0xb7b914ca)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, p2)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p1)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(uint256,string,string,address)`.
+ mstore(0x00, 0xd583c602)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, 0xc0)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ writeString(0xe0, p2)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(uint256,string,string,bool)`.
+ mstore(0x00, 0xb3a6b6bd)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, 0xc0)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ writeString(0xe0, p2)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(uint256,string,string,uint256)`.
+ mstore(0x00, 0xb028c9bd)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, 0xc0)
+ mstore(0x80, p3)
+ writeString(0xa0, p1)
+ writeString(0xe0, p2)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ bytes32 m9;
+ bytes32 m10;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ m9 := mload(0x120)
+ m10 := mload(0x140)
+ // Selector of `log(uint256,string,string,string)`.
+ mstore(0x00, 0x21ad0683)
+ mstore(0x20, p0)
+ mstore(0x40, 0x80)
+ mstore(0x60, 0xc0)
+ mstore(0x80, 0x100)
+ writeString(0xa0, p1)
+ writeString(0xe0, p2)
+ writeString(0x120, p3)
+ }
+ _sendLogPayload(0x1c, 0x144);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ mstore(0x120, m9)
+ mstore(0x140, m10)
+ }
+ }
+
+ function log(bytes32 p0, address p1, address p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,address,address,address)`.
+ mstore(0x00, 0xed8f28f6)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, address p1, address p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,address,address,bool)`.
+ mstore(0x00, 0xb59dbd60)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,address,address,uint256)`.
+ mstore(0x00, 0x8ef3f399)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,address,address,string)`.
+ mstore(0x00, 0x800a1c67)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p0)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, address p1, bool p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,address,bool,address)`.
+ mstore(0x00, 0x223603bd)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, address p1, bool p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,address,bool,bool)`.
+ mstore(0x00, 0x79884c2b)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,address,bool,uint256)`.
+ mstore(0x00, 0x3e9f866a)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,address,bool,string)`.
+ mstore(0x00, 0x0454c079)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p0)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,address,uint256,address)`.
+ mstore(0x00, 0x63fb8bc5)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,address,uint256,bool)`.
+ mstore(0x00, 0xfc4845f0)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,address,uint256,uint256)`.
+ mstore(0x00, 0xf8f51b1e)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,address,uint256,string)`.
+ mstore(0x00, 0x5a477632)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p0)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,address,string,address)`.
+ mstore(0x00, 0xaabc9a31)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, 0xc0)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p2)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,address,string,bool)`.
+ mstore(0x00, 0x5f15d28c)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, 0xc0)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p2)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,address,string,uint256)`.
+ mstore(0x00, 0x91d1112e)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, 0xc0)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p2)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ bytes32 m9;
+ bytes32 m10;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ m9 := mload(0x120)
+ m10 := mload(0x140)
+ // Selector of `log(string,address,string,string)`.
+ mstore(0x00, 0x245986f2)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, 0xc0)
+ mstore(0x80, 0x100)
+ writeString(0xa0, p0)
+ writeString(0xe0, p2)
+ writeString(0x120, p3)
+ }
+ _sendLogPayload(0x1c, 0x144);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ mstore(0x120, m9)
+ mstore(0x140, m10)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, address p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,bool,address,address)`.
+ mstore(0x00, 0x33e9dd1d)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, address p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,bool,address,bool)`.
+ mstore(0x00, 0x958c28c6)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,bool,address,uint256)`.
+ mstore(0x00, 0x5d08bb05)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,bool,address,string)`.
+ mstore(0x00, 0x2d8e33a4)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p0)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, bool p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,bool,bool,address)`.
+ mstore(0x00, 0x7190a529)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,bool,bool,bool)`.
+ mstore(0x00, 0x895af8c5)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,bool,bool,uint256)`.
+ mstore(0x00, 0x8e3f78a9)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,bool,bool,string)`.
+ mstore(0x00, 0x9d22d5dd)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p0)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,bool,uint256,address)`.
+ mstore(0x00, 0x935e09bf)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,bool,uint256,bool)`.
+ mstore(0x00, 0x8af7cf8a)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,bool,uint256,uint256)`.
+ mstore(0x00, 0x64b5bb67)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,bool,uint256,string)`.
+ mstore(0x00, 0x742d6ee7)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p0)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,bool,string,address)`.
+ mstore(0x00, 0xe0625b29)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, 0xc0)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p2)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,bool,string,bool)`.
+ mstore(0x00, 0x3f8a701d)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, 0xc0)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p2)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,bool,string,uint256)`.
+ mstore(0x00, 0x24f91465)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, 0xc0)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p2)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ bytes32 m9;
+ bytes32 m10;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ m9 := mload(0x120)
+ m10 := mload(0x140)
+ // Selector of `log(string,bool,string,string)`.
+ mstore(0x00, 0xa826caeb)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, 0xc0)
+ mstore(0x80, 0x100)
+ writeString(0xa0, p0)
+ writeString(0xe0, p2)
+ writeString(0x120, p3)
+ }
+ _sendLogPayload(0x1c, 0x144);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ mstore(0x120, m9)
+ mstore(0x140, m10)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,uint256,address,address)`.
+ mstore(0x00, 0x5ea2b7ae)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,uint256,address,bool)`.
+ mstore(0x00, 0x82112a42)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,uint256,address,uint256)`.
+ mstore(0x00, 0x4f04fdc6)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,uint256,address,string)`.
+ mstore(0x00, 0x9ffb2f93)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p0)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,uint256,bool,address)`.
+ mstore(0x00, 0xe0e95b98)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,uint256,bool,bool)`.
+ mstore(0x00, 0x354c36d6)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,uint256,bool,uint256)`.
+ mstore(0x00, 0xe41b6f6f)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,uint256,bool,string)`.
+ mstore(0x00, 0xabf73a98)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p0)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,uint256,uint256,address)`.
+ mstore(0x00, 0xe21de278)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,uint256,uint256,bool)`.
+ mstore(0x00, 0x7626db92)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ // Selector of `log(string,uint256,uint256,uint256)`.
+ mstore(0x00, 0xa7a87853)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ }
+ _sendLogPayload(0x1c, 0xc4);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,uint256,uint256,string)`.
+ mstore(0x00, 0x854b3496)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, p2)
+ mstore(0x80, 0xc0)
+ writeString(0xa0, p0)
+ writeString(0xe0, p3)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,uint256,string,address)`.
+ mstore(0x00, 0x7c4632a4)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, 0xc0)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p2)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,uint256,string,bool)`.
+ mstore(0x00, 0x7d24491d)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, 0xc0)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p2)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,uint256,string,uint256)`.
+ mstore(0x00, 0xc67ea9d1)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, 0xc0)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p2)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ bytes32 m9;
+ bytes32 m10;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ m9 := mload(0x120)
+ m10 := mload(0x140)
+ // Selector of `log(string,uint256,string,string)`.
+ mstore(0x00, 0x5ab84e1f)
+ mstore(0x20, 0x80)
+ mstore(0x40, p1)
+ mstore(0x60, 0xc0)
+ mstore(0x80, 0x100)
+ writeString(0xa0, p0)
+ writeString(0xe0, p2)
+ writeString(0x120, p3)
+ }
+ _sendLogPayload(0x1c, 0x144);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ mstore(0x120, m9)
+ mstore(0x140, m10)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,string,address,address)`.
+ mstore(0x00, 0x439c7bef)
+ mstore(0x20, 0x80)
+ mstore(0x40, 0xc0)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p1)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,string,address,bool)`.
+ mstore(0x00, 0x5ccd4e37)
+ mstore(0x20, 0x80)
+ mstore(0x40, 0xc0)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p1)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,string,address,uint256)`.
+ mstore(0x00, 0x7cc3c607)
+ mstore(0x20, 0x80)
+ mstore(0x40, 0xc0)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p1)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ bytes32 m9;
+ bytes32 m10;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ m9 := mload(0x120)
+ m10 := mload(0x140)
+ // Selector of `log(string,string,address,string)`.
+ mstore(0x00, 0xeb1bff80)
+ mstore(0x20, 0x80)
+ mstore(0x40, 0xc0)
+ mstore(0x60, p2)
+ mstore(0x80, 0x100)
+ writeString(0xa0, p0)
+ writeString(0xe0, p1)
+ writeString(0x120, p3)
+ }
+ _sendLogPayload(0x1c, 0x144);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ mstore(0x120, m9)
+ mstore(0x140, m10)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,string,bool,address)`.
+ mstore(0x00, 0xc371c7db)
+ mstore(0x20, 0x80)
+ mstore(0x40, 0xc0)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p1)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,string,bool,bool)`.
+ mstore(0x00, 0x40785869)
+ mstore(0x20, 0x80)
+ mstore(0x40, 0xc0)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p1)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,string,bool,uint256)`.
+ mstore(0x00, 0xd6aefad2)
+ mstore(0x20, 0x80)
+ mstore(0x40, 0xc0)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p1)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ bytes32 m9;
+ bytes32 m10;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ m9 := mload(0x120)
+ m10 := mload(0x140)
+ // Selector of `log(string,string,bool,string)`.
+ mstore(0x00, 0x5e84b0ea)
+ mstore(0x20, 0x80)
+ mstore(0x40, 0xc0)
+ mstore(0x60, p2)
+ mstore(0x80, 0x100)
+ writeString(0xa0, p0)
+ writeString(0xe0, p1)
+ writeString(0x120, p3)
+ }
+ _sendLogPayload(0x1c, 0x144);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ mstore(0x120, m9)
+ mstore(0x140, m10)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,string,uint256,address)`.
+ mstore(0x00, 0x1023f7b2)
+ mstore(0x20, 0x80)
+ mstore(0x40, 0xc0)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p1)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,string,uint256,bool)`.
+ mstore(0x00, 0xc3a8a654)
+ mstore(0x20, 0x80)
+ mstore(0x40, 0xc0)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p1)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ // Selector of `log(string,string,uint256,uint256)`.
+ mstore(0x00, 0xf45d7d2c)
+ mstore(0x20, 0x80)
+ mstore(0x40, 0xc0)
+ mstore(0x60, p2)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p1)
+ }
+ _sendLogPayload(0x1c, 0x104);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ bytes32 m9;
+ bytes32 m10;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ m9 := mload(0x120)
+ m10 := mload(0x140)
+ // Selector of `log(string,string,uint256,string)`.
+ mstore(0x00, 0x5d1a971a)
+ mstore(0x20, 0x80)
+ mstore(0x40, 0xc0)
+ mstore(0x60, p2)
+ mstore(0x80, 0x100)
+ writeString(0xa0, p0)
+ writeString(0xe0, p1)
+ writeString(0x120, p3)
+ }
+ _sendLogPayload(0x1c, 0x144);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ mstore(0x120, m9)
+ mstore(0x140, m10)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ bytes32 m9;
+ bytes32 m10;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ m9 := mload(0x120)
+ m10 := mload(0x140)
+ // Selector of `log(string,string,string,address)`.
+ mstore(0x00, 0x6d572f44)
+ mstore(0x20, 0x80)
+ mstore(0x40, 0xc0)
+ mstore(0x60, 0x100)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p1)
+ writeString(0x120, p2)
+ }
+ _sendLogPayload(0x1c, 0x144);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ mstore(0x120, m9)
+ mstore(0x140, m10)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ bytes32 m9;
+ bytes32 m10;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ m9 := mload(0x120)
+ m10 := mload(0x140)
+ // Selector of `log(string,string,string,bool)`.
+ mstore(0x00, 0x2c1754ed)
+ mstore(0x20, 0x80)
+ mstore(0x40, 0xc0)
+ mstore(0x60, 0x100)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p1)
+ writeString(0x120, p2)
+ }
+ _sendLogPayload(0x1c, 0x144);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ mstore(0x120, m9)
+ mstore(0x140, m10)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ bytes32 m9;
+ bytes32 m10;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ m9 := mload(0x120)
+ m10 := mload(0x140)
+ // Selector of `log(string,string,string,uint256)`.
+ mstore(0x00, 0x8eafb02b)
+ mstore(0x20, 0x80)
+ mstore(0x40, 0xc0)
+ mstore(0x60, 0x100)
+ mstore(0x80, p3)
+ writeString(0xa0, p0)
+ writeString(0xe0, p1)
+ writeString(0x120, p2)
+ }
+ _sendLogPayload(0x1c, 0x144);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ mstore(0x120, m9)
+ mstore(0x140, m10)
+ }
+ }
+
+ function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure {
+ bytes32 m0;
+ bytes32 m1;
+ bytes32 m2;
+ bytes32 m3;
+ bytes32 m4;
+ bytes32 m5;
+ bytes32 m6;
+ bytes32 m7;
+ bytes32 m8;
+ bytes32 m9;
+ bytes32 m10;
+ bytes32 m11;
+ bytes32 m12;
+ /// @solidity memory-safe-assembly
+ assembly {
+ function writeString(pos, w) {
+ let length := 0
+ for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } }
+ mstore(pos, length)
+ let shift := sub(256, shl(3, length))
+ mstore(add(pos, 0x20), shl(shift, shr(shift, w)))
+ }
+ m0 := mload(0x00)
+ m1 := mload(0x20)
+ m2 := mload(0x40)
+ m3 := mload(0x60)
+ m4 := mload(0x80)
+ m5 := mload(0xa0)
+ m6 := mload(0xc0)
+ m7 := mload(0xe0)
+ m8 := mload(0x100)
+ m9 := mload(0x120)
+ m10 := mload(0x140)
+ m11 := mload(0x160)
+ m12 := mload(0x180)
+ // Selector of `log(string,string,string,string)`.
+ mstore(0x00, 0xde68f20a)
+ mstore(0x20, 0x80)
+ mstore(0x40, 0xc0)
+ mstore(0x60, 0x100)
+ mstore(0x80, 0x140)
+ writeString(0xa0, p0)
+ writeString(0xe0, p1)
+ writeString(0x120, p2)
+ writeString(0x160, p3)
+ }
+ _sendLogPayload(0x1c, 0x184);
+ /// @solidity memory-safe-assembly
+ assembly {
+ mstore(0x00, m0)
+ mstore(0x20, m1)
+ mstore(0x40, m2)
+ mstore(0x60, m3)
+ mstore(0x80, m4)
+ mstore(0xa0, m5)
+ mstore(0xc0, m6)
+ mstore(0xe0, m7)
+ mstore(0x100, m8)
+ mstore(0x120, m9)
+ mstore(0x140, m10)
+ mstore(0x160, m11)
+ mstore(0x180, m12)
+ }
+ }
+}
diff --git a/contracts/lib/forge-std/test/CommonBase.t.sol b/contracts/lib/forge-std/test/CommonBase.t.sol
new file mode 100644
index 0000000..4a6eb34
--- /dev/null
+++ b/contracts/lib/forge-std/test/CommonBase.t.sol
@@ -0,0 +1,44 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.7.0 <0.9.0;
+
+import {CommonBase} from "../src/Base.sol";
+import {StdConstants} from "../src/StdConstants.sol";
+import {Test} from "../src/Test.sol";
+
+contract CommonBaseTest is Test {
+ function testVmAddressValue() public pure {
+ assertEq(VM_ADDRESS, address(StdConstants.VM));
+ }
+
+ function testConsoleValue() public pure {
+ assertEq(CONSOLE, StdConstants.CONSOLE);
+ }
+
+ function testCreate2FactoryValue() public pure {
+ assertEq(CREATE2_FACTORY, StdConstants.CREATE2_FACTORY);
+ }
+
+ function testDefaultSenderValue() public pure {
+ assertEq(DEFAULT_SENDER, StdConstants.DEFAULT_SENDER);
+ }
+
+ function testDefaultTestContractValue() public pure {
+ assertEq(DEFAULT_TEST_CONTRACT, StdConstants.DEFAULT_TEST_CONTRACT);
+ }
+
+ function testMulticall3AddressValue() public pure {
+ assertEq(MULTICALL3_ADDRESS, address(StdConstants.MULTICALL3_ADDRESS));
+ }
+
+ function testSecp256k1OrderValue() public pure {
+ assertEq(SECP256K1_ORDER, StdConstants.SECP256K1_ORDER);
+ }
+
+ function testUint256MaxValue() public pure {
+ assertEq(UINT256_MAX, type(uint256).max);
+ }
+
+ function testVmValue() public pure {
+ assertEq(address(vm), address(StdConstants.VM));
+ }
+}
diff --git a/contracts/lib/forge-std/test/Config.t.sol b/contracts/lib/forge-std/test/Config.t.sol
new file mode 100644
index 0000000..bc240b4
--- /dev/null
+++ b/contracts/lib/forge-std/test/Config.t.sol
@@ -0,0 +1,352 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.13;
+
+import {Test} from "../src/Test.sol";
+import {Config} from "../src/Config.sol";
+import {StdConfig} from "../src/StdConfig.sol";
+
+contract ConfigTest is Test, Config {
+ function setUp() public {
+ vm.setEnv("MAINNET_RPC", "https://reth-ethereum.ithaca.xyz/rpc");
+ vm.setEnv("WETH_MAINNET", "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2");
+ vm.setEnv("OPTIMISM_RPC", "https://mainnet.optimism.io");
+ vm.setEnv("WETH_OPTIMISM", "0x4200000000000000000000000000000000000006");
+ }
+
+ function test_loadConfig() public {
+ // Deploy the config contract with the test fixture.
+ _loadConfig("./test/fixtures/config.toml", false);
+
+ // -- MAINNET --------------------------------------------------------------
+
+ // Read and assert RPC URL for Mainnet (chain ID 1)
+ assertEq(config.getRpcUrl(1), "https://reth-ethereum.ithaca.xyz/rpc");
+
+ // Read and assert boolean values
+ assertTrue(config.get(1, "is_live").toBool());
+ bool[] memory bool_array = config.get(1, "bool_array").toBoolArray();
+ assertTrue(bool_array[0]);
+ assertFalse(bool_array[1]);
+
+ // Read and assert address values
+ assertEq(config.get(1, "weth").toAddress(), 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
+ address[] memory address_array = config.get(1, "deps").toAddressArray();
+ assertEq(address_array[0], 0x0000000000000000000000000000000000000000);
+ assertEq(address_array[1], 0x1111111111111111111111111111111111111111);
+
+ // Read and assert bytes32 values
+ assertEq(config.get(1, "word").toBytes32(), bytes32(uint256(1234)));
+ bytes32[] memory bytes32_array = config.get(1, "word_array").toBytes32Array();
+ assertEq(bytes32_array[0], bytes32(uint256(5678)));
+ assertEq(bytes32_array[1], bytes32(uint256(9999)));
+
+ // Read and assert uint values
+ assertEq(config.get(1, "number").toUint256(), 1234);
+ uint256[] memory uint_array = config.get(1, "number_array").toUint256Array();
+ assertEq(uint_array[0], 5678);
+ assertEq(uint_array[1], 9999);
+
+ // Read and assert int values
+ assertEq(config.get(1, "signed_number").toInt256(), -1234);
+ int256[] memory int_array = config.get(1, "signed_number_array").toInt256Array();
+ assertEq(int_array[0], -5678);
+ assertEq(int_array[1], 9999);
+
+ // Read and assert bytes values
+ assertEq(config.get(1, "b").toBytes(), hex"abcd");
+ bytes[] memory bytes_array = config.get(1, "b_array").toBytesArray();
+ assertEq(bytes_array[0], hex"dead");
+ assertEq(bytes_array[1], hex"beef");
+
+ // Read and assert string values
+ assertEq(config.get(1, "str").toString(), "foo");
+ string[] memory string_array = config.get(1, "str_array").toStringArray();
+ assertEq(string_array[0], "bar");
+ assertEq(string_array[1], "baz");
+
+ // -- OPTIMISM ------------------------------------------------------------
+
+ // Read and assert RPC URL for Optimism (chain ID 10)
+ assertEq(config.getRpcUrl(10), "https://mainnet.optimism.io");
+
+ // Read and assert boolean values
+ assertFalse(config.get(10, "is_live").toBool());
+ bool_array = config.get(10, "bool_array").toBoolArray();
+ assertFalse(bool_array[0]);
+ assertTrue(bool_array[1]);
+
+ // Read and assert address values
+ assertEq(config.get(10, "weth").toAddress(), 0x4200000000000000000000000000000000000006);
+ address_array = config.get(10, "deps").toAddressArray();
+ assertEq(address_array[0], 0x2222222222222222222222222222222222222222);
+ assertEq(address_array[1], 0x3333333333333333333333333333333333333333);
+
+ // Read and assert bytes32 values
+ assertEq(config.get(10, "word").toBytes32(), bytes32(uint256(9999)));
+ bytes32_array = config.get(10, "word_array").toBytes32Array();
+ assertEq(bytes32_array[0], bytes32(uint256(1234)));
+ assertEq(bytes32_array[1], bytes32(uint256(5678)));
+
+ // Read and assert uint values
+ assertEq(config.get(10, "number").toUint256(), 9999);
+ uint_array = config.get(10, "number_array").toUint256Array();
+ assertEq(uint_array[0], 1234);
+ assertEq(uint_array[1], 5678);
+
+ // Read and assert int values
+ assertEq(config.get(10, "signed_number").toInt256(), 9999);
+ int_array = config.get(10, "signed_number_array").toInt256Array();
+ assertEq(int_array[0], -1234);
+ assertEq(int_array[1], -5678);
+
+ // Read and assert bytes values
+ assertEq(config.get(10, "b").toBytes(), hex"dcba");
+ bytes_array = config.get(10, "b_array").toBytesArray();
+ assertEq(bytes_array[0], hex"c0ffee");
+ assertEq(bytes_array[1], hex"babe");
+
+ // Read and assert string values
+ assertEq(config.get(10, "str").toString(), "alice");
+ string_array = config.get(10, "str_array").toStringArray();
+ assertEq(string_array[0], "bob");
+ assertEq(string_array[1], "charlie");
+ }
+
+ function test_loadConfigAndForks() public {
+ _loadConfigAndForks("./test/fixtures/config.toml", false);
+
+ // assert that the map of chain id and fork ids is created and that the chain ids actually match
+ assertEq(forkOf[1], 0);
+ vm.selectFork(forkOf[1]);
+ assertEq(vm.getChainId(), 1);
+
+ assertEq(forkOf[10], 1);
+ vm.selectFork(forkOf[10]);
+ assertEq(vm.getChainId(), 10);
+ }
+
+ function test_writeConfig() public {
+ // Create a temporary copy of the config file to avoid modifying the original.
+ string memory originalConfig = "./test/fixtures/config.toml";
+ string memory testConfig = "./test/fixtures/config.t.toml";
+ vm.copyFile(originalConfig, testConfig);
+
+ // Deploy the config contract with the temporary fixture.
+ _loadConfig(testConfig, false);
+
+ // Enable writing to file bypassing the context check.
+ vm.store(address(config), bytes32(uint256(5)), bytes32(uint256(1)));
+
+ {
+ // Update a single boolean value and verify the change.
+ config.set(1, "is_live", false);
+
+ assertFalse(config.get(1, "is_live").toBool());
+
+ string memory content = vm.readFile(testConfig);
+ assertFalse(vm.parseTomlBool(content, "$.mainnet.bool.is_live"));
+
+ // Update a single address value and verify the change.
+ address new_addr = 0xDeaDbeefdEAdbeefdEadbEEFdeadbeEFdEaDbeeF;
+ config.set(1, "weth", new_addr);
+
+ assertEq(config.get(1, "weth").toAddress(), new_addr);
+
+ content = vm.readFile(testConfig);
+ assertEq(vm.parseTomlAddress(content, "$.mainnet.address.weth"), new_addr);
+
+ // Update a uint array and verify the change.
+ uint256[] memory new_numbers = new uint256[](3);
+ new_numbers[0] = 1;
+ new_numbers[1] = 2;
+ new_numbers[2] = 3;
+ config.set(10, "number_array", new_numbers);
+
+ uint256[] memory updated_numbers_mem = config.get(10, "number_array").toUint256Array();
+ assertEq(updated_numbers_mem.length, 3);
+ assertEq(updated_numbers_mem[0], 1);
+ assertEq(updated_numbers_mem[1], 2);
+ assertEq(updated_numbers_mem[2], 3);
+
+ content = vm.readFile(testConfig);
+ uint256[] memory updated_numbers_disk = vm.parseTomlUintArray(content, "$.optimism.uint.number_array");
+ assertEq(updated_numbers_disk.length, 3);
+ assertEq(updated_numbers_disk[0], 1);
+ assertEq(updated_numbers_disk[1], 2);
+ assertEq(updated_numbers_disk[2], 3);
+
+ // Update a string array and verify the change.
+ string[] memory new_strings = new string[](2);
+ new_strings[0] = "hello";
+ new_strings[1] = "world";
+ config.set(1, "str_array", new_strings);
+
+ string[] memory updated_strings_mem = config.get(1, "str_array").toStringArray();
+ assertEq(updated_strings_mem.length, 2);
+ assertEq(updated_strings_mem[0], "hello");
+ assertEq(updated_strings_mem[1], "world");
+
+ content = vm.readFile(testConfig);
+ string[] memory updated_strings_disk = vm.parseTomlStringArray(content, "$.mainnet.string.str_array");
+ assertEq(updated_strings_disk.length, 2);
+ assertEq(updated_strings_disk[0], "hello");
+ assertEq(updated_strings_disk[1], "world");
+
+ // Create a new uint variable and verify the change.
+ config.set(1, "new_uint", uint256(42));
+
+ assertEq(config.get(1, "new_uint").toUint256(), 42);
+
+ content = vm.readFile(testConfig);
+ assertEq(vm.parseTomlUint(content, "$.mainnet.uint.new_uint"), 42);
+
+ // Create a new int variable and verify the change.
+ config.set(1, "new_int", int256(-42));
+
+ assertEq(config.get(1, "new_int").toInt256(), -42);
+
+ content = vm.readFile(testConfig);
+ assertEq(vm.parseTomlInt(content, "$.mainnet.int.new_int"), -42);
+
+ // Create a new int array and verify the change.
+ int256[] memory new_ints = new int256[](2);
+ new_ints[0] = -100;
+ new_ints[1] = 200;
+ config.set(10, "new_ints", new_ints);
+
+ int256[] memory updated_ints_mem = config.get(10, "new_ints").toInt256Array();
+ assertEq(updated_ints_mem.length, 2);
+ assertEq(updated_ints_mem[0], -100);
+ assertEq(updated_ints_mem[1], 200);
+
+ content = vm.readFile(testConfig);
+ int256[] memory updated_ints_disk = vm.parseTomlIntArray(content, "$.optimism.int.new_ints");
+ assertEq(updated_ints_disk.length, 2);
+ assertEq(updated_ints_disk[0], -100);
+ assertEq(updated_ints_disk[1], 200);
+
+ // Create a new bytes32 array and verify the change.
+ bytes32[] memory new_words = new bytes32[](2);
+ new_words[0] = bytes32(uint256(0xDEAD));
+ new_words[1] = bytes32(uint256(0xBEEF));
+ config.set(10, "new_words", new_words);
+
+ bytes32[] memory updated_words_mem = config.get(10, "new_words").toBytes32Array();
+ assertEq(updated_words_mem.length, 2);
+ assertEq(updated_words_mem[0], new_words[0]);
+ assertEq(updated_words_mem[1], new_words[1]);
+
+ content = vm.readFile(testConfig);
+ bytes32[] memory updated_words_disk = vm.parseTomlBytes32Array(content, "$.optimism.bytes32.new_words");
+ assertEq(updated_words_disk.length, 2);
+ assertEq(vm.toString(updated_words_disk[0]), vm.toString(new_words[0]));
+ assertEq(vm.toString(updated_words_disk[1]), vm.toString(new_words[1]));
+ }
+
+ // Clean up the temporary file.
+ vm.removeFile(testConfig);
+ }
+
+ function test_writeUpdatesBackToFile() public {
+ // Create a temporary copy of the config file to avoid modifying the original.
+ string memory originalConfig = "./test/fixtures/config.toml";
+ string memory testConfig = "./test/fixtures/write_config.t.toml";
+ vm.copyFile(originalConfig, testConfig);
+
+ // Deploy the config contract with `writeToFile = false` (disabled).
+ _loadConfig(testConfig, false);
+
+ // Update a single boolean value and verify the file is NOT changed.
+ config.set(1, "is_live", false);
+ string memory content = vm.readFile(testConfig);
+ assertTrue(vm.parseTomlBool(content, "$.mainnet.bool.is_live"), "File should not be updated yet");
+
+ // Enable writing to file bypassing the context check.
+ vm.store(address(config), bytes32(uint256(5)), bytes32(uint256(1)));
+
+ // Update the value again and verify the file IS changed.
+ config.set(1, "is_live", false);
+ content = vm.readFile(testConfig);
+ assertFalse(vm.parseTomlBool(content, "$.mainnet.bool.is_live"), "File should be updated now");
+
+ // Disable writing to file.
+ config.writeUpdatesBackToFile(false);
+
+ // Update the value again and verify the file is NOT changed.
+ config.set(1, "is_live", true);
+ content = vm.readFile(testConfig);
+ assertFalse(vm.parseTomlBool(content, "$.mainnet.bool.is_live"), "File should not be updated again");
+
+ // Clean up the temporary file.
+ vm.removeFile(testConfig);
+ }
+
+ function testRevert_WriteToFileInForbiddenCtxt() public {
+ // Cannot initialize enabling writing to file unless we are in SCRIPT mode.
+ vm.expectRevert(StdConfig.WriteToFileInForbiddenCtxt.selector);
+ _loadConfig("./test/fixtures/config.toml", true);
+
+ // Initialize with `writeToFile = false`.
+ _loadConfig("./test/fixtures/config.toml", false);
+
+ // Cannot enable writing to file unless we are in SCRIPT mode.
+ vm.expectRevert(StdConfig.WriteToFileInForbiddenCtxt.selector);
+ config.writeUpdatesBackToFile(true);
+ }
+
+ function testRevert_InvalidChainKey() public {
+ // Create a fixture with an invalid chain key
+ string memory invalidChainConfig = "./test/fixtures/config_invalid_chain.toml";
+ vm.writeFile(
+ invalidChainConfig,
+ string.concat(
+ "[mainnet]\n",
+ "endpoint_url = \"https://reth-ethereum.ithaca.xyz/rpc\"\n",
+ "\n",
+ "[mainnet.uint]\n",
+ "valid_number = 123\n",
+ "\n",
+ "# Invalid chain key (not a number and not a valid alias)\n",
+ "[invalid_chain]\n",
+ "endpoint_url = \"https://invalid.com\"\n",
+ "\n",
+ "[invalid_chain_9999.uint]\n",
+ "some_value = 456\n"
+ )
+ );
+
+ vm.expectRevert(abi.encodeWithSelector(StdConfig.InvalidChainKey.selector, "invalid_chain"));
+ new StdConfig(invalidChainConfig, false);
+ vm.removeFile(invalidChainConfig);
+ }
+
+ function testRevert_ChainNotInitialized() public {
+ _loadConfig("./test/fixtures/config.toml", false);
+
+ // Enable writing to file bypassing the context check.
+ vm.store(address(config), bytes32(uint256(5)), bytes32(uint256(1)));
+
+ // Try to write a value for a non-existent chain ID
+ vm.expectRevert(abi.encodeWithSelector(StdConfig.ChainNotInitialized.selector, uint256(999999)));
+ config.set(999999, "some_key", uint256(123));
+ }
+
+ function testRevert_UnableToParseVariable() public {
+ // Create a temporary fixture with an unparsable variable
+ string memory badParseConfig = "./test/fixtures/config_bad_parse.toml";
+ vm.writeFile(
+ badParseConfig,
+ string.concat(
+ "[mainnet]\n",
+ "endpoint_url = \"https://reth-ethereum.ithaca.xyz/rpc\"\n",
+ "\n",
+ "[mainnet.uint]\n",
+ "bad_value = \"not_a_number\"\n"
+ )
+ );
+
+ vm.expectRevert(abi.encodeWithSelector(StdConfig.UnableToParseVariable.selector, "bad_value"));
+ new StdConfig(badParseConfig, false);
+ vm.removeFile(badParseConfig);
+ }
+}
diff --git a/contracts/lib/forge-std/test/LibVariable.t.sol b/contracts/lib/forge-std/test/LibVariable.t.sol
new file mode 100644
index 0000000..2fc00a9
--- /dev/null
+++ b/contracts/lib/forge-std/test/LibVariable.t.sol
@@ -0,0 +1,434 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.13;
+
+import {Test} from "../src/Test.sol";
+import {Variable, Type, TypeKind, LibVariable} from "../src/LibVariable.sol";
+
+contract LibVariableTest is Test {
+ using LibVariable for Type;
+ using LibVariable for TypeKind;
+
+ LibVariableHelper internal helper;
+
+ bytes internal expectedErr;
+ Variable internal uninitVar;
+ Variable internal boolVar;
+ Variable internal addressVar;
+ Variable internal bytes32Var;
+ Variable internal uintVar;
+ Variable internal intVar;
+ Variable internal stringVar;
+ Variable internal bytesVar;
+ Variable internal boolArrayVar;
+ Variable internal addressArrayVar;
+ Variable internal bytes32ArrayVar;
+ Variable internal uintArrayVar;
+ Variable internal intArrayVar;
+ Variable internal stringArrayVar;
+ Variable internal bytesArrayVar;
+
+ function setUp() public {
+ helper = new LibVariableHelper();
+
+ // UNINITIALIZED
+ uninitVar = Variable(Type(TypeKind.None, false), "");
+
+ // SINGLE VALUES
+ boolVar = Variable(Type(TypeKind.Bool, false), abi.encode(true));
+ addressVar = Variable(Type(TypeKind.Address, false), abi.encode(address(0xdeadbeef)));
+ bytes32Var = Variable(Type(TypeKind.Bytes32, false), abi.encode(bytes32(uint256(42))));
+ uintVar = Variable(Type(TypeKind.Uint256, false), abi.encode(uint256(123)));
+ intVar = Variable(Type(TypeKind.Int256, false), abi.encode(int256(-123)));
+ stringVar = Variable(Type(TypeKind.String, false), abi.encode("hello world"));
+ bytesVar = Variable(Type(TypeKind.Bytes, false), abi.encode(hex"c0ffee"));
+
+ // ARRAY VALUES
+ bool[] memory bools = new bool[](2);
+ bools[0] = true;
+ bools[1] = false;
+ boolArrayVar = Variable(Type(TypeKind.Bool, true), abi.encode(bools));
+
+ address[] memory addrs = new address[](2);
+ addrs[0] = address(0x1);
+ addrs[1] = address(0x2);
+ addressArrayVar = Variable(Type(TypeKind.Address, true), abi.encode(addrs));
+
+ bytes32[] memory b32s = new bytes32[](2);
+ b32s[0] = bytes32(uint256(1));
+ b32s[1] = bytes32(uint256(2));
+ bytes32ArrayVar = Variable(Type(TypeKind.Bytes32, true), abi.encode(b32s));
+
+ uint256[] memory uints = new uint256[](2);
+ uints[0] = 1;
+ uints[1] = 2;
+ uintArrayVar = Variable(Type(TypeKind.Uint256, true), abi.encode(uints));
+
+ int256[] memory ints = new int256[](2);
+ ints[0] = -1;
+ ints[1] = 2;
+ intArrayVar = Variable(Type(TypeKind.Int256, true), abi.encode(ints));
+
+ string[] memory strings = new string[](2);
+ strings[0] = "one";
+ strings[1] = "two";
+ stringArrayVar = Variable(Type(TypeKind.String, true), abi.encode(strings));
+
+ bytes[] memory b = new bytes[](2);
+ b[0] = hex"01";
+ b[1] = hex"02";
+ bytesArrayVar = Variable(Type(TypeKind.Bytes, true), abi.encode(b));
+ }
+
+ // -- SUCCESS CASES --------------------------------------------------------
+
+ function test_TypeHelpers() public view {
+ // TypeKind.toString()
+ assertEq(TypeKind.None.toString(), "none");
+ assertEq(TypeKind.Bool.toString(), "bool");
+ assertEq(TypeKind.Address.toString(), "address");
+ assertEq(TypeKind.Bytes32.toString(), "bytes32");
+ assertEq(TypeKind.Uint256.toString(), "uint256");
+ assertEq(TypeKind.Int256.toString(), "int256");
+ assertEq(TypeKind.String.toString(), "string");
+ assertEq(TypeKind.Bytes.toString(), "bytes");
+
+ // TypeKind.toTomlKey()
+ assertEq(TypeKind.Uint256.toTomlKey(), "uint");
+ assertEq(TypeKind.Int256.toTomlKey(), "int");
+ assertEq(TypeKind.Bytes32.toTomlKey(), "bytes32");
+
+ // Type.toString()
+ assertEq(boolVar.ty.toString(), "bool");
+ assertEq(boolArrayVar.ty.toString(), "bool[]");
+ assertEq(uintVar.ty.toString(), "uint256");
+ assertEq(uintArrayVar.ty.toString(), "uint256[]");
+ assertEq(uninitVar.ty.toString(), "none");
+
+ // Type.isEqual()
+ assertTrue(boolVar.ty.isEqual(Type(TypeKind.Bool, false)));
+ assertFalse(boolVar.ty.isEqual(Type(TypeKind.Bool, true)));
+ assertFalse(boolVar.ty.isEqual(Type(TypeKind.Address, false)));
+
+ // Type.assertEq()
+ boolVar.ty.assertEq(Type(TypeKind.Bool, false));
+ uintArrayVar.ty.assertEq(Type(TypeKind.Uint256, true));
+ }
+
+ function test_Coercion() public view {
+ // Single values
+ assertTrue(helper.toBool(boolVar));
+ assertEq(helper.toAddress(addressVar), address(0xdeadbeef));
+ assertEq(helper.toBytes32(bytes32Var), bytes32(uint256(42)));
+ assertEq(helper.toUint256(uintVar), 123);
+ assertEq(helper.toInt256(intVar), -123);
+ assertEq(helper.toString(stringVar), "hello world");
+ assertEq(helper.toBytes(bytesVar), hex"c0ffee");
+
+ // Bool array
+ bool[] memory bools = helper.toBoolArray(boolArrayVar);
+ assertEq(bools.length, 2);
+ assertTrue(bools[0]);
+ assertFalse(bools[1]);
+
+ // Address array
+ address[] memory addrs = helper.toAddressArray(addressArrayVar);
+ assertEq(addrs.length, 2);
+ assertEq(addrs[0], address(0x1));
+ assertEq(addrs[1], address(0x2));
+
+ // String array
+ string[] memory strings = helper.toStringArray(stringArrayVar);
+ assertEq(strings.length, 2);
+ assertEq(strings[0], "one");
+ assertEq(strings[1], "two");
+ }
+
+ function test_Downcasting() public view {
+ // Uint downcasting
+ Variable memory v_uint_small = Variable(Type(TypeKind.Uint256, false), abi.encode(uint256(100)));
+ assertEq(helper.toUint128(v_uint_small), 100);
+ assertEq(helper.toUint64(v_uint_small), 100);
+ assertEq(helper.toUint32(v_uint_small), 100);
+ assertEq(helper.toUint16(v_uint_small), 100);
+ assertEq(helper.toUint8(v_uint_small), 100);
+
+ // Uint array downcasting
+ uint256[] memory small_uints = new uint256[](2);
+ small_uints[0] = 10;
+ small_uints[1] = 20;
+ Variable memory v_uint_array_small = Variable(Type(TypeKind.Uint256, true), abi.encode(small_uints));
+ uint8[] memory u8_array = helper.toUint8Array(v_uint_array_small);
+ assertEq(u8_array[0], 10);
+ assertEq(u8_array[1], 20);
+
+ // Int downcasting
+ Variable memory v_int_small_pos = Variable(Type(TypeKind.Int256, false), abi.encode(int256(100)));
+ Variable memory v_int_small_neg = Variable(Type(TypeKind.Int256, false), abi.encode(int256(-100)));
+ assertEq(helper.toInt128(v_int_small_pos), 100);
+ assertEq(helper.toInt64(v_int_small_neg), -100);
+ assertEq(helper.toInt32(v_int_small_pos), 100);
+ assertEq(helper.toInt16(v_int_small_neg), -100);
+ assertEq(helper.toInt8(v_int_small_pos), 100);
+
+ // Int array downcasting
+ int256[] memory small_ints = new int256[](2);
+ small_ints[0] = -10;
+ small_ints[1] = 20;
+ Variable memory intArraySmall = Variable(Type(TypeKind.Int256, true), abi.encode(small_ints));
+ int8[] memory i8_array = helper.toInt8Array(intArraySmall);
+ assertEq(i8_array[0], -10);
+ assertEq(i8_array[1], 20);
+ }
+
+ // -- REVERT CASES ---------------------------------------------------------
+
+ function testRevert_NotInitialized() public {
+ vm.expectRevert(LibVariable.NotInitialized.selector);
+ helper.toBool(uninitVar);
+
+ vm.expectRevert(LibVariable.NotInitialized.selector);
+ helper.toAddressArray(uninitVar);
+ }
+
+ function testRevert_assertExists() public {
+ vm.expectRevert(LibVariable.NotInitialized.selector);
+ helper.assertExists(uninitVar);
+ }
+
+ function testRevert_TypeMismatch() public {
+ // Single values
+ vm.expectRevert(abi.encodeWithSelector(LibVariable.TypeMismatch.selector, "uint256", "bool"));
+ helper.toUint256(boolVar);
+
+ vm.expectRevert(abi.encodeWithSelector(LibVariable.TypeMismatch.selector, "address", "string"));
+ helper.toAddress(stringVar);
+
+ // Arrays
+ vm.expectRevert(abi.encodeWithSelector(LibVariable.TypeMismatch.selector, "uint256[]", "bool[]"));
+ helper.toUint256Array(boolArrayVar);
+
+ vm.expectRevert(abi.encodeWithSelector(LibVariable.TypeMismatch.selector, "address[]", "string[]"));
+ helper.toAddressArray(stringArrayVar);
+
+ // Single value to array
+ vm.expectRevert(abi.encodeWithSelector(LibVariable.TypeMismatch.selector, "bool[]", "bool"));
+ helper.toBoolArray(boolVar);
+
+ // Array to single value
+ vm.expectRevert(abi.encodeWithSelector(LibVariable.TypeMismatch.selector, "bool", "bool[]"));
+ helper.toBool(boolArrayVar);
+
+ // assertEq reverts
+ vm.expectRevert(abi.encodeWithSelector(LibVariable.TypeMismatch.selector, "uint256", "bool"));
+ helper.assertEq(boolVar.ty, Type(TypeKind.Uint256, false));
+ }
+
+ function testRevert_UnsafeCast() public {
+ // uint overflow
+ Variable memory uintLarge = Variable(Type(TypeKind.Uint256, false), abi.encode(uint256(type(uint128).max) + 1));
+ expectedErr = abi.encodeWithSelector(LibVariable.UnsafeCast.selector, "value does not fit in 'uint128'");
+ vm.expectRevert(expectedErr);
+ helper.toUint128(uintLarge);
+
+ // int overflow
+ Variable memory intLarge = Variable(Type(TypeKind.Int256, false), abi.encode(int256(type(int128).max) + 1));
+ expectedErr = abi.encodeWithSelector(LibVariable.UnsafeCast.selector, "value does not fit in 'int128'");
+
+ vm.expectRevert(expectedErr);
+ helper.toInt128(intLarge);
+
+ // int underflow
+ Variable memory intSmall = Variable(Type(TypeKind.Int256, false), abi.encode(int256(type(int128).min) - 1));
+ expectedErr = abi.encodeWithSelector(LibVariable.UnsafeCast.selector, "value does not fit in 'int128'");
+
+ vm.expectRevert(expectedErr);
+ helper.toInt128(intSmall);
+
+ // uint array overflow
+ uint256[] memory uintArray = new uint256[](2);
+ uintArray[0] = 10;
+ uintArray[1] = uint256(type(uint64).max) + 1;
+ Variable memory uintArrayLarge = Variable(Type(TypeKind.Uint256, true), abi.encode(uintArray));
+ expectedErr = abi.encodeWithSelector(LibVariable.UnsafeCast.selector, "value in array does not fit in 'uint64'");
+
+ vm.expectRevert(expectedErr);
+ helper.toUint64Array(uintArrayLarge);
+
+ // int array overflow
+ int256[] memory intArray = new int256[](2);
+ intArray[0] = 10;
+ intArray[1] = int256(type(int64).max) + 1;
+ Variable memory intArrayLarge = Variable(Type(TypeKind.Int256, true), abi.encode(intArray));
+ expectedErr = abi.encodeWithSelector(LibVariable.UnsafeCast.selector, "value in array does not fit in 'int64'");
+
+ vm.expectRevert(expectedErr);
+ helper.toInt64Array(intArrayLarge);
+
+ // int array underflow
+ intArray[0] = 10;
+ intArray[1] = int256(type(int64).min) - 1;
+ Variable memory intArraySmall = Variable(Type(TypeKind.Int256, true), abi.encode(intArray));
+ expectedErr = abi.encodeWithSelector(LibVariable.UnsafeCast.selector, "value in array does not fit in 'int64'");
+
+ vm.expectRevert(expectedErr);
+ helper.toInt64Array(intArraySmall);
+ }
+}
+
+/// @dev We must use an external helper contract to ensure proper call depth for `vm.expectRevert`,
+/// as direct library calls are inlined by the compiler, causing call depth issues.
+contract LibVariableHelper {
+ using LibVariable for Type;
+ using LibVariable for TypeKind;
+
+ // Assertions
+ function assertExists(Variable memory v) external pure {
+ v.assertExists();
+ }
+
+ function assertEq(Type memory t1, Type memory t2) external pure {
+ t1.assertEq(t2);
+ }
+
+ // Single Value Coercion
+ function toBool(Variable memory v) external pure returns (bool) {
+ return v.toBool();
+ }
+
+ function toAddress(Variable memory v) external pure returns (address) {
+ return v.toAddress();
+ }
+
+ function toBytes32(Variable memory v) external pure returns (bytes32) {
+ return v.toBytes32();
+ }
+
+ function toUint256(Variable memory v) external pure returns (uint256) {
+ return v.toUint256();
+ }
+
+ function toInt256(Variable memory v) external pure returns (int256) {
+ return v.toInt256();
+ }
+
+ function toString(Variable memory v) external pure returns (string memory) {
+ return v.toString();
+ }
+
+ function toBytes(Variable memory v) external pure returns (bytes memory) {
+ return v.toBytes();
+ }
+
+ // Array Coercion
+ function toBoolArray(Variable memory v) external pure returns (bool[] memory) {
+ return v.toBoolArray();
+ }
+
+ function toAddressArray(Variable memory v) external pure returns (address[] memory) {
+ return v.toAddressArray();
+ }
+
+ function toBytes32Array(Variable memory v) external pure returns (bytes32[] memory) {
+ return v.toBytes32Array();
+ }
+
+ function toUint256Array(Variable memory v) external pure returns (uint256[] memory) {
+ return v.toUint256Array();
+ }
+
+ function toInt256Array(Variable memory v) external pure returns (int256[] memory) {
+ return v.toInt256Array();
+ }
+
+ function toStringArray(Variable memory v) external pure returns (string[] memory) {
+ return v.toStringArray();
+ }
+
+ function toBytesArray(Variable memory v) external pure returns (bytes[] memory) {
+ return v.toBytesArray();
+ }
+
+ // Uint Downcasting
+ function toUint128(Variable memory v) external pure returns (uint128) {
+ return v.toUint128();
+ }
+
+ function toUint64(Variable memory v) external pure returns (uint64) {
+ return v.toUint64();
+ }
+
+ function toUint32(Variable memory v) external pure returns (uint32) {
+ return v.toUint32();
+ }
+
+ function toUint16(Variable memory v) external pure returns (uint16) {
+ return v.toUint16();
+ }
+
+ function toUint8(Variable memory v) external pure returns (uint8) {
+ return v.toUint8();
+ }
+
+ // Int Downcasting
+ function toInt128(Variable memory v) external pure returns (int128) {
+ return v.toInt128();
+ }
+
+ function toInt64(Variable memory v) external pure returns (int64) {
+ return v.toInt64();
+ }
+
+ function toInt32(Variable memory v) external pure returns (int32) {
+ return v.toInt32();
+ }
+
+ function toInt16(Variable memory v) external pure returns (int16) {
+ return v.toInt16();
+ }
+
+ function toInt8(Variable memory v) external pure returns (int8) {
+ return v.toInt8();
+ }
+
+ // Uint Array Downcasting
+ function toUint128Array(Variable memory v) external pure returns (uint128[] memory) {
+ return v.toUint128Array();
+ }
+
+ function toUint64Array(Variable memory v) external pure returns (uint64[] memory) {
+ return v.toUint64Array();
+ }
+
+ function toUint32Array(Variable memory v) external pure returns (uint32[] memory) {
+ return v.toUint32Array();
+ }
+
+ function toUint16Array(Variable memory v) external pure returns (uint16[] memory) {
+ return v.toUint16Array();
+ }
+
+ function toUint8Array(Variable memory v) external pure returns (uint8[] memory) {
+ return v.toUint8Array();
+ }
+
+ // Int Array Downcasting
+ function toInt128Array(Variable memory v) external pure returns (int128[] memory) {
+ return v.toInt128Array();
+ }
+
+ function toInt64Array(Variable memory v) external pure returns (int64[] memory) {
+ return v.toInt64Array();
+ }
+
+ function toInt32Array(Variable memory v) external pure returns (int32[] memory) {
+ return v.toInt32Array();
+ }
+
+ function toInt16Array(Variable memory v) external pure returns (int16[] memory) {
+ return v.toInt16Array();
+ }
+
+ function toInt8Array(Variable memory v) external pure returns (int8[] memory) {
+ return v.toInt8Array();
+ }
+}
diff --git a/contracts/lib/forge-std/test/StdAssertions.t.sol b/contracts/lib/forge-std/test/StdAssertions.t.sol
new file mode 100644
index 0000000..acc0c1e
--- /dev/null
+++ b/contracts/lib/forge-std/test/StdAssertions.t.sol
@@ -0,0 +1,141 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.7.0 <0.9.0;
+
+import {StdAssertions} from "../src/StdAssertions.sol";
+import {Vm} from "../src/Vm.sol";
+
+interface VmInternal is Vm {
+ function _expectCheatcodeRevert(bytes memory message) external;
+}
+
+contract StdAssertionsTest is StdAssertions {
+ string constant errorMessage = "User provided message";
+ uint256 constant maxDecimals = 77;
+
+ bool constant SHOULD_REVERT = true;
+ bool constant SHOULD_RETURN = false;
+
+ bool constant STRICT_REVERT_DATA = true;
+ bool constant NON_STRICT_REVERT_DATA = false;
+
+ VmInternal constant vm = VmInternal(address(uint160(uint256(keccak256("hevm cheat code")))));
+
+ function testFuzz_AssertEqCall_Return_Pass(
+ bytes memory callDataA,
+ bytes memory callDataB,
+ bytes memory returnData,
+ bool strictRevertData
+ ) external {
+ address targetA = address(new TestMockCall(returnData, SHOULD_RETURN));
+ address targetB = address(new TestMockCall(returnData, SHOULD_RETURN));
+
+ assertEqCall(targetA, callDataA, targetB, callDataB, strictRevertData);
+ }
+
+ function testFuzz_RevertWhenCalled_AssertEqCall_Return_Fail(
+ bytes memory callDataA,
+ bytes memory callDataB,
+ bytes memory returnDataA,
+ bytes memory returnDataB,
+ bool strictRevertData
+ ) external {
+ vm.assume(keccak256(returnDataA) != keccak256(returnDataB));
+
+ address targetA = address(new TestMockCall(returnDataA, SHOULD_RETURN));
+ address targetB = address(new TestMockCall(returnDataB, SHOULD_RETURN));
+
+ vm._expectCheatcodeRevert(
+ bytes(
+ string.concat(
+ "Call return data does not match: ", vm.toString(returnDataA), " != ", vm.toString(returnDataB)
+ )
+ )
+ );
+ assertEqCall(targetA, callDataA, targetB, callDataB, strictRevertData);
+ }
+
+ function testFuzz_AssertEqCall_Revert_Pass(
+ bytes memory callDataA,
+ bytes memory callDataB,
+ bytes memory revertDataA,
+ bytes memory revertDataB
+ ) external {
+ address targetA = address(new TestMockCall(revertDataA, SHOULD_REVERT));
+ address targetB = address(new TestMockCall(revertDataB, SHOULD_REVERT));
+
+ assertEqCall(targetA, callDataA, targetB, callDataB, NON_STRICT_REVERT_DATA);
+ }
+
+ function testFuzz_RevertWhenCalled_AssertEqCall_Revert_Fail(
+ bytes memory callDataA,
+ bytes memory callDataB,
+ bytes memory revertDataA,
+ bytes memory revertDataB
+ ) external {
+ vm.assume(keccak256(revertDataA) != keccak256(revertDataB));
+
+ address targetA = address(new TestMockCall(revertDataA, SHOULD_REVERT));
+ address targetB = address(new TestMockCall(revertDataB, SHOULD_REVERT));
+
+ vm._expectCheatcodeRevert(
+ bytes(
+ string.concat(
+ "Call revert data does not match: ", vm.toString(revertDataA), " != ", vm.toString(revertDataB)
+ )
+ )
+ );
+ assertEqCall(targetA, callDataA, targetB, callDataB, STRICT_REVERT_DATA);
+ }
+
+ function testFuzz_RevertWhenCalled_AssertEqCall_Fail(
+ bytes memory callDataA,
+ bytes memory callDataB,
+ bytes memory returnDataA,
+ bytes memory returnDataB,
+ bool strictRevertData
+ ) external {
+ address targetA = address(new TestMockCall(returnDataA, SHOULD_RETURN));
+ address targetB = address(new TestMockCall(returnDataB, SHOULD_REVERT));
+
+ vm.expectRevert(bytes("assertion failed"));
+ this.assertEqCallExternal(targetA, callDataA, targetB, callDataB, strictRevertData);
+
+ vm.expectRevert(bytes("assertion failed"));
+ this.assertEqCallExternal(targetB, callDataB, targetA, callDataA, strictRevertData);
+ }
+
+ // Helper function to test outcome of assertEqCall via `expect` cheatcodes
+ function assertEqCallExternal(
+ address targetA,
+ bytes memory callDataA,
+ address targetB,
+ bytes memory callDataB,
+ bool strictRevertData
+ ) public {
+ assertEqCall(targetA, callDataA, targetB, callDataB, strictRevertData);
+ }
+}
+
+contract TestMockCall {
+ bytes returnData;
+ bool shouldRevert;
+
+ constructor(bytes memory returnData_, bool shouldRevert_) {
+ returnData = returnData_;
+ shouldRevert = shouldRevert_;
+ }
+
+ fallback() external payable {
+ bytes memory returnData_ = returnData;
+
+ if (shouldRevert) {
+ assembly {
+ revert(add(returnData_, 0x20), mload(returnData_))
+ }
+ } else {
+ assembly {
+ return(add(returnData_, 0x20), mload(returnData_))
+ }
+ }
+ }
+}
diff --git a/contracts/lib/forge-std/test/StdChains.t.sol b/contracts/lib/forge-std/test/StdChains.t.sol
new file mode 100644
index 0000000..6d9f8be
--- /dev/null
+++ b/contracts/lib/forge-std/test/StdChains.t.sol
@@ -0,0 +1,227 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.7.0 <0.9.0;
+
+import {Test} from "../src/Test.sol";
+
+contract StdChainsMock is Test {
+ function exposedGetChain(string memory chainAlias) public returns (Chain memory) {
+ return getChain(chainAlias);
+ }
+
+ function exposedGetChain(uint256 chainId) public returns (Chain memory) {
+ return getChain(chainId);
+ }
+
+ function exposedSetChain(string memory chainAlias, ChainData memory chainData) public {
+ setChain(chainAlias, chainData);
+ }
+
+ function exposedSetFallbackToDefaultRpcUrls(bool useDefault) public {
+ setFallbackToDefaultRpcUrls(useDefault);
+ }
+}
+
+contract StdChainsTest is Test {
+ function test_ChainRpcInitialization() public {
+ // RPCs specified in `foundry.toml` should be updated.
+ assertEq(getChain(1).rpcUrl, "https://reth-ethereum.ithaca.xyz/rpc");
+ assertEq(getChain("optimism_sepolia").rpcUrl, "https://sepolia.optimism.io/");
+ assertEq(getChain("arbitrum_one_sepolia").rpcUrl, "https://sepolia-rollup.arbitrum.io/rpc/");
+
+ // Environment variables should be the next fallback
+ assertEq(getChain("arbitrum_nova").rpcUrl, "https://nova.arbitrum.io/rpc");
+ vm.setEnv("ARBITRUM_NOVA_RPC_URL", "myoverride");
+ assertEq(getChain("arbitrum_nova").rpcUrl, "myoverride");
+ vm.setEnv("ARBITRUM_NOVA_RPC_URL", "https://nova.arbitrum.io/rpc");
+
+ // Cannot override RPCs defined in `foundry.toml`
+ vm.setEnv("MAINNET_RPC_URL", "myoverride2");
+ assertEq(getChain("mainnet").rpcUrl, "https://reth-ethereum.ithaca.xyz/rpc");
+
+ // Other RPCs should remain unchanged.
+ assertEq(getChain(31337).rpcUrl, "http://127.0.0.1:8545");
+ assertEq(getChain("sepolia").rpcUrl, "https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001");
+ }
+
+ // Named with a leading underscore to clarify this is not intended to be run as a normal test,
+ // and is intended to be used in the below `test_Rpcs` test.
+ function _testRpc(string memory rpcAlias) internal {
+ string memory rpcUrl = getChain(rpcAlias).rpcUrl;
+ vm.createSelectFork(rpcUrl);
+ }
+
+ // Ensure we can connect to the default RPC URL for each chain.
+ // Currently commented out since this is slow and public RPCs are flaky, often resulting in failing CI.
+ // function test_Rpcs() public {
+ // _testRpc("mainnet");
+ // _testRpc("sepolia");
+ // _testRpc("holesky");
+ // _testRpc("optimism");
+ // _testRpc("optimism_sepolia");
+ // _testRpc("arbitrum_one");
+ // _testRpc("arbitrum_one_sepolia");
+ // _testRpc("arbitrum_nova");
+ // _testRpc("polygon");
+ // _testRpc("polygon_amoy");
+ // _testRpc("avalanche");
+ // _testRpc("avalanche_fuji");
+ // _testRpc("bnb_smart_chain");
+ // _testRpc("bnb_smart_chain_testnet");
+ // _testRpc("gnosis_chain");
+ // _testRpc("moonbeam");
+ // _testRpc("moonriver");
+ // _testRpc("moonbase");
+ // _testRpc("base_sepolia");
+ // _testRpc("base");
+ // _testRpc("blast_sepolia");
+ // _testRpc("blast");
+ // _testRpc("fantom_opera");
+ // _testRpc("fantom_opera_testnet");
+ // _testRpc("fraxtal");
+ // _testRpc("fraxtal_testnet");
+ // _testRpc("berachain_bartio_testnet");
+ // _testRpc("flare");
+ // _testRpc("flare_coston2");
+ // }
+
+ function test_RevertIf_ChainNotFound() public {
+ // We deploy a mock to properly test the revert.
+ StdChainsMock stdChainsMock = new StdChainsMock();
+
+ vm.expectRevert("StdChains getChain(string): Chain with alias \"does_not_exist\" not found.");
+ stdChainsMock.exposedGetChain("does_not_exist");
+ }
+
+ function test_RevertIf_SetChain_ChainIdExist_FirstTest() public {
+ // We deploy a mock to properly test the revert.
+ StdChainsMock stdChainsMock = new StdChainsMock();
+
+ vm.expectRevert("StdChains setChain(string,ChainData): Chain ID 31337 already used by \"anvil\".");
+ stdChainsMock.exposedSetChain("anvil2", ChainData("Anvil", 31337, "URL"));
+ }
+
+ function test_RevertIf_ChainBubbleUp() public {
+ // We deploy a mock to properly test the revert.
+ StdChainsMock stdChainsMock = new StdChainsMock();
+
+ stdChainsMock.exposedSetChain("needs_undefined_env_var", ChainData("", 123456789, ""));
+ // Forge environment variable error.
+ vm.expectRevert();
+ stdChainsMock.exposedGetChain("needs_undefined_env_var");
+ }
+
+ function test_RevertIf_SetChain_ChainIdExists_SecondTest() public {
+ // We deploy a mock to properly test the revert.
+ StdChainsMock stdChainsMock = new StdChainsMock();
+
+ stdChainsMock.exposedSetChain("custom_chain", ChainData("Custom Chain", 123456789, "https://custom.chain/"));
+
+ vm.expectRevert('StdChains setChain(string,ChainData): Chain ID 123456789 already used by "custom_chain".');
+
+ stdChainsMock.exposedSetChain("another_custom_chain", ChainData("", 123456789, ""));
+ }
+
+ function test_SetChain() public {
+ setChain("custom_chain", ChainData("Custom Chain", 123456789, "https://custom.chain/"));
+ Chain memory customChain = getChain("custom_chain");
+ assertEq(customChain.name, "Custom Chain");
+ assertEq(customChain.chainId, 123456789);
+ assertEq(customChain.chainAlias, "custom_chain");
+ assertEq(customChain.rpcUrl, "https://custom.chain/");
+ Chain memory chainById = getChain(123456789);
+ assertEq(chainById.name, customChain.name);
+ assertEq(chainById.chainId, customChain.chainId);
+ assertEq(chainById.chainAlias, customChain.chainAlias);
+ assertEq(chainById.rpcUrl, customChain.rpcUrl);
+ customChain.name = "Another Custom Chain";
+ customChain.chainId = 987654321;
+ setChain("another_custom_chain", customChain);
+ Chain memory anotherCustomChain = getChain("another_custom_chain");
+ assertEq(anotherCustomChain.name, "Another Custom Chain");
+ assertEq(anotherCustomChain.chainId, 987654321);
+ assertEq(anotherCustomChain.chainAlias, "another_custom_chain");
+ assertEq(anotherCustomChain.rpcUrl, "https://custom.chain/");
+ // Verify the first chain data was not overwritten
+ chainById = getChain(123456789);
+ assertEq(chainById.name, "Custom Chain");
+ assertEq(chainById.chainId, 123456789);
+ }
+
+ function test_RevertIf_SetEmptyAlias() public {
+ // We deploy a mock to properly test the revert.
+ StdChainsMock stdChainsMock = new StdChainsMock();
+
+ vm.expectRevert("StdChains setChain(string,ChainData): Chain alias cannot be the empty string.");
+ stdChainsMock.exposedSetChain("", ChainData("", 123456789, ""));
+ }
+
+ function test_RevertIf_SetNoChainId0() public {
+ // We deploy a mock to properly test the revert.
+ StdChainsMock stdChainsMock = new StdChainsMock();
+
+ vm.expectRevert("StdChains setChain(string,ChainData): Chain ID cannot be 0.");
+ stdChainsMock.exposedSetChain("alias", ChainData("", 0, ""));
+ }
+
+ function test_RevertIf_GetNoChainId0() public {
+ // We deploy a mock to properly test the revert.
+ StdChainsMock stdChainsMock = new StdChainsMock();
+
+ vm.expectRevert("StdChains getChain(uint256): Chain ID cannot be 0.");
+ stdChainsMock.exposedGetChain(0);
+ }
+
+ function test_RevertIf_GetNoEmptyAlias() public {
+ // We deploy a mock to properly test the revert.
+ StdChainsMock stdChainsMock = new StdChainsMock();
+
+ vm.expectRevert("StdChains getChain(string): Chain alias cannot be the empty string.");
+ stdChainsMock.exposedGetChain("");
+ }
+
+ function test_RevertIf_ChainNotInitialized() public {
+ // We deploy a mock to properly test the revert.
+ StdChainsMock stdChainsMock = new StdChainsMock();
+
+ vm.expectRevert("StdChains getChain(string): Chain with alias \"no_such_alias\" not found.");
+ stdChainsMock.exposedGetChain("no_such_alias");
+ }
+
+ function test_RevertIf_ChainAliasNotFound() public {
+ // We deploy a mock to properly test the revert.
+ StdChainsMock stdChainsMock = new StdChainsMock();
+
+ vm.expectRevert("StdChains getChain(uint256): Chain with ID 321 not found.");
+
+ stdChainsMock.exposedGetChain(321);
+ }
+
+ function test_SetChain_ExistingOne() public {
+ // We deploy a mock to properly test the revert.
+ StdChainsMock stdChainsMock = new StdChainsMock();
+
+ setChain("custom_chain", ChainData("Custom Chain", 123456789, "https://custom.chain/"));
+ assertEq(getChain(123456789).chainId, 123456789);
+
+ setChain("custom_chain", ChainData("Modified Chain", 9999999999999999999, "https://modified.chain/"));
+ vm.expectRevert("StdChains getChain(uint256): Chain with ID 123456789 not found.");
+ stdChainsMock.exposedGetChain(123456789);
+
+ Chain memory modifiedChain = getChain(9999999999999999999);
+ assertEq(modifiedChain.name, "Modified Chain");
+ assertEq(modifiedChain.chainId, 9999999999999999999);
+ assertEq(modifiedChain.rpcUrl, "https://modified.chain/");
+ }
+
+ function test_RevertIf_DontUseDefaultRpcUrl() public {
+ // We deploy a mock to properly test the revert.
+ StdChainsMock stdChainsMock = new StdChainsMock();
+
+ // Should error if default RPCs flag is set to false.
+ stdChainsMock.exposedSetFallbackToDefaultRpcUrls(false);
+ vm.expectRevert();
+ stdChainsMock.exposedGetChain(31337);
+ vm.expectRevert();
+ stdChainsMock.exposedGetChain("sepolia");
+ }
+}
diff --git a/contracts/lib/forge-std/test/StdCheats.t.sol b/contracts/lib/forge-std/test/StdCheats.t.sol
new file mode 100644
index 0000000..b1d9aa1
--- /dev/null
+++ b/contracts/lib/forge-std/test/StdCheats.t.sol
@@ -0,0 +1,639 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.7.0 <0.9.0;
+
+import {StdCheats} from "../src/StdCheats.sol";
+import {Test} from "../src/Test.sol";
+import {stdJson} from "../src/StdJson.sol";
+import {stdToml} from "../src/StdToml.sol";
+import {IERC20} from "../src/interfaces/IERC20.sol";
+
+contract StdCheatsTest is Test {
+ Bar test;
+
+ using stdJson for string;
+
+ function setUp() public {
+ test = new Bar();
+ }
+
+ function test_Skip() public {
+ vm.warp(100);
+ skip(25);
+ assertEq(block.timestamp, 125);
+ }
+
+ function test_Rewind() public {
+ vm.warp(100);
+ rewind(25);
+ assertEq(block.timestamp, 75);
+ }
+
+ function test_Hoax() public {
+ hoax(address(1337));
+ test.bar{value: 100}(address(1337));
+ }
+
+ function test_HoaxOrigin() public {
+ hoax(address(1337), address(1337));
+ test.origin{value: 100}(address(1337));
+ }
+
+ function test_HoaxDifferentAddresses() public {
+ hoax(address(1337), address(7331));
+ test.origin{value: 100}(address(1337), address(7331));
+ }
+
+ function test_StartHoax() public {
+ startHoax(address(1337));
+ test.bar{value: 100}(address(1337));
+ test.bar{value: 100}(address(1337));
+ vm.stopPrank();
+ test.bar(address(this));
+ }
+
+ function test_StartHoaxOrigin() public {
+ startHoax(address(1337), address(1337));
+ test.origin{value: 100}(address(1337));
+ test.origin{value: 100}(address(1337));
+ vm.stopPrank();
+ test.bar(address(this));
+ }
+
+ function test_ChangePrankMsgSender() public {
+ vm.startPrank(address(1337));
+ test.bar(address(1337));
+ changePrank(address(0xdead));
+ test.bar(address(0xdead));
+ changePrank(address(1337));
+ test.bar(address(1337));
+ vm.stopPrank();
+ }
+
+ function test_ChangePrankMsgSenderAndTxOrigin() public {
+ vm.startPrank(address(1337), address(1338));
+ test.origin(address(1337), address(1338));
+ changePrank(address(0xdead), address(0xbeef));
+ test.origin(address(0xdead), address(0xbeef));
+ changePrank(address(1337), address(1338));
+ test.origin(address(1337), address(1338));
+ vm.stopPrank();
+ }
+
+ function test_MakeAccountEquivalence() public {
+ Account memory account = makeAccount("1337");
+ (address addr, uint256 key) = makeAddrAndKey("1337");
+ assertEq(account.addr, addr);
+ assertEq(account.key, key);
+ }
+
+ function test_MakeAddrEquivalence() public {
+ (address addr,) = makeAddrAndKey("1337");
+ assertEq(makeAddr("1337"), addr);
+ }
+
+ function test_MakeAddrSigning() public {
+ (address addr, uint256 key) = makeAddrAndKey("1337");
+ bytes32 hash = keccak256("some_message");
+
+ (uint8 v, bytes32 r, bytes32 s) = vm.sign(key, hash);
+ assertEq(ecrecover(hash, v, r, s), addr);
+ }
+
+ function test_Deal() public {
+ deal(address(this), 1 ether);
+ assertEq(address(this).balance, 1 ether);
+ }
+
+ function test_DealToken() public {
+ Bar barToken = new Bar();
+ address bar = address(barToken);
+ deal(bar, address(this), 10000e18);
+ assertEq(barToken.balanceOf(address(this)), 10000e18);
+ }
+
+ function test_DealTokenAdjustTotalSupply() public {
+ Bar barToken = new Bar();
+ address bar = address(barToken);
+ deal(bar, address(this), 10000e18, true);
+ assertEq(barToken.balanceOf(address(this)), 10000e18);
+ assertEq(barToken.totalSupply(), 20000e18);
+ deal(bar, address(this), 0, true);
+ assertEq(barToken.balanceOf(address(this)), 0);
+ assertEq(barToken.totalSupply(), 10000e18);
+ }
+
+ function test_DealERC1155Token() public {
+ BarERC1155 barToken = new BarERC1155();
+ address bar = address(barToken);
+ dealERC1155(bar, address(this), 0, 10000e18, false);
+ assertEq(barToken.balanceOf(address(this), 0), 10000e18);
+ }
+
+ function test_DealERC1155TokenAdjustTotalSupply() public {
+ BarERC1155 barToken = new BarERC1155();
+ address bar = address(barToken);
+ dealERC1155(bar, address(this), 0, 10000e18, true);
+ assertEq(barToken.balanceOf(address(this), 0), 10000e18);
+ assertEq(barToken.totalSupply(0), 20000e18);
+ dealERC1155(bar, address(this), 0, 0, true);
+ assertEq(barToken.balanceOf(address(this), 0), 0);
+ assertEq(barToken.totalSupply(0), 10000e18);
+ }
+
+ function test_DealERC721Token() public {
+ BarERC721 barToken = new BarERC721();
+ address bar = address(barToken);
+ dealERC721(bar, address(2), 1);
+ assertEq(barToken.balanceOf(address(2)), 1);
+ assertEq(barToken.balanceOf(address(1)), 0);
+ dealERC721(bar, address(1), 2);
+ assertEq(barToken.balanceOf(address(1)), 1);
+ assertEq(barToken.balanceOf(bar), 1);
+ }
+
+ function test_DeployCode() public {
+ address deployed = deployCode("StdCheats.t.sol:Bar", bytes(""));
+ assertEq(string(getCode(deployed)), string(getCode(address(test))));
+ }
+
+ function test_DestroyAccount() public {
+ // deploy something to destroy it
+ BarERC721 barToken = new BarERC721();
+ address bar = address(barToken);
+ vm.setNonce(bar, 10);
+ deal(bar, 100);
+
+ uint256 prevThisBalance = address(this).balance;
+ uint256 size;
+ assembly {
+ size := extcodesize(bar)
+ }
+
+ assertGt(size, 0);
+ assertEq(bar.balance, 100);
+ assertEq(vm.getNonce(bar), 10);
+
+ destroyAccount(bar, address(this));
+ assembly {
+ size := extcodesize(bar)
+ }
+ assertEq(address(this).balance, prevThisBalance + 100);
+ assertEq(vm.getNonce(bar), 0);
+ assertEq(size, 0);
+ assertEq(bar.balance, 0);
+ }
+
+ function test_DeployCodeNoArgs() public {
+ address deployed = deployCode("StdCheats.t.sol:Bar");
+ assertEq(string(getCode(deployed)), string(getCode(address(test))));
+ }
+
+ function test_DeployCodeVal() public {
+ address deployed = deployCode("StdCheats.t.sol:Bar", bytes(""), 1 ether);
+ assertEq(string(getCode(deployed)), string(getCode(address(test))));
+ assertEq(deployed.balance, 1 ether);
+ }
+
+ function test_DeployCodeValNoArgs() public {
+ address deployed = deployCode("StdCheats.t.sol:Bar", 1 ether);
+ assertEq(string(getCode(deployed)), string(getCode(address(test))));
+ assertEq(deployed.balance, 1 ether);
+ }
+
+ // We need this so we can call "this.deployCode" rather than "deployCode" directly
+ function deployCodeHelper(string memory what) external {
+ deployCode(what);
+ }
+
+ function test_RevertIf_DeployCodeFail() public {
+ vm.expectRevert(bytes("StdCheats deployCode(string): Deployment failed."));
+ this.deployCodeHelper("StdCheats.t.sol:RevertingContract");
+ }
+
+ function getCode(address who) internal view returns (bytes memory o_code) {
+ /// @solidity memory-safe-assembly
+ assembly {
+ // retrieve the size of the code, this needs assembly
+ let size := extcodesize(who)
+ // allocate output byte array - this could also be done without assembly
+ // by using o_code = new bytes(size)
+ o_code := mload(0x40)
+ // new "memory end" including padding
+ mstore(0x40, add(o_code, and(add(add(size, 0x20), 0x1f), not(0x1f))))
+ // store length in memory
+ mstore(o_code, size)
+ // actually retrieve the code, this needs assembly
+ extcodecopy(who, add(o_code, 0x20), 0, size)
+ }
+ }
+
+ function test_DeriveRememberKey() public {
+ string memory mnemonic = "test test test test test test test test test test test junk";
+
+ (address deployer, uint256 privateKey) = deriveRememberKey(mnemonic, 0);
+ assertEq(deployer, 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266);
+ assertEq(privateKey, 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80);
+ }
+
+ function test_BytesToUint() public pure {
+ assertEq(3, bytesToUint_test(hex"03"));
+ assertEq(2, bytesToUint_test(hex"02"));
+ assertEq(255, bytesToUint_test(hex"ff"));
+ assertEq(29625, bytesToUint_test(hex"73b9"));
+ }
+
+ function test_ParseJsonTxDetail() public view {
+ string memory root = vm.projectRoot();
+ string memory path = string.concat(root, "/test/fixtures/broadcast.log.json");
+ string memory json = vm.readFile(path);
+ bytes memory transactionDetails = json.parseRaw(".transactions[0].tx");
+ RawTx1559Detail memory rawTxDetail = abi.decode(transactionDetails, (RawTx1559Detail));
+ Tx1559Detail memory txDetail = rawToConvertedEIP1559Detail(rawTxDetail);
+ assertEq(txDetail.from, 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266);
+ assertEq(txDetail.to, 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512);
+ assertEq(
+ txDetail.data,
+ hex"23e99187000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000013370000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004"
+ );
+ assertEq(txDetail.nonce, 3);
+ assertEq(txDetail.txType, 2);
+ assertEq(txDetail.gas, 29625);
+ assertEq(txDetail.value, 0);
+ }
+
+ function test_ReadEIP1559Transaction() public view {
+ string memory root = vm.projectRoot();
+ string memory path = string.concat(root, "/test/fixtures/broadcast.log.json");
+ uint256 index = 0;
+ Tx1559 memory transaction = readTx1559(path, index);
+ transaction;
+ }
+
+ function test_ReadEIP1559Transactions() public view {
+ string memory root = vm.projectRoot();
+ string memory path = string.concat(root, "/test/fixtures/broadcast.log.json");
+ Tx1559[] memory transactions = readTx1559s(path);
+ transactions;
+ }
+
+ function test_ReadReceipt() public view {
+ string memory root = vm.projectRoot();
+ string memory path = string.concat(root, "/test/fixtures/broadcast.log.json");
+ uint256 index = 5;
+ Receipt memory receipt = readReceipt(path, index);
+ assertEq(
+ receipt.logsBloom,
+ hex"00000000000800000000000000000010000000000000000000000000000180000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100"
+ );
+ }
+
+ function test_ReadReceipts() public view {
+ string memory root = vm.projectRoot();
+ string memory path = string.concat(root, "/test/fixtures/broadcast.log.json");
+ Receipt[] memory receipts = readReceipts(path);
+ receipts;
+ }
+
+ function test_GasMeteringModifier() public {
+ uint256 gas_start_normal = gasleft();
+ addInLoop();
+ uint256 gas_used_normal = gas_start_normal - gasleft();
+
+ uint256 gas_start_single = gasleft();
+ addInLoopNoGas();
+ uint256 gas_used_single = gas_start_single - gasleft();
+
+ uint256 gas_start_double = gasleft();
+ addInLoopNoGasNoGas();
+ uint256 gas_used_double = gas_start_double - gasleft();
+
+ assertTrue(gas_used_double + gas_used_single < gas_used_normal);
+ }
+
+ function addInLoop() internal pure returns (uint256) {
+ uint256 b;
+ for (uint256 i; i < 10000; i++) {
+ b += i;
+ }
+ return b;
+ }
+
+ function addInLoopNoGas() internal noGasMetering returns (uint256) {
+ return addInLoop();
+ }
+
+ function addInLoopNoGasNoGas() internal noGasMetering returns (uint256) {
+ return addInLoopNoGas();
+ }
+
+ function bytesToUint_test(bytes memory b) private pure returns (uint256) {
+ uint256 number;
+ for (uint256 i = 0; i < b.length; i++) {
+ number = number + uint256(uint8(b[i])) * (2 ** (8 * (b.length - (i + 1))));
+ }
+ return number;
+ }
+
+ function testFuzz_AssumeAddressIsNot(address addr) external {
+ // skip over Payable and NonPayable enums
+ for (uint8 i = 2; i < uint8(type(AddressType).max); i++) {
+ assumeAddressIsNot(addr, AddressType(i));
+ }
+ assertTrue(addr != address(0));
+ assertTrue(addr < address(1) || addr > address(9));
+ assertTrue(addr != address(vm) || addr != 0x000000000000000000636F6e736F6c652e6c6f67);
+ }
+
+ function test_AssumePayable() external {
+ // We deploy a mock version so we can properly test the revert.
+ StdCheatsMock stdCheatsMock = new StdCheatsMock();
+
+ // all should revert since these addresses are not payable
+
+ // VM address
+ vm.expectRevert();
+ stdCheatsMock.exposedAssumePayable(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D);
+
+ // Console address
+ vm.expectRevert();
+ stdCheatsMock.exposedAssumePayable(0x000000000000000000636F6e736F6c652e6c6f67);
+
+ // Create2Deployer
+ vm.expectRevert();
+ stdCheatsMock.exposedAssumePayable(0x4e59b44847b379578588920cA78FbF26c0B4956C);
+
+ // all should pass since these addresses are payable
+
+ // vitalik.eth
+ stdCheatsMock.exposedAssumePayable(0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045);
+
+ // mock payable contract
+ MockContractPayable cp = new MockContractPayable();
+ stdCheatsMock.exposedAssumePayable(address(cp));
+ }
+
+ function test_AssumeNotPayable() external {
+ // We deploy a mock version so we can properly test the revert.
+ StdCheatsMock stdCheatsMock = new StdCheatsMock();
+
+ // all should pass since these addresses are not payable
+
+ // VM address
+ stdCheatsMock.exposedAssumeNotPayable(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D);
+
+ // Console address
+ stdCheatsMock.exposedAssumeNotPayable(0x000000000000000000636F6e736F6c652e6c6f67);
+
+ // Create2Deployer
+ stdCheatsMock.exposedAssumeNotPayable(0x4e59b44847b379578588920cA78FbF26c0B4956C);
+
+ // all should revert since these addresses are payable
+
+ // vitalik.eth
+ vm.expectRevert();
+ stdCheatsMock.exposedAssumeNotPayable(0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045);
+
+ // mock payable contract
+ MockContractPayable cp = new MockContractPayable();
+ vm.expectRevert();
+ stdCheatsMock.exposedAssumeNotPayable(address(cp));
+ }
+
+ function testFuzz_AssumeNotPrecompile(address addr) external {
+ assumeNotPrecompile(addr, getChain("optimism_sepolia").chainId);
+ assertTrue(
+ addr < address(1) || (addr > address(9) && addr < address(0x4200000000000000000000000000000000000000))
+ || addr > address(0x4200000000000000000000000000000000000800)
+ );
+ }
+
+ function testFuzz_AssumeNotForgeAddress(address addr) external pure {
+ assumeNotForgeAddress(addr);
+ assertTrue(
+ addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67
+ && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C
+ );
+ }
+
+ function test_RevertIf_CannotDeployCodeTo() external {
+ vm.expectRevert("StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode.");
+ this._revertDeployCodeTo();
+ }
+
+ function _revertDeployCodeTo() external {
+ deployCodeTo("StdCheats.t.sol:RevertingContract", address(0));
+ }
+
+ function test_DeployCodeTo() external {
+ address arbitraryAddress = makeAddr("arbitraryAddress");
+
+ deployCodeTo(
+ "StdCheats.t.sol:MockContractWithConstructorArgs",
+ abi.encode(uint256(6), true, bytes20(arbitraryAddress)),
+ 1 ether,
+ arbitraryAddress
+ );
+
+ MockContractWithConstructorArgs ct = MockContractWithConstructorArgs(arbitraryAddress);
+
+ assertEq(arbitraryAddress.balance, 1 ether);
+ assertEq(ct.x(), 6);
+ assertTrue(ct.y());
+ assertEq(ct.z(), bytes20(arbitraryAddress));
+ }
+}
+
+contract StdCheatsMock is StdCheats {
+ function exposedAssumePayable(address addr) external {
+ assumePayable(addr);
+ }
+
+ function exposedAssumeNotPayable(address addr) external {
+ assumeNotPayable(addr);
+ }
+
+ // We deploy a mock version so we can properly test expected reverts.
+ function exposedAssumeNotBlacklisted(address token, address addr) external view {
+ return assumeNotBlacklisted(token, addr);
+ }
+}
+
+contract StdCheatsForkTest is Test {
+ address internal constant USDC_BLACKLISTED_USER = 0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD;
+ address internal constant USDT_BLACKLISTED_USER = 0x8f8a8F4B54a2aAC7799d7bc81368aC27b852822A;
+
+ MockUSDT public USDT;
+ MockUSDC public USDC;
+
+ function setUp() public {
+ USDT = new MockUSDT();
+ USDC = new MockUSDC();
+
+ USDC.setBlacklisted(USDC_BLACKLISTED_USER, true);
+ USDT.setBlacklisted(USDT_BLACKLISTED_USER, true);
+ }
+
+ function test_RevertIf_CannotAssumeNoBlacklisted_EOA() external {
+ // We deploy a mock version so we can properly test the revert.
+ StdCheatsMock stdCheatsMock = new StdCheatsMock();
+ address eoa = vm.addr({privateKey: 1});
+ vm.expectRevert("StdCheats assumeNotBlacklisted(address,address): Token address is not a contract.");
+ stdCheatsMock.exposedAssumeNotBlacklisted(eoa, address(0));
+ }
+
+ function testFuzz_AssumeNotBlacklisted_TokenWithoutBlacklist(address addr) external view {
+ assumeNotBlacklisted(address(USDC), addr);
+ assumeNotBlacklisted(address(USDT), addr);
+ assertTrue(true);
+ }
+
+ function test_RevertIf_AssumeNoBlacklisted_USDC() external {
+ // We deploy a mock version so we can properly test the revert.
+ StdCheatsMock stdCheatsMock = new StdCheatsMock();
+ vm.expectRevert();
+ stdCheatsMock.exposedAssumeNotBlacklisted(address(USDC), USDC_BLACKLISTED_USER);
+ }
+
+ function testFuzz_AssumeNotBlacklisted_USDC(address addr) external view {
+ assumeNotBlacklisted(address(USDC), addr);
+ assertFalse(USDCLike(USDC).isBlacklisted(addr));
+ }
+
+ function test_RevertIf_AssumeNoBlacklisted_USDT() external {
+ // We deploy a mock version so we can properly test the revert.
+ StdCheatsMock stdCheatsMock = new StdCheatsMock();
+ vm.expectRevert();
+ stdCheatsMock.exposedAssumeNotBlacklisted(address(USDT), USDT_BLACKLISTED_USER);
+ }
+
+ function testFuzz_AssumeNotBlacklisted_USDT(address addr) external view {
+ assumeNotBlacklisted(address(USDT), addr);
+ assertFalse(USDTLike(USDT).isBlackListed(addr));
+ }
+}
+
+/// @dev https://etherscan.io/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48#readProxyContract
+interface USDCLike {
+ function isBlacklisted(address) external view returns (bool);
+}
+
+/// @dev https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7#readContract
+interface USDTLike {
+ function isBlackListed(address) external view returns (bool);
+}
+
+contract MockUSDT is USDTLike {
+ mapping(address => bool) private blacklist;
+
+ function isBlackListed(address addr) external view returns (bool) {
+ return blacklist[addr];
+ }
+
+ function setBlacklisted(address addr, bool value) external {
+ blacklist[addr] = value;
+ }
+}
+
+contract MockUSDC is USDCLike {
+ mapping(address => bool) private blacklist;
+
+ function isBlacklisted(address addr) external view returns (bool) {
+ return blacklist[addr];
+ }
+
+ function setBlacklisted(address addr, bool value) external {
+ blacklist[addr] = value;
+ }
+}
+
+contract Bar {
+ constructor() payable {
+ /// `DEAL` STDCHEAT
+ totalSupply = 10000e18;
+ balanceOf[address(this)] = totalSupply;
+ }
+
+ /// `HOAX` and `CHANGEPRANK` STDCHEATS
+ function bar(address expectedSender) public payable {
+ require(msg.sender == expectedSender, "!prank");
+ }
+
+ function origin(address expectedSender) public payable {
+ require(msg.sender == expectedSender, "!prank");
+ require(tx.origin == expectedSender, "!prank");
+ }
+
+ function origin(address expectedSender, address expectedOrigin) public payable {
+ require(msg.sender == expectedSender, "!prank");
+ require(tx.origin == expectedOrigin, "!prank");
+ }
+
+ /// `DEAL` STDCHEAT
+ mapping(address => uint256) public balanceOf;
+ uint256 public totalSupply;
+}
+
+contract BarERC1155 {
+ constructor() payable {
+ /// `DEALERC1155` STDCHEAT
+ _totalSupply[0] = 10000e18;
+ _balances[0][address(this)] = _totalSupply[0];
+ }
+
+ function balanceOf(address account, uint256 id) public view virtual returns (uint256) {
+ return _balances[id][account];
+ }
+
+ function totalSupply(uint256 id) public view virtual returns (uint256) {
+ return _totalSupply[id];
+ }
+
+ /// `DEALERC1155` STDCHEAT
+ mapping(uint256 => mapping(address => uint256)) private _balances;
+ mapping(uint256 => uint256) private _totalSupply;
+}
+
+contract BarERC721 {
+ constructor() payable {
+ /// `DEALERC721` STDCHEAT
+ _owners[1] = address(1);
+ _balances[address(1)] = 1;
+ _owners[2] = address(this);
+ _owners[3] = address(this);
+ _balances[address(this)] = 2;
+ }
+
+ function balanceOf(address owner) public view virtual returns (uint256) {
+ return _balances[owner];
+ }
+
+ function ownerOf(uint256 tokenId) public view virtual returns (address) {
+ address owner = _owners[tokenId];
+ return owner;
+ }
+
+ mapping(uint256 => address) private _owners;
+ mapping(address => uint256) private _balances;
+}
+
+contract RevertingContract {
+ constructor() {
+ revert();
+ }
+}
+
+contract MockContractWithConstructorArgs {
+ uint256 public immutable x;
+ bool public y;
+ bytes20 public z;
+
+ constructor(uint256 _x, bool _y, bytes20 _z) payable {
+ x = _x;
+ y = _y;
+ z = _z;
+ }
+}
+
+contract MockContractPayable {
+ receive() external payable {}
+}
diff --git a/contracts/lib/forge-std/test/StdConstants.t.sol b/contracts/lib/forge-std/test/StdConstants.t.sol
new file mode 100644
index 0000000..7a00530
--- /dev/null
+++ b/contracts/lib/forge-std/test/StdConstants.t.sol
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.7.0 <0.9.0;
+
+import {StdConstants} from "../src/StdConstants.sol";
+import {Test} from "../src/Test.sol";
+
+contract StdConstantsTest is Test {
+ function testVm() public view {
+ assertEq(StdConstants.VM.getBlockNumber(), 1);
+ }
+
+ function testVmDerivation() public pure {
+ assertEq(address(StdConstants.VM), address(uint160(uint256(keccak256("hevm cheat code")))));
+ }
+
+ function testConsoleDerivation() public pure {
+ assertEq(StdConstants.CONSOLE, address(uint160(uint88(bytes11("console.log")))));
+ }
+
+ function testDefaultSender() public view {
+ assertEq(StdConstants.DEFAULT_SENDER, msg.sender);
+ }
+
+ function testDefaultSenderDerivation() public pure {
+ assertEq(StdConstants.DEFAULT_SENDER, address(uint160(uint256(keccak256("foundry default caller")))));
+ }
+
+ function testDefaultTestContract() public {
+ assertEq(StdConstants.DEFAULT_TEST_CONTRACT, address(new Dummy()));
+ }
+
+ function testDefaultTestContractDerivation() public view {
+ assertEq(address(this), StdConstants.VM.computeCreateAddress(StdConstants.DEFAULT_SENDER, 1));
+ assertEq(StdConstants.DEFAULT_TEST_CONTRACT, StdConstants.VM.computeCreateAddress(address(this), 1));
+ }
+}
+
+contract Dummy {}
diff --git a/contracts/lib/forge-std/test/StdError.t.sol b/contracts/lib/forge-std/test/StdError.t.sol
new file mode 100644
index 0000000..29803d5
--- /dev/null
+++ b/contracts/lib/forge-std/test/StdError.t.sol
@@ -0,0 +1,120 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.8.0 <0.9.0;
+
+import {stdError} from "../src/StdError.sol";
+import {Test} from "../src/Test.sol";
+
+contract StdErrorsTest is Test {
+ ErrorsTest test;
+
+ function setUp() public {
+ test = new ErrorsTest();
+ }
+
+ function test_RevertIf_AssertionError() public {
+ vm.expectRevert(stdError.assertionError);
+ test.assertionError();
+ }
+
+ function test_RevertIf_ArithmeticError() public {
+ vm.expectRevert(stdError.arithmeticError);
+ test.arithmeticError(10);
+ }
+
+ function test_RevertIf_DivisionError() public {
+ vm.expectRevert(stdError.divisionError);
+ test.divError(0);
+ }
+
+ function test_RevertIf_ModError() public {
+ vm.expectRevert(stdError.divisionError);
+ test.modError(0);
+ }
+
+ function test_RevertIf_EnumConversionError() public {
+ vm.expectRevert(stdError.enumConversionError);
+ test.enumConversion(1);
+ }
+
+ function test_RevertIf_EncodeStgError() public {
+ vm.expectRevert(stdError.encodeStorageError);
+ test.encodeStgError();
+ }
+
+ function test_RevertIf_PopError() public {
+ vm.expectRevert(stdError.popError);
+ test.pop();
+ }
+
+ function test_RevertIf_IndexOOBError() public {
+ vm.expectRevert(stdError.indexOOBError);
+ test.indexOOBError(1);
+ }
+
+ function test_RevertIf_MemOverflowError() public {
+ vm.expectRevert(stdError.memOverflowError);
+ test.mem();
+ }
+
+ function test_RevertIf_InternError() public {
+ vm.expectRevert(stdError.zeroVarError);
+ test.intern();
+ }
+}
+
+contract ErrorsTest {
+ enum T {
+ T1
+ }
+
+ uint256[] public someArr;
+ bytes someBytes;
+
+ function assertionError() public pure {
+ assert(false);
+ }
+
+ function arithmeticError(uint256 a) public pure {
+ a -= 100;
+ }
+
+ function divError(uint256 a) public pure {
+ 100 / a;
+ }
+
+ function modError(uint256 a) public pure {
+ 100 % a;
+ }
+
+ function enumConversion(uint256 a) public pure {
+ T(a);
+ }
+
+ function encodeStgError() public {
+ /// @solidity memory-safe-assembly
+ assembly {
+ sstore(someBytes.slot, 1)
+ }
+ keccak256(someBytes);
+ }
+
+ function pop() public {
+ someArr.pop();
+ }
+
+ function indexOOBError(uint256 a) public pure {
+ uint256[] memory t = new uint256[](0);
+ t[a];
+ }
+
+ function mem() public pure {
+ uint256 l = 2 ** 256 / 32;
+ new uint256[](l);
+ }
+
+ function intern() public returns (uint256) {
+ function(uint256) internal returns (uint256) x;
+ x(2);
+ return 7;
+ }
+}
diff --git a/contracts/lib/forge-std/test/StdJson.t.sol b/contracts/lib/forge-std/test/StdJson.t.sol
new file mode 100644
index 0000000..6bedfcc
--- /dev/null
+++ b/contracts/lib/forge-std/test/StdJson.t.sol
@@ -0,0 +1,49 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.7.0 <0.9.0;
+
+import {Test, stdJson} from "../src/Test.sol";
+
+contract StdJsonTest is Test {
+ using stdJson for string;
+
+ string root;
+ string path;
+
+ function setUp() public {
+ root = vm.projectRoot();
+ path = string.concat(root, "/test/fixtures/test.json");
+ }
+
+ struct SimpleJson {
+ uint256 a;
+ string b;
+ }
+
+ struct NestedJson {
+ uint256 a;
+ string b;
+ SimpleJson c;
+ }
+
+ function test_readJson() public view {
+ string memory json = vm.readFile(path);
+ assertEq(json.readUint(".a"), 123);
+ }
+
+ function test_writeJson() public {
+ string memory json = "json";
+ json.serialize("a", uint256(123));
+ string memory semiFinal = json.serialize("b", string("test"));
+ string memory finalJson = json.serialize("c", semiFinal);
+ finalJson.write(path);
+
+ string memory json_ = vm.readFile(path);
+ bytes memory data = json_.parseRaw("$");
+ NestedJson memory decodedData = abi.decode(data, (NestedJson));
+
+ assertEq(decodedData.a, 123);
+ assertEq(decodedData.b, "test");
+ assertEq(decodedData.c.a, 123);
+ assertEq(decodedData.c.b, "test");
+ }
+}
diff --git a/contracts/lib/forge-std/test/StdMath.t.sol b/contracts/lib/forge-std/test/StdMath.t.sol
new file mode 100644
index 0000000..96a42a0
--- /dev/null
+++ b/contracts/lib/forge-std/test/StdMath.t.sol
@@ -0,0 +1,202 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.8.0 <0.9.0;
+
+import {stdMath} from "../src/StdMath.sol";
+import {Test, stdError} from "../src/Test.sol";
+
+contract StdMathMock is Test {
+ function exposedPercentDelta(uint256 a, uint256 b) public pure returns (uint256) {
+ return stdMath.percentDelta(a, b);
+ }
+
+ function exposedPercentDelta(int256 a, int256 b) public pure returns (uint256) {
+ return stdMath.percentDelta(a, b);
+ }
+}
+
+contract StdMathTest is Test {
+ function test_GetAbs() external pure {
+ assertEq(stdMath.abs(-50), 50);
+ assertEq(stdMath.abs(50), 50);
+ assertEq(stdMath.abs(-1337), 1337);
+ assertEq(stdMath.abs(0), 0);
+
+ assertEq(stdMath.abs(type(int256).min), (type(uint256).max >> 1) + 1);
+ assertEq(stdMath.abs(type(int256).max), (type(uint256).max >> 1));
+ }
+
+ function testFuzz_GetAbs(int256 a) external pure {
+ uint256 manualAbs = getAbs(a);
+
+ uint256 abs = stdMath.abs(a);
+
+ assertEq(abs, manualAbs);
+ }
+
+ function test_GetDelta_Uint() external pure {
+ assertEq(stdMath.delta(uint256(0), uint256(0)), 0);
+ assertEq(stdMath.delta(uint256(0), uint256(1337)), 1337);
+ assertEq(stdMath.delta(uint256(0), type(uint64).max), type(uint64).max);
+ assertEq(stdMath.delta(uint256(0), type(uint128).max), type(uint128).max);
+ assertEq(stdMath.delta(uint256(0), type(uint256).max), type(uint256).max);
+
+ assertEq(stdMath.delta(0, uint256(0)), 0);
+ assertEq(stdMath.delta(1337, uint256(0)), 1337);
+ assertEq(stdMath.delta(type(uint64).max, uint256(0)), type(uint64).max);
+ assertEq(stdMath.delta(type(uint128).max, uint256(0)), type(uint128).max);
+ assertEq(stdMath.delta(type(uint256).max, uint256(0)), type(uint256).max);
+
+ assertEq(stdMath.delta(1337, uint256(1337)), 0);
+ assertEq(stdMath.delta(type(uint256).max, type(uint256).max), 0);
+ assertEq(stdMath.delta(5000, uint256(1250)), 3750);
+ }
+
+ function testFuzz_GetDelta_Uint(uint256 a, uint256 b) external pure {
+ uint256 manualDelta = a > b ? a - b : b - a;
+
+ uint256 delta = stdMath.delta(a, b);
+
+ assertEq(delta, manualDelta);
+ }
+
+ function test_GetDelta_Int() external pure {
+ assertEq(stdMath.delta(int256(0), int256(0)), 0);
+ assertEq(stdMath.delta(int256(0), int256(1337)), 1337);
+ assertEq(stdMath.delta(int256(0), type(int64).max), type(uint64).max >> 1);
+ assertEq(stdMath.delta(int256(0), type(int128).max), type(uint128).max >> 1);
+ assertEq(stdMath.delta(int256(0), type(int256).max), type(uint256).max >> 1);
+
+ assertEq(stdMath.delta(0, int256(0)), 0);
+ assertEq(stdMath.delta(1337, int256(0)), 1337);
+ assertEq(stdMath.delta(type(int64).max, int256(0)), type(uint64).max >> 1);
+ assertEq(stdMath.delta(type(int128).max, int256(0)), type(uint128).max >> 1);
+ assertEq(stdMath.delta(type(int256).max, int256(0)), type(uint256).max >> 1);
+
+ assertEq(stdMath.delta(-0, int256(0)), 0);
+ assertEq(stdMath.delta(-1337, int256(0)), 1337);
+ assertEq(stdMath.delta(type(int64).min, int256(0)), (type(uint64).max >> 1) + 1);
+ assertEq(stdMath.delta(type(int128).min, int256(0)), (type(uint128).max >> 1) + 1);
+ assertEq(stdMath.delta(type(int256).min, int256(0)), (type(uint256).max >> 1) + 1);
+
+ assertEq(stdMath.delta(int256(0), -0), 0);
+ assertEq(stdMath.delta(int256(0), -1337), 1337);
+ assertEq(stdMath.delta(int256(0), type(int64).min), (type(uint64).max >> 1) + 1);
+ assertEq(stdMath.delta(int256(0), type(int128).min), (type(uint128).max >> 1) + 1);
+ assertEq(stdMath.delta(int256(0), type(int256).min), (type(uint256).max >> 1) + 1);
+
+ assertEq(stdMath.delta(1337, int256(1337)), 0);
+ assertEq(stdMath.delta(type(int256).max, type(int256).max), 0);
+ assertEq(stdMath.delta(type(int256).min, type(int256).min), 0);
+ assertEq(stdMath.delta(type(int256).min, type(int256).max), type(uint256).max);
+ assertEq(stdMath.delta(5000, int256(1250)), 3750);
+ }
+
+ function testFuzz_GetDelta_Int(int256 a, int256 b) external pure {
+ uint256 absA = getAbs(a);
+ uint256 absB = getAbs(b);
+ uint256 absDelta = absA > absB ? absA - absB : absB - absA;
+
+ uint256 manualDelta;
+ if ((a >= 0 && b >= 0) || (a < 0 && b < 0)) {
+ manualDelta = absDelta;
+ }
+ // (a < 0 && b >= 0) || (a >= 0 && b < 0)
+ else {
+ manualDelta = absA + absB;
+ }
+
+ uint256 delta = stdMath.delta(a, b);
+
+ assertEq(delta, manualDelta);
+ }
+
+ function test_GetPercentDelta_Uint() external {
+ StdMathMock stdMathMock = new StdMathMock();
+
+ assertEq(stdMath.percentDelta(uint256(0), uint256(1337)), 1e18);
+ assertEq(stdMath.percentDelta(uint256(0), type(uint64).max), 1e18);
+ assertEq(stdMath.percentDelta(uint256(0), type(uint128).max), 1e18);
+ assertEq(stdMath.percentDelta(uint256(0), type(uint192).max), 1e18);
+
+ assertEq(stdMath.percentDelta(1337, uint256(1337)), 0);
+ assertEq(stdMath.percentDelta(type(uint192).max, type(uint192).max), 0);
+ assertEq(stdMath.percentDelta(0, uint256(2500)), 1e18);
+ assertEq(stdMath.percentDelta(2500, uint256(2500)), 0);
+ assertEq(stdMath.percentDelta(5000, uint256(2500)), 1e18);
+ assertEq(stdMath.percentDelta(7500, uint256(2500)), 2e18);
+
+ vm.expectRevert("stdMath percentDelta(uint256,uint256): Divisor is zero");
+ stdMathMock.exposedPercentDelta(uint256(1), 0);
+ }
+
+ function testFuzz_GetPercentDelta_Uint(uint192 a, uint192 b) external pure {
+ vm.assume(b != 0);
+ uint256 manualDelta = a > b ? a - b : b - a;
+
+ uint256 manualPercentDelta = manualDelta * 1e18 / b;
+ uint256 percentDelta = stdMath.percentDelta(a, b);
+
+ assertEq(percentDelta, manualPercentDelta);
+ }
+
+ function test_GetPercentDelta_Int() external {
+ // We deploy a mock version so we can properly test the revert.
+ StdMathMock stdMathMock = new StdMathMock();
+
+ assertEq(stdMath.percentDelta(int256(0), int256(1337)), 1e18);
+ assertEq(stdMath.percentDelta(int256(0), -1337), 1e18);
+ assertEq(stdMath.percentDelta(int256(0), type(int64).min), 1e18);
+ assertEq(stdMath.percentDelta(int256(0), type(int128).min), 1e18);
+ assertEq(stdMath.percentDelta(int256(0), type(int192).min), 1e18);
+ assertEq(stdMath.percentDelta(int256(0), type(int64).max), 1e18);
+ assertEq(stdMath.percentDelta(int256(0), type(int128).max), 1e18);
+ assertEq(stdMath.percentDelta(int256(0), type(int192).max), 1e18);
+
+ assertEq(stdMath.percentDelta(1337, int256(1337)), 0);
+ assertEq(stdMath.percentDelta(type(int192).max, type(int192).max), 0);
+ assertEq(stdMath.percentDelta(type(int192).min, type(int192).min), 0);
+
+ assertEq(stdMath.percentDelta(type(int192).min, type(int192).max), 2e18); // rounds the 1 wei diff down
+ assertEq(stdMath.percentDelta(type(int192).max, type(int192).min), 2e18 - 1); // rounds the 1 wei diff down
+ assertEq(stdMath.percentDelta(0, int256(2500)), 1e18);
+ assertEq(stdMath.percentDelta(2500, int256(2500)), 0);
+ assertEq(stdMath.percentDelta(5000, int256(2500)), 1e18);
+ assertEq(stdMath.percentDelta(7500, int256(2500)), 2e18);
+
+ vm.expectRevert("stdMath percentDelta(int256,int256): Divisor is zero");
+ stdMathMock.exposedPercentDelta(int256(1), 0);
+ }
+
+ function testFuzz_GetPercentDelta_Int(int192 a, int192 b) external pure {
+ vm.assume(b != 0);
+ uint256 absA = getAbs(a);
+ uint256 absB = getAbs(b);
+ uint256 absDelta = absA > absB ? absA - absB : absB - absA;
+
+ uint256 manualDelta;
+ if ((a >= 0 && b >= 0) || (a < 0 && b < 0)) {
+ manualDelta = absDelta;
+ }
+ // (a < 0 && b >= 0) || (a >= 0 && b < 0)
+ else {
+ manualDelta = absA + absB;
+ }
+
+ uint256 manualPercentDelta = manualDelta * 1e18 / absB;
+ uint256 percentDelta = stdMath.percentDelta(a, b);
+
+ assertEq(percentDelta, manualPercentDelta);
+ }
+
+ /*//////////////////////////////////////////////////////////////////////////
+ HELPERS
+ //////////////////////////////////////////////////////////////////////////*/
+
+ function getAbs(int256 a) private pure returns (uint256) {
+ if (a < 0) {
+ return a == type(int256).min ? uint256(type(int256).max) + 1 : uint256(-a);
+ }
+
+ return uint256(a);
+ }
+}
diff --git a/contracts/lib/forge-std/test/StdStorage.t.sol b/contracts/lib/forge-std/test/StdStorage.t.sol
new file mode 100644
index 0000000..d59465b
--- /dev/null
+++ b/contracts/lib/forge-std/test/StdStorage.t.sol
@@ -0,0 +1,486 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.7.0 <0.9.0;
+
+import {stdStorage, StdStorage} from "../src/StdStorage.sol";
+import {Test} from "../src/Test.sol";
+
+contract StdStorageTest is Test {
+ using stdStorage for StdStorage;
+
+ StorageTest internal test;
+
+ function setUp() public {
+ test = new StorageTest();
+ }
+
+ function test_StorageHidden() public {
+ assertEq(uint256(keccak256("my.random.var")), stdstore.target(address(test)).sig("hidden()").find());
+ }
+
+ function test_StorageObvious() public {
+ assertEq(uint256(0), stdstore.target(address(test)).sig("exists()").find());
+ }
+
+ function test_StorageExtraSload() public {
+ assertEq(16, stdstore.target(address(test)).sig(test.extra_sload.selector).find());
+ }
+
+ function test_StorageCheckedWriteHidden() public {
+ stdstore.target(address(test)).sig(test.hidden.selector).checked_write(100);
+ assertEq(uint256(test.hidden()), 100);
+ }
+
+ function test_StorageCheckedWriteObvious() public {
+ stdstore.target(address(test)).sig(test.exists.selector).checked_write(100);
+ assertEq(test.exists(), 100);
+ }
+
+ function test_StorageCheckedWriteSignedIntegerHidden() public {
+ stdstore.target(address(test)).sig(test.hidden.selector).checked_write_int(-100);
+ assertEq(int256(uint256(test.hidden())), -100);
+ }
+
+ function test_StorageCheckedWriteSignedIntegerObvious() public {
+ stdstore.target(address(test)).sig(test.tG.selector).checked_write_int(-100);
+ assertEq(test.tG(), -100);
+ }
+
+ function test_StorageMapStructA() public {
+ uint256 slot =
+ stdstore.target(address(test)).sig(test.map_struct.selector).with_key(address(this)).depth(0).find();
+ assertEq(uint256(keccak256(abi.encode(address(this), 4))), slot);
+ }
+
+ function test_StorageMapStructB() public {
+ uint256 slot =
+ stdstore.target(address(test)).sig(test.map_struct.selector).with_key(address(this)).depth(1).find();
+ assertEq(uint256(keccak256(abi.encode(address(this), 4))) + 1, slot);
+ }
+
+ function test_StorageDeepMap() public {
+ uint256 slot = stdstore.target(address(test)).sig(test.deep_map.selector).with_key(address(this))
+ .with_key(address(this)).find();
+ assertEq(uint256(keccak256(abi.encode(address(this), keccak256(abi.encode(address(this), uint256(5)))))), slot);
+ }
+
+ function test_StorageCheckedWriteDeepMap() public {
+ stdstore.target(address(test)).sig(test.deep_map.selector).with_key(address(this)).with_key(address(this))
+ .checked_write(100);
+ assertEq(100, test.deep_map(address(this), address(this)));
+ }
+
+ function test_StorageDeepMapStructA() public {
+ uint256 slot = stdstore.target(address(test)).sig(test.deep_map_struct.selector).with_key(address(this))
+ .with_key(address(this)).depth(0).find();
+ assertEq(
+ bytes32(
+ uint256(keccak256(abi.encode(address(this), keccak256(abi.encode(address(this), uint256(6)))))) + 0
+ ),
+ bytes32(slot)
+ );
+ }
+
+ function test_StorageDeepMapStructB() public {
+ uint256 slot = stdstore.target(address(test)).sig(test.deep_map_struct.selector).with_key(address(this))
+ .with_key(address(this)).depth(1).find();
+ assertEq(
+ bytes32(
+ uint256(keccak256(abi.encode(address(this), keccak256(abi.encode(address(this), uint256(6)))))) + 1
+ ),
+ bytes32(slot)
+ );
+ }
+
+ function test_StorageCheckedWriteDeepMapStructA() public {
+ stdstore.target(address(test)).sig(test.deep_map_struct.selector).with_key(address(this))
+ .with_key(address(this)).depth(0).checked_write(100);
+ (uint256 a, uint256 b) = test.deep_map_struct(address(this), address(this));
+ assertEq(100, a);
+ assertEq(0, b);
+ }
+
+ function test_StorageCheckedWriteDeepMapStructB() public {
+ stdstore.target(address(test)).sig(test.deep_map_struct.selector).with_key(address(this))
+ .with_key(address(this)).depth(1).checked_write(100);
+ (uint256 a, uint256 b) = test.deep_map_struct(address(this), address(this));
+ assertEq(0, a);
+ assertEq(100, b);
+ }
+
+ function test_StorageCheckedWriteMapStructA() public {
+ stdstore.target(address(test)).sig(test.map_struct.selector).with_key(address(this)).depth(0).checked_write(100);
+ (uint256 a, uint256 b) = test.map_struct(address(this));
+ assertEq(a, 100);
+ assertEq(b, 0);
+ }
+
+ function test_StorageCheckedWriteMapStructB() public {
+ stdstore.target(address(test)).sig(test.map_struct.selector).with_key(address(this)).depth(1).checked_write(100);
+ (uint256 a, uint256 b) = test.map_struct(address(this));
+ assertEq(a, 0);
+ assertEq(b, 100);
+ }
+
+ function test_StorageStructA() public {
+ uint256 slot = stdstore.target(address(test)).sig(test.basic.selector).depth(0).find();
+ assertEq(uint256(7), slot);
+ }
+
+ function test_StorageStructB() public {
+ uint256 slot = stdstore.target(address(test)).sig(test.basic.selector).depth(1).find();
+ assertEq(uint256(7) + 1, slot);
+ }
+
+ function test_StorageCheckedWriteStructA() public {
+ stdstore.target(address(test)).sig(test.basic.selector).depth(0).checked_write(100);
+ (uint256 a, uint256 b) = test.basic();
+ assertEq(a, 100);
+ assertEq(b, 1337);
+ }
+
+ function test_StorageCheckedWriteStructB() public {
+ stdstore.target(address(test)).sig(test.basic.selector).depth(1).checked_write(100);
+ (uint256 a, uint256 b) = test.basic();
+ assertEq(a, 1337);
+ assertEq(b, 100);
+ }
+
+ function test_StorageMapAddrFound() public {
+ uint256 slot = stdstore.target(address(test)).sig(test.map_addr.selector).with_key(address(this)).find();
+ assertEq(uint256(keccak256(abi.encode(address(this), uint256(1)))), slot);
+ }
+
+ function test_StorageMapAddrRoot() public {
+ (uint256 slot, bytes32 key) =
+ stdstore.target(address(test)).sig(test.map_addr.selector).with_key(address(this)).parent();
+ assertEq(address(uint160(uint256(key))), address(this));
+ assertEq(uint256(1), slot);
+ slot = stdstore.target(address(test)).sig(test.map_addr.selector).with_key(address(this)).root();
+ assertEq(uint256(1), slot);
+ }
+
+ function test_StorageMapUintFound() public {
+ uint256 slot = stdstore.target(address(test)).sig(test.map_uint.selector).with_key(100).find();
+ assertEq(uint256(keccak256(abi.encode(100, uint256(2)))), slot);
+ }
+
+ function test_StorageCheckedWriteMapUint() public {
+ stdstore.target(address(test)).sig(test.map_uint.selector).with_key(100).checked_write(100);
+ assertEq(100, test.map_uint(100));
+ }
+
+ function test_StorageCheckedWriteMapAddr() public {
+ stdstore.target(address(test)).sig(test.map_addr.selector).with_key(address(this)).checked_write(100);
+ assertEq(100, test.map_addr(address(this)));
+ }
+
+ function test_StorageCheckedWriteMapBool() public {
+ stdstore.target(address(test)).sig(test.map_bool.selector).with_key(address(this)).checked_write(true);
+ assertTrue(test.map_bool(address(this)));
+ }
+
+ function testFuzz_StorageCheckedWriteMapPacked(address addr, uint128 value) public {
+ stdstore.enable_packed_slots().target(address(test)).sig(test.read_struct_lower.selector).with_key(addr)
+ .checked_write(value);
+ assertEq(test.read_struct_lower(addr), value);
+
+ stdstore.enable_packed_slots().target(address(test)).sig(test.read_struct_upper.selector).with_key(addr)
+ .checked_write(value);
+ assertEq(test.read_struct_upper(addr), value);
+ }
+
+ function test_StorageCheckedWriteMapPackedFullSuccess() public {
+ uint256 full = test.map_packed(address(1337));
+ // keep upper 128, set lower 128 to 1337
+ full = (full & (uint256((1 << 128) - 1) << 128)) | 1337;
+ stdstore.target(address(test)).sig(test.map_packed.selector).with_key(address(uint160(1337)))
+ .checked_write(full);
+ assertEq(1337, test.read_struct_lower(address(1337)));
+ }
+
+ function test_RevertStorageConst() public {
+ StorageTestTarget target = new StorageTestTarget(test);
+
+ vm.expectRevert("stdStorage find(StdStorage): No storage use detected for target.");
+ target.expectRevertStorageConst();
+ }
+
+ function testFuzz_StorageNativePack(uint248 val1, uint248 val2, bool boolVal1, bool boolVal2) public {
+ stdstore.enable_packed_slots().target(address(test)).sig(test.tA.selector).checked_write(val1);
+ stdstore.enable_packed_slots().target(address(test)).sig(test.tB.selector).checked_write(boolVal1);
+ stdstore.enable_packed_slots().target(address(test)).sig(test.tC.selector).checked_write(boolVal2);
+ stdstore.enable_packed_slots().target(address(test)).sig(test.tD.selector).checked_write(val2);
+
+ assertEq(test.tA(), val1);
+ assertEq(test.tB(), boolVal1);
+ assertEq(test.tC(), boolVal2);
+ assertEq(test.tD(), val2);
+ }
+
+ function test_StorageReadBytes32() public {
+ bytes32 val = stdstore.target(address(test)).sig(test.tE.selector).read_bytes32();
+ assertEq(val, hex"1337");
+ }
+
+ function test_StorageReadBool_False() public {
+ bool val = stdstore.target(address(test)).sig(test.tB.selector).read_bool();
+ assertEq(val, false);
+ }
+
+ function test_StorageReadBool_True() public {
+ bool val = stdstore.target(address(test)).sig(test.tH.selector).read_bool();
+ assertEq(val, true);
+ }
+
+ function test_RevertIf_ReadingNonBoolValue() public {
+ vm.expectRevert("stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.");
+ this.readNonBoolValue();
+ }
+
+ function readNonBoolValue() public {
+ stdstore.target(address(test)).sig(test.tE.selector).read_bool();
+ }
+
+ function test_StorageReadAddress() public {
+ address val = stdstore.target(address(test)).sig(test.tF.selector).read_address();
+ assertEq(val, address(1337));
+ }
+
+ function test_StorageReadUint() public {
+ uint256 val = stdstore.target(address(test)).sig(test.exists.selector).read_uint();
+ assertEq(val, 1);
+ }
+
+ function test_StorageReadInt() public {
+ int256 val = stdstore.target(address(test)).sig(test.tG.selector).read_int();
+ assertEq(val, type(int256).min);
+ }
+
+ function testFuzz_Packed(uint256 val, uint8 elemToGet) public {
+ // This function tries an assortment of packed slots, shifts meaning number of elements
+ // that are packed. Shiftsizes are the size of each element, i.e. 8 means a data type that is 8 bits, 16 == 16 bits, etc.
+ // Combined, these determine how a slot is packed. Making it random is too hard to avoid global rejection limit
+ // and make it performant.
+
+ // change the number of shifts
+ for (uint256 i = 1; i < 5; i++) {
+ uint256 shifts = i;
+
+ elemToGet = uint8(bound(elemToGet, 0, shifts - 1));
+
+ uint256[] memory shiftSizes = new uint256[](shifts);
+ for (uint256 j; j < shifts; j++) {
+ shiftSizes[j] = 8 * (j + 1);
+ }
+
+ test.setRandomPacking(val);
+
+ uint256 leftBits;
+ uint256 rightBits;
+ for (uint256 j; j < shiftSizes.length; j++) {
+ if (j < elemToGet) {
+ leftBits += shiftSizes[j];
+ } else if (elemToGet != j) {
+ rightBits += shiftSizes[j];
+ }
+ }
+
+ // we may have some right bits unaccounted for
+ leftBits += 256 - (leftBits + shiftSizes[elemToGet] + rightBits);
+ // clear left bits, then clear right bits and realign
+ uint256 expectedValToRead = (val << leftBits) >> (leftBits + rightBits);
+
+ uint256 readVal = stdstore.target(address(test)).enable_packed_slots()
+ .sig("getRandomPacked(uint8,uint8[],uint8)").with_calldata(abi.encode(shifts, shiftSizes, elemToGet))
+ .read_uint();
+
+ assertEq(readVal, expectedValToRead);
+ }
+ }
+
+ function testFuzz_Packed2(uint256 nvars, uint256 seed) public {
+ // Number of random variables to generate.
+ nvars = bound(nvars, 1, 20);
+
+ // This will decrease as we generate values in the below loop.
+ uint256 bitsRemaining = 256;
+
+ // Generate a random value and size for each variable.
+ uint256[] memory vals = new uint256[](nvars);
+ uint256[] memory sizes = new uint256[](nvars);
+ uint256[] memory offsets = new uint256[](nvars);
+
+ for (uint256 i = 0; i < nvars; i++) {
+ // Generate a random value and size.
+ offsets[i] = i == 0 ? 0 : offsets[i - 1] + sizes[i - 1];
+
+ uint256 nvarsRemaining = nvars - i;
+ uint256 maxVarSize = bitsRemaining - nvarsRemaining + 1;
+ sizes[i] = bound(uint256(keccak256(abi.encodePacked(seed, i + 256))), 1, maxVarSize);
+ bitsRemaining -= sizes[i];
+
+ uint256 maxVal;
+ uint256 varSize = sizes[i];
+ assembly {
+ // mask = (1 << varSize) - 1
+ maxVal := sub(shl(varSize, 1), 1)
+ }
+ vals[i] = bound(uint256(keccak256(abi.encodePacked(seed, i))), 0, maxVal);
+ }
+
+ // Pack all values into the slot.
+ for (uint256 i = 0; i < nvars; i++) {
+ stdstore.enable_packed_slots().target(address(test)).sig("getRandomPacked(uint256,uint256)")
+ .with_key(sizes[i]).with_key(offsets[i]).checked_write(vals[i]);
+ }
+
+ // Verify the read data matches.
+ for (uint256 i = 0; i < nvars; i++) {
+ uint256 readVal = stdstore.enable_packed_slots().target(address(test))
+ .sig("getRandomPacked(uint256,uint256)").with_key(sizes[i]).with_key(offsets[i]).read_uint();
+
+ uint256 retVal = test.getRandomPacked(sizes[i], offsets[i]);
+
+ assertEq(readVal, vals[i]);
+ assertEq(retVal, vals[i]);
+ }
+ }
+
+ function testEdgeCaseArray() public {
+ stdstore.target(address(test)).sig("edgeCaseArray(uint256)").with_key(uint256(0)).checked_write(1);
+ assertEq(test.edgeCaseArray(0), 1);
+ }
+}
+
+contract StorageTestTarget {
+ using stdStorage for StdStorage;
+
+ StdStorage internal stdstore;
+ StorageTest internal test;
+
+ constructor(StorageTest test_) {
+ test = test_;
+ }
+
+ function expectRevertStorageConst() public {
+ stdstore.target(address(test)).sig("const()").find();
+ }
+}
+
+contract StorageTest {
+ uint256 public exists = 1;
+ mapping(address => uint256) public map_addr;
+ mapping(uint256 => uint256) public map_uint;
+ mapping(address => uint256) public map_packed;
+ mapping(address => UnpackedStruct) public map_struct;
+ mapping(address => mapping(address => uint256)) public deep_map;
+ mapping(address => mapping(address => UnpackedStruct)) public deep_map_struct;
+ UnpackedStruct public basic;
+
+ uint248 public tA;
+ bool public tB;
+
+ bool public tC = false;
+ uint248 public tD = 1;
+
+ struct UnpackedStruct {
+ uint256 a;
+ uint256 b;
+ }
+
+ mapping(address => bool) public map_bool;
+
+ bytes32 public tE = hex"1337";
+ address public tF = address(1337);
+ int256 public tG = type(int256).min;
+ bool public tH = true;
+ bytes32 private tI = ~bytes32(hex"1337");
+
+ uint256 randomPacking;
+
+ // Array with length matching values of elements.
+ uint256[] public edgeCaseArray = [3, 3, 3];
+
+ constructor() {
+ basic = UnpackedStruct({a: 1337, b: 1337});
+
+ uint256 two = (1 << 128) | 1;
+ map_packed[msg.sender] = two;
+ map_packed[address(uint160(1337))] = 1 << 128;
+ }
+
+ function read_struct_upper(address who) public view returns (uint256) {
+ return map_packed[who] >> 128;
+ }
+
+ function read_struct_lower(address who) public view returns (uint256) {
+ return map_packed[who] & ((1 << 128) - 1);
+ }
+
+ function hidden() public view returns (bytes32 t) {
+ bytes32 slot = keccak256("my.random.var");
+ /// @solidity memory-safe-assembly
+ assembly {
+ t := sload(slot)
+ }
+ }
+
+ function const() public pure returns (bytes32 t) {
+ t = bytes32(hex"1337");
+ }
+
+ function extra_sload() public view returns (bytes32 t) {
+ // trigger read on slot `tE`, and make a staticcall to make sure compiler doesn't optimize this SLOAD away
+ assembly {
+ pop(staticcall(gas(), sload(tE.slot), 0, 0, 0, 0))
+ }
+ t = tI;
+ }
+
+ function setRandomPacking(uint256 val) public {
+ randomPacking = val;
+ }
+
+ function _getMask(uint256 size) internal pure returns (uint256 mask) {
+ assembly {
+ // mask = (1 << size) - 1
+ mask := sub(shl(size, 1), 1)
+ }
+ }
+
+ function setRandomPacking(uint256 val, uint256 size, uint256 offset) public {
+ // Generate mask based on the size of the value
+ uint256 mask = _getMask(size);
+ // Zero out all bits for the word we're about to set
+ uint256 cleanedWord = randomPacking & ~(mask << offset);
+ // Place val in the correct spot of the cleaned word
+ randomPacking = cleanedWord | val << offset;
+ }
+
+ function getRandomPacked(uint256 size, uint256 offset) public view returns (uint256) {
+ // Generate mask based on the size of the value
+ uint256 mask = _getMask(size);
+ // Shift to place the bits in the correct position, and use mask to zero out remaining bits
+ return (randomPacking >> offset) & mask;
+ }
+
+ function getRandomPacked(uint8 shifts, uint8[] memory shiftSizes, uint8 elem) public view returns (uint256) {
+ require(elem < shifts, "!elem");
+ uint256 leftBits;
+ uint256 rightBits;
+
+ for (uint256 i; i < shiftSizes.length; i++) {
+ if (i < elem) {
+ leftBits += shiftSizes[i];
+ } else if (elem != i) {
+ rightBits += shiftSizes[i];
+ }
+ }
+
+ // we may have some right bits unaccounted for
+ leftBits += 256 - (leftBits + shiftSizes[elem] + rightBits);
+
+ // clear left bits, then clear right bits and realign
+ return (randomPacking << leftBits) >> (leftBits + rightBits);
+ }
+}
diff --git a/contracts/lib/forge-std/test/StdStyle.t.sol b/contracts/lib/forge-std/test/StdStyle.t.sol
new file mode 100644
index 0000000..974e756
--- /dev/null
+++ b/contracts/lib/forge-std/test/StdStyle.t.sol
@@ -0,0 +1,110 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.7.0 <0.9.0;
+
+import {Test, console2, StdStyle} from "../src/Test.sol";
+
+contract StdStyleTest is Test {
+ function test_StyleColor() public pure {
+ console2.log(StdStyle.red("StdStyle.red String Test"));
+ console2.log(StdStyle.red(uint256(10e18)));
+ console2.log(StdStyle.red(int256(-10e18)));
+ console2.log(StdStyle.red(true));
+ console2.log(StdStyle.red(address(0)));
+ console2.log(StdStyle.redBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D"));
+ console2.log(StdStyle.redBytes32("StdStyle.redBytes32"));
+ console2.log(StdStyle.green("StdStyle.green String Test"));
+ console2.log(StdStyle.green(uint256(10e18)));
+ console2.log(StdStyle.green(int256(-10e18)));
+ console2.log(StdStyle.green(true));
+ console2.log(StdStyle.green(address(0)));
+ console2.log(StdStyle.greenBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D"));
+ console2.log(StdStyle.greenBytes32("StdStyle.greenBytes32"));
+ console2.log(StdStyle.yellow("StdStyle.yellow String Test"));
+ console2.log(StdStyle.yellow(uint256(10e18)));
+ console2.log(StdStyle.yellow(int256(-10e18)));
+ console2.log(StdStyle.yellow(true));
+ console2.log(StdStyle.yellow(address(0)));
+ console2.log(StdStyle.yellowBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D"));
+ console2.log(StdStyle.yellowBytes32("StdStyle.yellowBytes32"));
+ console2.log(StdStyle.blue("StdStyle.blue String Test"));
+ console2.log(StdStyle.blue(uint256(10e18)));
+ console2.log(StdStyle.blue(int256(-10e18)));
+ console2.log(StdStyle.blue(true));
+ console2.log(StdStyle.blue(address(0)));
+ console2.log(StdStyle.blueBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D"));
+ console2.log(StdStyle.blueBytes32("StdStyle.blueBytes32"));
+ console2.log(StdStyle.magenta("StdStyle.magenta String Test"));
+ console2.log(StdStyle.magenta(uint256(10e18)));
+ console2.log(StdStyle.magenta(int256(-10e18)));
+ console2.log(StdStyle.magenta(true));
+ console2.log(StdStyle.magenta(address(0)));
+ console2.log(StdStyle.magentaBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D"));
+ console2.log(StdStyle.magentaBytes32("StdStyle.magentaBytes32"));
+ console2.log(StdStyle.cyan("StdStyle.cyan String Test"));
+ console2.log(StdStyle.cyan(uint256(10e18)));
+ console2.log(StdStyle.cyan(int256(-10e18)));
+ console2.log(StdStyle.cyan(true));
+ console2.log(StdStyle.cyan(address(0)));
+ console2.log(StdStyle.cyanBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D"));
+ console2.log(StdStyle.cyanBytes32("StdStyle.cyanBytes32"));
+ }
+
+ function test_StyleFontWeight() public pure {
+ console2.log(StdStyle.bold("StdStyle.bold String Test"));
+ console2.log(StdStyle.bold(uint256(10e18)));
+ console2.log(StdStyle.bold(int256(-10e18)));
+ console2.log(StdStyle.bold(address(0)));
+ console2.log(StdStyle.bold(true));
+ console2.log(StdStyle.boldBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D"));
+ console2.log(StdStyle.boldBytes32("StdStyle.boldBytes32"));
+ console2.log(StdStyle.dim("StdStyle.dim String Test"));
+ console2.log(StdStyle.dim(uint256(10e18)));
+ console2.log(StdStyle.dim(int256(-10e18)));
+ console2.log(StdStyle.dim(address(0)));
+ console2.log(StdStyle.dim(true));
+ console2.log(StdStyle.dimBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D"));
+ console2.log(StdStyle.dimBytes32("StdStyle.dimBytes32"));
+ console2.log(StdStyle.italic("StdStyle.italic String Test"));
+ console2.log(StdStyle.italic(uint256(10e18)));
+ console2.log(StdStyle.italic(int256(-10e18)));
+ console2.log(StdStyle.italic(address(0)));
+ console2.log(StdStyle.italic(true));
+ console2.log(StdStyle.italicBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D"));
+ console2.log(StdStyle.italicBytes32("StdStyle.italicBytes32"));
+ console2.log(StdStyle.underline("StdStyle.underline String Test"));
+ console2.log(StdStyle.underline(uint256(10e18)));
+ console2.log(StdStyle.underline(int256(-10e18)));
+ console2.log(StdStyle.underline(address(0)));
+ console2.log(StdStyle.underline(true));
+ console2.log(StdStyle.underlineBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D"));
+ console2.log(StdStyle.underlineBytes32("StdStyle.underlineBytes32"));
+ console2.log(StdStyle.inverse("StdStyle.inverse String Test"));
+ console2.log(StdStyle.inverse(uint256(10e18)));
+ console2.log(StdStyle.inverse(int256(-10e18)));
+ console2.log(StdStyle.inverse(address(0)));
+ console2.log(StdStyle.inverse(true));
+ console2.log(StdStyle.inverseBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D"));
+ console2.log(StdStyle.inverseBytes32("StdStyle.inverseBytes32"));
+ }
+
+ function test_StyleCombined() public pure {
+ console2.log(StdStyle.red(StdStyle.bold("Red Bold String Test")));
+ console2.log(StdStyle.green(StdStyle.dim(uint256(10e18))));
+ console2.log(StdStyle.yellow(StdStyle.italic(int256(-10e18))));
+ console2.log(StdStyle.blue(StdStyle.underline(address(0))));
+ console2.log(StdStyle.magenta(StdStyle.inverse(true)));
+ }
+
+ function test_StyleCustom() public pure {
+ console2.log(h1("Custom Style 1"));
+ console2.log(h2("Custom Style 2"));
+ }
+
+ function h1(string memory a) private pure returns (string memory) {
+ return StdStyle.cyan(StdStyle.inverse(StdStyle.bold(a)));
+ }
+
+ function h2(string memory a) private pure returns (string memory) {
+ return StdStyle.magenta(StdStyle.bold(StdStyle.underline(a)));
+ }
+}
diff --git a/contracts/lib/forge-std/test/StdToml.t.sol b/contracts/lib/forge-std/test/StdToml.t.sol
new file mode 100644
index 0000000..5a45f4f
--- /dev/null
+++ b/contracts/lib/forge-std/test/StdToml.t.sol
@@ -0,0 +1,49 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.7.0 <0.9.0;
+
+import {Test, stdToml} from "../src/Test.sol";
+
+contract StdTomlTest is Test {
+ using stdToml for string;
+
+ string root;
+ string path;
+
+ function setUp() public {
+ root = vm.projectRoot();
+ path = string.concat(root, "/test/fixtures/test.toml");
+ }
+
+ struct SimpleToml {
+ uint256 a;
+ string b;
+ }
+
+ struct NestedToml {
+ uint256 a;
+ string b;
+ SimpleToml c;
+ }
+
+ function test_readToml() public view {
+ string memory json = vm.readFile(path);
+ assertEq(json.readUint(".a"), 123);
+ }
+
+ function test_writeToml() public {
+ string memory json = "json";
+ json.serialize("a", uint256(123));
+ string memory semiFinal = json.serialize("b", string("test"));
+ string memory finalJson = json.serialize("c", semiFinal);
+ finalJson.write(path);
+
+ string memory toml = vm.readFile(path);
+ bytes memory data = toml.parseRaw("$");
+ NestedToml memory decodedData = abi.decode(data, (NestedToml));
+
+ assertEq(decodedData.a, 123);
+ assertEq(decodedData.b, "test");
+ assertEq(decodedData.c.a, 123);
+ assertEq(decodedData.c.b, "test");
+ }
+}
diff --git a/contracts/lib/forge-std/test/StdUtils.t.sol b/contracts/lib/forge-std/test/StdUtils.t.sol
new file mode 100644
index 0000000..bbb7fca
--- /dev/null
+++ b/contracts/lib/forge-std/test/StdUtils.t.sol
@@ -0,0 +1,342 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.7.0 <0.9.0;
+
+import {Test, StdUtils} from "../src/Test.sol";
+
+contract StdUtilsMock is StdUtils {
+ // We deploy a mock version so we can properly test expected reverts.
+ function exposedGetTokenBalances(address token, address[] memory addresses)
+ external
+ returns (uint256[] memory balances)
+ {
+ return getTokenBalances(token, addresses);
+ }
+
+ function exposedBound(int256 num, int256 min, int256 max) external pure returns (int256) {
+ return bound(num, min, max);
+ }
+
+ function exposedBound(uint256 num, uint256 min, uint256 max) external pure returns (uint256) {
+ return bound(num, min, max);
+ }
+
+ function exposedBytesToUint(bytes memory b) external pure returns (uint256) {
+ return bytesToUint(b);
+ }
+}
+
+contract StdUtilsTest is Test {
+ /*//////////////////////////////////////////////////////////////////////////
+ BOUND UINT
+ //////////////////////////////////////////////////////////////////////////*/
+
+ function test_Bound() public pure {
+ assertEq(bound(uint256(5), 0, 4), 0);
+ assertEq(bound(uint256(0), 69, 69), 69);
+ assertEq(bound(uint256(0), 68, 69), 68);
+ assertEq(bound(uint256(10), 150, 190), 174);
+ assertEq(bound(uint256(300), 2800, 3200), 3107);
+ assertEq(bound(uint256(9999), 1337, 6666), 4669);
+ }
+
+ function test_Bound_WithinRange() public pure {
+ assertEq(bound(uint256(51), 50, 150), 51);
+ assertEq(bound(uint256(51), 50, 150), bound(bound(uint256(51), 50, 150), 50, 150));
+ assertEq(bound(uint256(149), 50, 150), 149);
+ assertEq(bound(uint256(149), 50, 150), bound(bound(uint256(149), 50, 150), 50, 150));
+ }
+
+ function test_Bound_EdgeCoverage() public pure {
+ assertEq(bound(uint256(0), 50, 150), 50);
+ assertEq(bound(uint256(1), 50, 150), 51);
+ assertEq(bound(uint256(2), 50, 150), 52);
+ assertEq(bound(uint256(3), 50, 150), 53);
+ assertEq(bound(type(uint256).max, 50, 150), 150);
+ assertEq(bound(type(uint256).max - 1, 50, 150), 149);
+ assertEq(bound(type(uint256).max - 2, 50, 150), 148);
+ assertEq(bound(type(uint256).max - 3, 50, 150), 147);
+ }
+
+ function testFuzz_Bound_DistributionIsEven(uint256 min, uint256 size) public pure {
+ size = size % 100 + 1;
+ min = bound(min, UINT256_MAX / 2, UINT256_MAX / 2 + size);
+ uint256 max = min + size - 1;
+ uint256 result;
+
+ for (uint256 i = 1; i <= size * 4; ++i) {
+ // x > max
+ result = bound(max + i, min, max);
+ assertEq(result, min + (i - 1) % size);
+ // x < min
+ result = bound(min - i, min, max);
+ assertEq(result, max - (i - 1) % size);
+ }
+ }
+
+ function testFuzz_Bound(uint256 num, uint256 min, uint256 max) public pure {
+ if (min > max) (min, max) = (max, min);
+
+ uint256 result = bound(num, min, max);
+
+ assertGe(result, min);
+ assertLe(result, max);
+ assertEq(result, bound(result, min, max));
+ if (num >= min && num <= max) assertEq(result, num);
+ }
+
+ function test_BoundUint256Max() public pure {
+ assertEq(bound(0, type(uint256).max - 1, type(uint256).max), type(uint256).max - 1);
+ assertEq(bound(1, type(uint256).max - 1, type(uint256).max), type(uint256).max);
+ }
+
+ function test_RevertIf_BoundMaxLessThanMin() public {
+ // We deploy a mock version so we can properly test the revert.
+ StdUtilsMock stdUtils = new StdUtilsMock();
+
+ vm.expectRevert(bytes("StdUtils bound(uint256,uint256,uint256): Max is less than min."));
+ stdUtils.exposedBound(uint256(5), 100, 10);
+ }
+
+ function testFuzz_RevertIf_BoundMaxLessThanMin(uint256 num, uint256 min, uint256 max) public {
+ // We deploy a mock version so we can properly test the revert.
+ StdUtilsMock stdUtils = new StdUtilsMock();
+
+ vm.assume(min > max);
+ vm.expectRevert(bytes("StdUtils bound(uint256,uint256,uint256): Max is less than min."));
+ stdUtils.exposedBound(num, min, max);
+ }
+
+ /*//////////////////////////////////////////////////////////////////////////
+ BOUND INT
+ //////////////////////////////////////////////////////////////////////////*/
+
+ function test_BoundInt() public pure {
+ assertEq(bound(-3, 0, 4), 2);
+ assertEq(bound(0, -69, -69), -69);
+ assertEq(bound(0, -69, -68), -68);
+ assertEq(bound(-10, 150, 190), 154);
+ assertEq(bound(-300, 2800, 3200), 2908);
+ assertEq(bound(9999, -1337, 6666), 1995);
+ }
+
+ function test_BoundInt_WithinRange() public pure {
+ assertEq(bound(51, -50, 150), 51);
+ assertEq(bound(51, -50, 150), bound(bound(51, -50, 150), -50, 150));
+ assertEq(bound(149, -50, 150), 149);
+ assertEq(bound(149, -50, 150), bound(bound(149, -50, 150), -50, 150));
+ }
+
+ function test_BoundInt_EdgeCoverage() public pure {
+ assertEq(bound(type(int256).min, -50, 150), -50);
+ assertEq(bound(type(int256).min + 1, -50, 150), -49);
+ assertEq(bound(type(int256).min + 2, -50, 150), -48);
+ assertEq(bound(type(int256).min + 3, -50, 150), -47);
+ assertEq(bound(type(int256).min, 10, 150), 10);
+ assertEq(bound(type(int256).min + 1, 10, 150), 11);
+ assertEq(bound(type(int256).min + 2, 10, 150), 12);
+ assertEq(bound(type(int256).min + 3, 10, 150), 13);
+
+ assertEq(bound(type(int256).max, -50, 150), 150);
+ assertEq(bound(type(int256).max - 1, -50, 150), 149);
+ assertEq(bound(type(int256).max - 2, -50, 150), 148);
+ assertEq(bound(type(int256).max - 3, -50, 150), 147);
+ assertEq(bound(type(int256).max, -50, -10), -10);
+ assertEq(bound(type(int256).max - 1, -50, -10), -11);
+ assertEq(bound(type(int256).max - 2, -50, -10), -12);
+ assertEq(bound(type(int256).max - 3, -50, -10), -13);
+ }
+
+ function testFuzz_BoundInt_DistributionIsEven(int256 min, uint256 size) public pure {
+ size = size % 100 + 1;
+ min = bound(min, -int256(size / 2), int256(size - size / 2));
+ int256 max = min + int256(size) - 1;
+ int256 result;
+
+ for (uint256 i = 1; i <= size * 4; ++i) {
+ // x > max
+ result = bound(max + int256(i), min, max);
+ assertEq(result, min + int256((i - 1) % size));
+ // x < min
+ result = bound(min - int256(i), min, max);
+ assertEq(result, max - int256((i - 1) % size));
+ }
+ }
+
+ function testFuzz_BoundInt(int256 num, int256 min, int256 max) public pure {
+ if (min > max) (min, max) = (max, min);
+
+ int256 result = bound(num, min, max);
+
+ assertGe(result, min);
+ assertLe(result, max);
+ assertEq(result, bound(result, min, max));
+ if (num >= min && num <= max) assertEq(result, num);
+ }
+
+ function test_BoundIntInt256Max() public pure {
+ assertEq(bound(0, type(int256).max - 1, type(int256).max), type(int256).max - 1);
+ assertEq(bound(1, type(int256).max - 1, type(int256).max), type(int256).max);
+ }
+
+ function test_BoundIntInt256Min() public pure {
+ assertEq(bound(0, type(int256).min, type(int256).min + 1), type(int256).min);
+ assertEq(bound(1, type(int256).min, type(int256).min + 1), type(int256).min + 1);
+ }
+
+ function test_RevertIf_BoundIntMaxLessThanMin() public {
+ // We deploy a mock version so we can properly test the revert.
+ StdUtilsMock stdUtils = new StdUtilsMock();
+
+ vm.expectRevert(bytes("StdUtils bound(int256,int256,int256): Max is less than min."));
+ stdUtils.exposedBound(-5, 100, 10);
+ }
+
+ function testFuzz_RevertIf_BoundIntMaxLessThanMin(int256 num, int256 min, int256 max) public {
+ // We deploy a mock version so we can properly test the revert.
+ StdUtilsMock stdUtils = new StdUtilsMock();
+
+ vm.assume(min > max);
+ vm.expectRevert(bytes("StdUtils bound(int256,int256,int256): Max is less than min."));
+ stdUtils.exposedBound(num, min, max);
+ }
+
+ /*//////////////////////////////////////////////////////////////////////////
+ BOUND PRIVATE KEY
+ //////////////////////////////////////////////////////////////////////////*/
+
+ function test_BoundPrivateKey() public pure {
+ assertEq(boundPrivateKey(0), 1);
+ assertEq(boundPrivateKey(1), 1);
+ assertEq(boundPrivateKey(300), 300);
+ assertEq(boundPrivateKey(9999), 9999);
+ assertEq(boundPrivateKey(SECP256K1_ORDER - 1), SECP256K1_ORDER - 1);
+ assertEq(boundPrivateKey(SECP256K1_ORDER), 1);
+ assertEq(boundPrivateKey(SECP256K1_ORDER + 1), 2);
+ assertEq(boundPrivateKey(UINT256_MAX), UINT256_MAX & SECP256K1_ORDER - 1); // x&y is equivalent to x-x%y
+ }
+
+ /*//////////////////////////////////////////////////////////////////////////
+ BYTES TO UINT
+ //////////////////////////////////////////////////////////////////////////*/
+
+ function test_BytesToUint() external pure {
+ bytes memory maxUint = hex"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff";
+ bytes memory two = hex"02";
+ bytes memory millionEther = hex"d3c21bcecceda1000000";
+
+ assertEq(bytesToUint(maxUint), type(uint256).max);
+ assertEq(bytesToUint(two), 2);
+ assertEq(bytesToUint(millionEther), 1_000_000 ether);
+ }
+
+ function test_RevertIf_BytesLengthExceeds32() external {
+ // We deploy a mock version so we can properly test the revert.
+ StdUtilsMock stdUtils = new StdUtilsMock();
+
+ bytes memory thirty3Bytes = hex"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff";
+ vm.expectRevert("StdUtils bytesToUint(bytes): Bytes length exceeds 32.");
+ stdUtils.exposedBytesToUint(thirty3Bytes);
+ }
+
+ /*//////////////////////////////////////////////////////////////////////////
+ COMPUTE CREATE ADDRESS
+ //////////////////////////////////////////////////////////////////////////*/
+
+ function test_ComputeCreateAddress() external pure {
+ address deployer = 0x6C9FC64A53c1b71FB3f9Af64d1ae3A4931A5f4E9;
+ uint256 nonce = 14;
+ address createAddress = computeCreateAddress(deployer, nonce);
+ assertEq(createAddress, 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45);
+ }
+
+ /*//////////////////////////////////////////////////////////////////////////
+ COMPUTE CREATE2 ADDRESS
+ //////////////////////////////////////////////////////////////////////////*/
+
+ function test_ComputeCreate2Address() external pure {
+ bytes32 salt = bytes32(uint256(31415));
+ bytes32 initcodeHash = keccak256(abi.encode(0x6080));
+ address deployer = 0x6C9FC64A53c1b71FB3f9Af64d1ae3A4931A5f4E9;
+ address create2Address = computeCreate2Address(salt, initcodeHash, deployer);
+ assertEq(create2Address, 0xB147a5d25748fda14b463EB04B111027C290f4d3);
+ }
+
+ function test_ComputeCreate2AddressWithDefaultDeployer() external pure {
+ bytes32 salt = 0xc290c670fde54e5ef686f9132cbc8711e76a98f0333a438a92daa442c71403c0;
+ bytes32 initcodeHash = hashInitCode(hex"6080", "");
+ assertEq(initcodeHash, 0x1a578b7a4b0b5755db6d121b4118d4bc68fe170dca840c59bc922f14175a76b0);
+ address create2Address = computeCreate2Address(salt, initcodeHash);
+ assertEq(create2Address, 0xc0ffEe2198a06235aAbFffe5Db0CacF1717f5Ac6);
+ }
+}
+
+contract StdUtilsForkTest is Test {
+ /*//////////////////////////////////////////////////////////////////////////
+ GET TOKEN BALANCES
+ //////////////////////////////////////////////////////////////////////////*/
+
+ address internal SHIB = 0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE;
+ address internal SHIB_HOLDER_0 = 0x855F5981e831D83e6A4b4EBFCAdAa68D92333170;
+ address internal SHIB_HOLDER_1 = 0x8F509A90c2e47779cA408Fe00d7A72e359229AdA;
+ address internal SHIB_HOLDER_2 = 0x0e3bbc0D04fF62211F71f3e4C45d82ad76224385;
+
+ address internal USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
+ address internal USDC_HOLDER_0 = 0xDa9CE944a37d218c3302F6B82a094844C6ECEb17;
+ address internal USDC_HOLDER_1 = 0x3e67F4721E6d1c41a015f645eFa37BEd854fcf52;
+
+ function setUp() public {
+ // All tests of the `getTokenBalances` method are fork tests using live contracts.
+ vm.createSelectFork({urlOrAlias: "mainnet", blockNumber: 16_428_900});
+ }
+
+ function test_RevertIf_CannotGetTokenBalances_NonTokenContract() external {
+ // We deploy a mock version so we can properly test the revert.
+ StdUtilsMock stdUtils = new StdUtilsMock();
+
+ // The UniswapV2Factory contract has neither a `balanceOf` function nor a fallback function,
+ // so the `balanceOf` call should revert.
+ address token = address(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);
+ address[] memory addresses = new address[](1);
+ addresses[0] = USDC_HOLDER_0;
+
+ vm.expectRevert("Multicall3: call failed");
+ stdUtils.exposedGetTokenBalances(token, addresses);
+ }
+
+ function test_RevertIf_CannotGetTokenBalances_EOA() external {
+ // We deploy a mock version so we can properly test the revert.
+ StdUtilsMock stdUtils = new StdUtilsMock();
+
+ address eoa = vm.addr({privateKey: 1});
+ address[] memory addresses = new address[](1);
+ addresses[0] = USDC_HOLDER_0;
+ vm.expectRevert("StdUtils getTokenBalances(address,address[]): Token address is not a contract.");
+ stdUtils.exposedGetTokenBalances(eoa, addresses);
+ }
+
+ function test_GetTokenBalances_Empty() external {
+ address[] memory addresses = new address[](0);
+ uint256[] memory balances = getTokenBalances(USDC, addresses);
+ assertEq(balances.length, 0);
+ }
+
+ function test_GetTokenBalances_USDC() external {
+ address[] memory addresses = new address[](2);
+ addresses[0] = USDC_HOLDER_0;
+ addresses[1] = USDC_HOLDER_1;
+ uint256[] memory balances = getTokenBalances(USDC, addresses);
+ assertEq(balances[0], 159_000_000_000_000);
+ assertEq(balances[1], 131_350_000_000_000);
+ }
+
+ function test_GetTokenBalances_SHIB() external {
+ address[] memory addresses = new address[](3);
+ addresses[0] = SHIB_HOLDER_0;
+ addresses[1] = SHIB_HOLDER_1;
+ addresses[2] = SHIB_HOLDER_2;
+ uint256[] memory balances = getTokenBalances(SHIB, addresses);
+ assertEq(balances[0], 3_323_256_285_484.42e18);
+ assertEq(balances[1], 1_271_702_771_149.99999928e18);
+ assertEq(balances[2], 606_357_106_247e18);
+ }
+}
diff --git a/contracts/lib/forge-std/test/Vm.t.sol b/contracts/lib/forge-std/test/Vm.t.sol
new file mode 100644
index 0000000..4b6e48a
--- /dev/null
+++ b/contracts/lib/forge-std/test/Vm.t.sol
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.8.0 <0.9.0;
+
+import {Test} from "../src/Test.sol";
+import {Vm, VmSafe} from "../src/Vm.sol";
+
+// These tests ensure that functions are never accidentally removed from a Vm interface, or
+// inadvertently moved between Vm and VmSafe. These tests must be updated each time a function is
+// added to or removed from Vm or VmSafe.
+contract VmTest is Test {
+ function test_VmInterfaceId() public pure {
+ assertEq(type(Vm).interfaceId, bytes4(0xe835828d), "Vm");
+ }
+
+ function test_VmSafeInterfaceId() public pure {
+ assertEq(type(VmSafe).interfaceId, bytes4(0x7f58f7be), "VmSafe");
+ }
+}
diff --git a/contracts/lib/forge-std/test/compilation/CompilationScript.sol b/contracts/lib/forge-std/test/compilation/CompilationScript.sol
new file mode 100644
index 0000000..d3d88a0
--- /dev/null
+++ b/contracts/lib/forge-std/test/compilation/CompilationScript.sol
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2 <0.9.0;
+
+pragma experimental ABIEncoderV2;
+
+import {Script} from "../../src/Script.sol";
+
+// The purpose of this contract is to benchmark compilation time to avoid accidentally introducing
+// a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207
+contract CompilationScript is Script {}
diff --git a/contracts/lib/forge-std/test/compilation/CompilationScriptBase.sol b/contracts/lib/forge-std/test/compilation/CompilationScriptBase.sol
new file mode 100644
index 0000000..65b5bed
--- /dev/null
+++ b/contracts/lib/forge-std/test/compilation/CompilationScriptBase.sol
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2 <0.9.0;
+
+pragma experimental ABIEncoderV2;
+
+import {ScriptBase} from "../../src/Script.sol";
+
+// The purpose of this contract is to benchmark compilation time to avoid accidentally introducing
+// a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207
+contract CompilationScriptBase is ScriptBase {}
diff --git a/contracts/lib/forge-std/test/compilation/CompilationTest.sol b/contracts/lib/forge-std/test/compilation/CompilationTest.sol
new file mode 100644
index 0000000..2a9dec5
--- /dev/null
+++ b/contracts/lib/forge-std/test/compilation/CompilationTest.sol
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2 <0.9.0;
+
+pragma experimental ABIEncoderV2;
+
+import {Test} from "../../src/Test.sol";
+
+// The purpose of this contract is to benchmark compilation time to avoid accidentally introducing
+// a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207
+contract CompilationTest is Test {}
diff --git a/contracts/lib/forge-std/test/compilation/CompilationTestBase.sol b/contracts/lib/forge-std/test/compilation/CompilationTestBase.sol
new file mode 100644
index 0000000..32b3fc5
--- /dev/null
+++ b/contracts/lib/forge-std/test/compilation/CompilationTestBase.sol
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: MIT
+pragma solidity >=0.6.2 <0.9.0;
+
+pragma experimental ABIEncoderV2;
+
+import {TestBase} from "../../src/Test.sol";
+
+// The purpose of this contract is to benchmark compilation time to avoid accidentally introducing
+// a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207
+contract CompilationTestBase is TestBase {}
diff --git a/contracts/lib/forge-std/test/fixtures/broadcast.log.json b/contracts/lib/forge-std/test/fixtures/broadcast.log.json
new file mode 100644
index 0000000..0a0200b
--- /dev/null
+++ b/contracts/lib/forge-std/test/fixtures/broadcast.log.json
@@ -0,0 +1,187 @@
+{
+ "transactions": [
+ {
+ "hash": "0xc6006863c267735a11476b7f15b15bc718e117e2da114a2be815dd651e1a509f",
+ "type": "CALL",
+ "contractName": "Test",
+ "contractAddress": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
+ "function": "multiple_arguments(uint256,address,uint256[]):(uint256)",
+ "arguments": ["1", "0000000000000000000000000000000000001337", "[3,4]"],
+ "tx": {
+ "type": "0x02",
+ "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
+ "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
+ "gas": "0x73b9",
+ "value": "0x0",
+ "data": "0x23e99187000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000013370000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004",
+ "nonce": "0x3",
+ "accessList": []
+ }
+ },
+ {
+ "hash": "0xedf2b38d8d896519a947a1acf720f859bb35c0c5ecb8dd7511995b67b9853298",
+ "type": "CALL",
+ "contractName": "Test",
+ "contractAddress": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
+ "function": "inc():(uint256)",
+ "arguments": [],
+ "tx": {
+ "type": "0x02",
+ "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
+ "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
+ "gas": "0xdcb2",
+ "value": "0x0",
+ "data": "0x371303c0",
+ "nonce": "0x4",
+ "accessList": []
+ }
+ },
+ {
+ "hash": "0xa57e8e3981a6c861442e46c9471bd19cb3e21f9a8a6c63a72e7b5c47c6675a7c",
+ "type": "CALL",
+ "contractName": "Test",
+ "contractAddress": "0x7c6b4bbe207d642d98d5c537142d85209e585087",
+ "function": "t(uint256):(uint256)",
+ "arguments": ["1"],
+ "tx": {
+ "type": "0x02",
+ "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
+ "to": "0x7c6b4bbe207d642d98d5c537142d85209e585087",
+ "gas": "0x8599",
+ "value": "0x0",
+ "data": "0xafe29f710000000000000000000000000000000000000000000000000000000000000001",
+ "nonce": "0x5",
+ "accessList": []
+ }
+ }
+ ],
+ "receipts": [
+ {
+ "transactionHash": "0x481dc86e40bba90403c76f8e144aa9ff04c1da2164299d0298573835f0991181",
+ "transactionIndex": "0x0",
+ "blockHash": "0xef0730448490304e5403be0fa8f8ce64f118e9adcca60c07a2ae1ab921d748af",
+ "blockNumber": "0x1",
+ "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
+ "to": null,
+ "cumulativeGasUsed": "0x13f3a",
+ "gasUsed": "0x13f3a",
+ "contractAddress": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
+ "logs": [],
+ "status": "0x1",
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "effectiveGasPrice": "0xee6b2800"
+ },
+ {
+ "transactionHash": "0x6a187183545b8a9e7f1790e847139379bf5622baff2cb43acf3f5c79470af782",
+ "transactionIndex": "0x0",
+ "blockHash": "0xf3acb96a90071640c2a8c067ae4e16aad87e634ea8d8bbbb5b352fba86ba0148",
+ "blockNumber": "0x2",
+ "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
+ "to": null,
+ "cumulativeGasUsed": "0x45d80",
+ "gasUsed": "0x45d80",
+ "contractAddress": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
+ "logs": [],
+ "status": "0x1",
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "effectiveGasPrice": "0xee6b2800"
+ },
+ {
+ "transactionHash": "0x064ad173b4867bdef2fb60060bbdaf01735fbf10414541ea857772974e74ea9d",
+ "transactionIndex": "0x0",
+ "blockHash": "0x8373d02109d3ee06a0225f23da4c161c656ccc48fe0fcee931d325508ae73e58",
+ "blockNumber": "0x3",
+ "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
+ "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c",
+ "cumulativeGasUsed": "0x45feb",
+ "gasUsed": "0x45feb",
+ "contractAddress": null,
+ "logs": [],
+ "status": "0x1",
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "effectiveGasPrice": "0xee6b2800"
+ },
+ {
+ "transactionHash": "0xc6006863c267735a11476b7f15b15bc718e117e2da114a2be815dd651e1a509f",
+ "transactionIndex": "0x0",
+ "blockHash": "0x16712fae5c0e18f75045f84363fb6b4d9a9fe25e660c4ce286833a533c97f629",
+ "blockNumber": "0x4",
+ "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
+ "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
+ "cumulativeGasUsed": "0x5905",
+ "gasUsed": "0x5905",
+ "contractAddress": null,
+ "logs": [],
+ "status": "0x1",
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "effectiveGasPrice": "0xee6b2800"
+ },
+ {
+ "transactionHash": "0xedf2b38d8d896519a947a1acf720f859bb35c0c5ecb8dd7511995b67b9853298",
+ "transactionIndex": "0x0",
+ "blockHash": "0x156b88c3eb9a1244ba00a1834f3f70de735b39e3e59006dd03af4fe7d5480c11",
+ "blockNumber": "0x5",
+ "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
+ "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
+ "cumulativeGasUsed": "0xa9c4",
+ "gasUsed": "0xa9c4",
+ "contractAddress": null,
+ "logs": [],
+ "status": "0x1",
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "effectiveGasPrice": "0xee6b2800"
+ },
+ {
+ "transactionHash": "0xa57e8e3981a6c861442e46c9471bd19cb3e21f9a8a6c63a72e7b5c47c6675a7c",
+ "transactionIndex": "0x0",
+ "blockHash": "0xcf61faca67dbb2c28952b0b8a379e53b1505ae0821e84779679390cb8571cadb",
+ "blockNumber": "0x6",
+ "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
+ "to": "0x7c6b4bbe207d642d98d5c537142d85209e585087",
+ "cumulativeGasUsed": "0x66c5",
+ "gasUsed": "0x66c5",
+ "contractAddress": null,
+ "logs": [
+ {
+ "address": "0x7c6b4bbe207d642d98d5c537142d85209e585087",
+ "topics": [
+ "0x0b2e13ff20ac7b474198655583edf70dedd2c1dc980e329c4fbb2fc0748b796b"
+ ],
+ "data": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000046865726500000000000000000000000000000000000000000000000000000000",
+ "blockHash": "0xcf61faca67dbb2c28952b0b8a379e53b1505ae0821e84779679390cb8571cadb",
+ "blockNumber": "0x6",
+ "transactionHash": "0xa57e8e3981a6c861442e46c9471bd19cb3e21f9a8a6c63a72e7b5c47c6675a7c",
+ "transactionIndex": "0x1",
+ "logIndex": "0x0",
+ "transactionLogIndex": "0x0",
+ "removed": false
+ }
+ ],
+ "status": "0x1",
+ "logsBloom": "0x00000000000800000000000000000010000000000000000000000000000180000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100",
+ "effectiveGasPrice": "0xee6b2800"
+ },
+ {
+ "transactionHash": "0x11fbb10230c168ca1e36a7e5c69a6dbcd04fd9e64ede39d10a83e36ee8065c16",
+ "transactionIndex": "0x0",
+ "blockHash": "0xf1e0ed2eda4e923626ec74621006ed50b3fc27580dc7b4cf68a07ca77420e29c",
+ "blockNumber": "0x7",
+ "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
+ "to": "0x0000000000000000000000000000000000001337",
+ "cumulativeGasUsed": "0x5208",
+ "gasUsed": "0x5208",
+ "contractAddress": null,
+ "logs": [],
+ "status": "0x1",
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "effectiveGasPrice": "0xee6b2800"
+ }
+ ],
+ "libraries": [
+ "src/Broadcast.t.sol:F:0x5fbdb2315678afecb367f032d93f642f64180aa3"
+ ],
+ "pending": [],
+ "path": "broadcast/Broadcast.t.sol/31337/run-latest.json",
+ "returns": {},
+ "timestamp": 1655140035
+}
diff --git a/contracts/lib/forge-std/test/fixtures/config.toml b/contracts/lib/forge-std/test/fixtures/config.toml
new file mode 100644
index 0000000..e6dcccc
--- /dev/null
+++ b/contracts/lib/forge-std/test/fixtures/config.toml
@@ -0,0 +1,81 @@
+# ------------------------------------------------
+# EXAMPLE DEPLOYMENT CONFIG
+# ------------------------------------------------
+
+# -- MAINNET -------------------------------------
+
+[mainnet]
+endpoint_url = "${MAINNET_RPC}"
+
+[mainnet.bool]
+is_live = true
+bool_array = [true, false]
+
+[mainnet.address]
+weth = "${WETH_MAINNET}"
+deps = [
+ "0x0000000000000000000000000000000000000000",
+ "0x1111111111111111111111111111111111111111",
+]
+
+[mainnet.uint]
+number = 1234
+number_array = [5678, 9999]
+
+[mainnet.int]
+signed_number = -1234
+signed_number_array = [-5678, 9999]
+
+[mainnet.bytes32]
+word = "0x00000000000000000000000000000000000000000000000000000000000004d2" # 1234
+word_array = [
+ "0x000000000000000000000000000000000000000000000000000000000000162e", # 5678
+ "0x000000000000000000000000000000000000000000000000000000000000270f", # 9999
+]
+
+[mainnet.bytes]
+b = "0xabcd"
+b_array = ["0xdead", "0xbeef"]
+
+[mainnet.string]
+str = "foo"
+str_array = ["bar", "baz"]
+
+# -- OPTIMISM ------------------------------------
+
+[optimism]
+endpoint_url = "${OPTIMISM_RPC}"
+
+[optimism.bool]
+is_live = false
+bool_array = [false, true]
+
+[optimism.address]
+weth = "${WETH_OPTIMISM}"
+deps = [
+ "0x2222222222222222222222222222222222222222",
+ "0x3333333333333333333333333333333333333333",
+]
+
+[optimism.uint]
+number = 9999
+number_array = [1234, 5678]
+
+[optimism.int]
+signed_number = 9999
+signed_number_array = [-1234, -5678]
+
+[optimism.bytes32]
+word = "0x000000000000000000000000000000000000000000000000000000000000270f" # 9999
+word_array = [
+ "0x00000000000000000000000000000000000000000000000000000000000004d2", # 1234
+ "0x000000000000000000000000000000000000000000000000000000000000162e", # 5678
+]
+
+[optimism.bytes]
+b = "0xdcba"
+b_array = ["0xc0ffee", "0xbabe"]
+
+[optimism.string]
+str = "alice"
+str_array = ["bob", "charlie"]
diff --git a/contracts/lib/forge-std/test/fixtures/test.json b/contracts/lib/forge-std/test/fixtures/test.json
new file mode 100644
index 0000000..caebf6d
--- /dev/null
+++ b/contracts/lib/forge-std/test/fixtures/test.json
@@ -0,0 +1,8 @@
+{
+ "a": 123,
+ "b": "test",
+ "c": {
+ "a": 123,
+ "b": "test"
+ }
+}
\ No newline at end of file
diff --git a/contracts/lib/forge-std/test/fixtures/test.toml b/contracts/lib/forge-std/test/fixtures/test.toml
new file mode 100644
index 0000000..60692bc
--- /dev/null
+++ b/contracts/lib/forge-std/test/fixtures/test.toml
@@ -0,0 +1,6 @@
+a = 123
+b = "test"
+
+[c]
+a = 123
+b = "test"
diff --git a/contracts/script/Counter.s.sol b/contracts/script/Counter.s.sol
new file mode 100644
index 0000000..f01d69c
--- /dev/null
+++ b/contracts/script/Counter.s.sol
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: UNLICENSED
+pragma solidity ^0.8.13;
+
+import {Script} from "forge-std/Script.sol";
+import {Counter} from "../src/Counter.sol";
+
+contract CounterScript is Script {
+ Counter public counter;
+
+ function setUp() public {}
+
+ function run() public {
+ vm.startBroadcast();
+
+ counter = new Counter();
+
+ vm.stopBroadcast();
+ }
+}
diff --git a/contracts/script/Deploy.s.sol b/contracts/script/Deploy.s.sol
new file mode 100644
index 0000000..23f4397
--- /dev/null
+++ b/contracts/script/Deploy.s.sol
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.20;
+
+import "forge-std/Script.sol";
+import "../src/ProofOfHuman.sol";
+import { SelfUtils } from "@selfxyz/contracts/contracts/libraries/SelfUtils.sol";
+
+contract DeployScript is Script {
+ function run() external {
+ uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
+
+ vm.startBroadcast(deployerPrivateKey);
+
+ // Celo Mainnet Hub address
+ address hubAddress = 0xe57F4773bd9c9d8b6Cd70431117d353298B9f5BF;
+
+ // Scope seed
+ string memory scopeSeed = "blockbelle-chat";
+
+ // Verification config: 18+ years old, no country restrictions
+ SelfUtils.UnformattedVerificationConfigV2 memory config = SelfUtils.UnformattedVerificationConfigV2({
+ olderThan: 18,
+ forbiddenCountries: new string[](0),
+ ofacEnabled: false
+ });
+
+ // Deploy the contract
+ ProofOfHuman proofOfHuman = new ProofOfHuman(
+ hubAddress,
+ scopeSeed,
+ config
+ );
+
+ console.log("ProofOfHuman deployed to:", address(proofOfHuman));
+
+ vm.stopBroadcast();
+ }
+}
diff --git a/contracts/src/ProofOfHuman.sol b/contracts/src/ProofOfHuman.sol
new file mode 100644
index 0000000..1391bd2
--- /dev/null
+++ b/contracts/src/ProofOfHuman.sol
@@ -0,0 +1,98 @@
+// SPDX-License-Identifier: MIT
+pragma solidity 0.8.28;
+
+import { SelfVerificationRoot } from "@selfxyz/contracts/contracts/abstract/SelfVerificationRoot.sol";
+import { ISelfVerificationRoot } from "@selfxyz/contracts/contracts/interfaces/ISelfVerificationRoot.sol";
+import { SelfStructs } from "@selfxyz/contracts/contracts/libraries/SelfStructs.sol";
+import { SelfUtils } from "@selfxyz/contracts/contracts/libraries/SelfUtils.sol";
+import { IIdentityVerificationHubV2 } from "@selfxyz/contracts/contracts/interfaces/IIdentityVerificationHubV2.sol";
+
+/**
+ * @title ProofOfHuman
+ * @notice BlockBelle on-chain verification contract - Age 18+ verification
+ * @dev Extends Self Protocol's SelfVerificationRoot for on-chain attestations
+ */
+contract ProofOfHuman is SelfVerificationRoot {
+ // Verification result storage
+ ISelfVerificationRoot.GenericDiscloseOutputV2 public lastOutput;
+ bool public verificationSuccessful;
+ bytes public lastUserData;
+ address public lastUserAddress;
+
+ // Mapping to store verification status for all users
+ mapping(address => bool) public isVerified;
+
+ // Mapping to store verification timestamps
+ mapping(address => uint256) public verificationTimestamp;
+
+ // Verification config storage
+ SelfStructs.VerificationConfigV2 public verificationConfig;
+ bytes32 public verificationConfigId;
+
+ // Events
+ event VerificationCompleted(ISelfVerificationRoot.GenericDiscloseOutputV2 output, bytes userData);
+
+ /**
+ * @notice Constructor for BlockBelle verification
+ * @param identityVerificationHubV2Address The address of the Identity Verification Hub V2
+ * @param scopeSeed The scope seed for this contract
+ * @param _verificationConfig The verification configuration (age 18+)
+ */
+ constructor(
+ address identityVerificationHubV2Address,
+ string memory scopeSeed,
+ SelfUtils.UnformattedVerificationConfigV2 memory _verificationConfig
+ )
+ SelfVerificationRoot(identityVerificationHubV2Address, scopeSeed)
+ {
+ verificationConfig = SelfUtils.formatVerificationConfigV2(_verificationConfig);
+ verificationConfigId =
+ IIdentityVerificationHubV2(identityVerificationHubV2Address).setVerificationConfigV2(verificationConfig);
+ }
+
+ /**
+ * @notice Custom verification hook - stores verification results
+ * @dev This function is called by onVerificationSuccess after hub address validation
+ * @param output The verification output from the hub
+ * @param userData The user data passed through verification
+ */
+ function customVerificationHook(
+ ISelfVerificationRoot.GenericDiscloseOutputV2 memory output,
+ bytes memory userData
+ )
+ internal
+ override
+ {
+ address userAddress = address(uint160(output.userIdentifier));
+
+ // Store verification results
+ verificationSuccessful = true;
+ lastOutput = output;
+ lastUserData = userData;
+ lastUserAddress = userAddress;
+
+ // Mark user as verified in mapping
+ isVerified[userAddress] = true;
+ verificationTimestamp[userAddress] = block.timestamp;
+
+ emit VerificationCompleted(output, userData);
+ }
+
+ /**
+ * @notice Implementation of getConfigId from SelfVerificationRoot
+ * @dev Returns the verification config ID for this contract
+ * @return The verification configuration ID
+ */
+ function getConfigId(
+ bytes32, /* destinationChainId */
+ bytes32, /* userIdentifier */
+ bytes memory /* userDefinedData */
+ )
+ public
+ view
+ override
+ returns (bytes32)
+ {
+ return verificationConfigId;
+ }
+}
diff --git a/contracts/test/Counter.t.sol b/contracts/test/Counter.t.sol
new file mode 100644
index 0000000..4831910
--- /dev/null
+++ b/contracts/test/Counter.t.sol
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: UNLICENSED
+pragma solidity ^0.8.13;
+
+import {Test} from "forge-std/Test.sol";
+import {Counter} from "../src/Counter.sol";
+
+contract CounterTest is Test {
+ Counter public counter;
+
+ function setUp() public {
+ counter = new Counter();
+ counter.setNumber(0);
+ }
+
+ function test_Increment() public {
+ counter.increment();
+ assertEq(counter.number(), 1);
+ }
+
+ function testFuzz_SetNumber(uint256 x) public {
+ counter.setNumber(x);
+ assertEq(counter.number(), x);
+ }
+}
diff --git a/next-frontend/.env.example b/next-frontend/.env.example
deleted file mode 100644
index edc3995..0000000
--- a/next-frontend/.env.example
+++ /dev/null
@@ -1,59 +0,0 @@
-# ============================================
-# SELF PROTOCOL CONFIGURATION
-# ============================================
-# Choose ONE configuration below based on your environment
-
-# ============================================
-# OPTION 1: LOCAL DEVELOPMENT (Testing with Mock Passports)
-# ============================================
-# Uncomment these for local development:
-# NEXT_PUBLIC_SELF_APP_NAME=BlockBelle
-# NEXT_PUBLIC_SELF_SCOPE=blockbelle-chat-dev
-# NEXT_PUBLIC_SELF_ENDPOINT=http://localhost:3000/api/self/verify
-# NEXT_PUBLIC_SELF_ENDPOINT_TYPE=staging_https
-# NEXT_PUBLIC_BASE_URL=http://localhost:3000
-# SELF_SCOPE=blockbelle-chat-dev
-# SELF_ENDPOINT=http://localhost:3000/api/self/verify
-# SELF_USE_MOCK_PASSPORT=true
-
-# ============================================
-# OPTION 2: PRODUCTION (Real Passports - Vercel Deployment)
-# ============================================
-# Use these for production deployment:
-NEXT_PUBLIC_SELF_APP_NAME=BlockBelle
-NEXT_PUBLIC_SELF_SCOPE=blockbelle-chat-prod
-NEXT_PUBLIC_SELF_ENDPOINT=https://your-app.vercel.app/api/self/verify
-NEXT_PUBLIC_SELF_ENDPOINT_TYPE=https
-NEXT_PUBLIC_BASE_URL=https://your-app.vercel.app
-SELF_SCOPE=blockbelle-chat-prod
-SELF_ENDPOINT=https://your-app.vercel.app/api/self/verify
-SELF_USE_MOCK_PASSPORT=false
-
-# ============================================
-# VERCEL POSTGRES DATABASE
-# ============================================
-# These are automatically added by Vercel when you create a Postgres database
-# DO NOT set these manually - Vercel manages them
-# POSTGRES_URL=
-# POSTGRES_PRISMA_URL=
-# POSTGRES_URL_NON_POOLING=
-# POSTGRES_USER=
-# POSTGRES_HOST=
-# POSTGRES_PASSWORD=
-# POSTGRES_DATABASE=
-
-# ============================================
-# DEPLOYMENT INSTRUCTIONS
-# ============================================
-# 1. Deploy to Vercel (it will auto-detect Next.js)
-# 2. In Vercel Dashboard → Storage → Create Postgres Database
-# 3. In Vercel Dashboard → Settings → Environment Variables:
-# - Add all NEXT_PUBLIC_* and SELF_* variables above
-# - Replace "your-app.vercel.app" with your actual Vercel URL
-# 4. Redeploy to apply environment variables
-# 5. Test verification with SELF mobile app
-#
-# CRITICAL FOR PRODUCTION:
-# - SELF_USE_MOCK_PASSPORT must be "false"
-# - NEXT_PUBLIC_SELF_ENDPOINT_TYPE must be "https"
-# - All URLs must be your production domain (not localhost/ngrok)
\ No newline at end of file
diff --git a/next-frontend/.env.production b/next-frontend/.env.production
deleted file mode 100644
index 6e3d7b5..0000000
--- a/next-frontend/.env.production
+++ /dev/null
@@ -1,2 +0,0 @@
-# Workaround for Next.js 16 global-error RSC generation bug on Vercel
-NEXT_PRIVATE_SKIP_GLOBAL_ERROR_PRERENDER=1
\ No newline at end of file
diff --git a/next-frontend/.gitignore b/next-frontend/.gitignore
index c2905bf..66a5c21 100644
--- a/next-frontend/.gitignore
+++ b/next-frontend/.gitignore
@@ -26,7 +26,7 @@ yarn-error.log*
# local env files
.env*.local
-
+.env.production
# vercel
.vercel
diff --git a/next-frontend/build-log.txt b/next-frontend/build-log.txt
deleted file mode 100644
index bf9696b..0000000
Binary files a/next-frontend/build-log.txt and /dev/null differ
diff --git a/next-frontend/build-output.txt b/next-frontend/build-output.txt
deleted file mode 100644
index 2756bbf..0000000
Binary files a/next-frontend/build-output.txt and /dev/null differ
diff --git a/next-frontend/build-test.txt b/next-frontend/build-test.txt
deleted file mode 100644
index 9d546e8..0000000
Binary files a/next-frontend/build-test.txt and /dev/null differ
diff --git a/next-frontend/package-lock.json b/next-frontend/package-lock.json
index e7677a4..7009e08 100644
--- a/next-frontend/package-lock.json
+++ b/next-frontend/package-lock.json
@@ -10,11 +10,9 @@
"dependencies": {
"@heroicons/react": "^2.2.0",
"@rainbow-me/rainbowkit": "^2.2.9",
- "@selfxyz/core": "^1.1.0-beta.7",
"@selfxyz/qrcode": "^1.0.17",
"@tailwindcss/postcss": "^4.1.17",
"@tanstack/react-query": "^5.90.10",
- "@vercel/postgres": "^0.10.0",
"autoprefixer": "^10.4.22",
"ethers": "^6.15.0",
"lucide-react": "^0.554.0",
@@ -52,78 +50,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/@anon-aadhaar/core": {
- "name": "@selfxyz/anon-aadhaar-core",
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/@selfxyz/anon-aadhaar-core/-/anon-aadhaar-core-0.0.1.tgz",
- "integrity": "sha512-fULJGDQsg0fS+ZiGLvb0j+W6NpZHFdLbLTrd0w3ThhcH8pu1unbF/CewpomjWiBVVmBZr/OxsaL7xQXoISa/Sw==",
- "license": "MIT",
- "dependencies": {
- "@pcd/pcd-types": "^0.10.0",
- "@pcd/tsconfig": "^0.6.0",
- "@types/node-forge": "^1.3.8",
- "@types/snarkjs": "^0.7.6",
- "@zk-email/helpers": "^6.1.1",
- "buffer": "^6.0.3",
- "json-bigint": "^1.0.0",
- "localforage": "^1.10.0",
- "pako": "^2.1.0",
- "react": "^18.2.0",
- "react-dom": "^18.2.0",
- "snarkjs": "^0.7.3",
- "styled-components": "^6.0.0-rc.1",
- "uuid": "^9.0.0",
- "valid-url": "^1.0.9",
- "web-worker": "1.2.0"
- }
- },
- "node_modules/@anon-aadhaar/core/node_modules/react": {
- "version": "18.3.1",
- "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
- "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
- "license": "MIT",
- "dependencies": {
- "loose-envify": "^1.1.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/@anon-aadhaar/core/node_modules/react-dom": {
- "version": "18.3.1",
- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
- "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
- "license": "MIT",
- "dependencies": {
- "loose-envify": "^1.1.0",
- "scheduler": "^0.23.2"
- },
- "peerDependencies": {
- "react": "^18.3.1"
- }
- },
- "node_modules/@anon-aadhaar/core/node_modules/scheduler": {
- "version": "0.23.2",
- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",
- "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",
- "license": "MIT",
- "dependencies": {
- "loose-envify": "^1.1.0"
- }
- },
- "node_modules/@anon-aadhaar/core/node_modules/uuid": {
- "version": "9.0.1",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
- "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
- "funding": [
- "https://github.com/sponsors/broofa",
- "https://github.com/sponsors/ctavan"
- ],
- "license": "MIT",
- "bin": {
- "uuid": "dist/bin/uuid"
- }
- },
"node_modules/@babel/runtime": {
"version": "7.28.4",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz",
@@ -415,27 +341,6 @@
"integrity": "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==",
"license": "MIT"
},
- "node_modules/@emotion/is-prop-valid": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz",
- "integrity": "sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==",
- "license": "MIT",
- "dependencies": {
- "@emotion/memoize": "^0.8.1"
- }
- },
- "node_modules/@emotion/memoize": {
- "version": "0.8.1",
- "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz",
- "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==",
- "license": "MIT"
- },
- "node_modules/@emotion/unitless": {
- "version": "0.8.1",
- "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz",
- "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==",
- "license": "MIT"
- },
"node_modules/@ethereumjs/common": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-3.2.0.tgz",
@@ -487,899 +392,144 @@
"node": ">=14"
}
},
- "node_modules/@ethersproject/abi": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.8.0.tgz",
- "integrity": "sha512-b9YS/43ObplgyV6SlyQsG53/vkSal0MNA1fskSC4mbnCMi8R+NkcH8K9FPYNESf6jUefBUniE4SOKms0E/KK1Q==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
+ "node_modules/@gemini-wallet/core": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@gemini-wallet/core/-/core-0.3.2.tgz",
+ "integrity": "sha512-Z4aHi3ECFf5oWYWM3F1rW83GJfB9OvhBYPTmb5q+VyK3uvzvS48lwo+jwh2eOoCRWEuT/crpb9Vwp2QaS5JqgQ==",
"license": "MIT",
"dependencies": {
- "@ethersproject/address": "^5.8.0",
- "@ethersproject/bignumber": "^5.8.0",
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/constants": "^5.8.0",
- "@ethersproject/hash": "^5.8.0",
- "@ethersproject/keccak256": "^5.8.0",
- "@ethersproject/logger": "^5.8.0",
- "@ethersproject/properties": "^5.8.0",
- "@ethersproject/strings": "^5.8.0"
+ "@metamask/rpc-errors": "7.0.2",
+ "eventemitter3": "5.0.1"
+ },
+ "peerDependencies": {
+ "viem": ">=2.0.0"
}
},
- "node_modules/@ethersproject/abstract-provider": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.8.0.tgz",
- "integrity": "sha512-wC9SFcmh4UK0oKuLJQItoQdzS/qZ51EJegK6EmAWlh+OptpQ/npECOR3QqECd8iGHC0RJb4WKbVdSfif4ammrg==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
+ "node_modules/@heroicons/react": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.2.0.tgz",
+ "integrity": "sha512-LMcepvRaS9LYHJGsF0zzmgKCUim/X3N/DQKc4jepAXJ7l8QxJ1PmxJzqplF2Z3FE4PqBAIGyJAQ/w4B5dsqbtQ==",
"license": "MIT",
- "dependencies": {
- "@ethersproject/bignumber": "^5.8.0",
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/logger": "^5.8.0",
- "@ethersproject/networks": "^5.8.0",
- "@ethersproject/properties": "^5.8.0",
- "@ethersproject/transactions": "^5.8.0",
- "@ethersproject/web": "^5.8.0"
+ "peerDependencies": {
+ "react": ">= 16 || ^19.0.0-rc"
}
},
- "node_modules/@ethersproject/abstract-signer": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.8.0.tgz",
- "integrity": "sha512-N0XhZTswXcmIZQdYtUnd79VJzvEwXQw6PK0dTl9VoYrEBxxCPXqS0Eod7q5TNKRxe1/5WUMuR0u0nqTF/avdCA==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
+ "node_modules/@img/colour": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.0.0.tgz",
+ "integrity": "sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==",
"license": "MIT",
- "dependencies": {
- "@ethersproject/abstract-provider": "^5.8.0",
- "@ethersproject/bignumber": "^5.8.0",
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/logger": "^5.8.0",
- "@ethersproject/properties": "^5.8.0"
+ "optional": true,
+ "engines": {
+ "node": ">=18"
}
},
- "node_modules/@ethersproject/address": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.8.0.tgz",
- "integrity": "sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
+ "node_modules/@img/sharp-darwin-arm64": {
+ "version": "0.34.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz",
+ "integrity": "sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==",
+ "cpu": [
+ "arm64"
],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bignumber": "^5.8.0",
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/keccak256": "^5.8.0",
- "@ethersproject/logger": "^5.8.0",
- "@ethersproject/rlp": "^5.8.0"
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-darwin-arm64": "1.2.4"
}
},
- "node_modules/@ethersproject/base64": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.8.0.tgz",
- "integrity": "sha512-lN0oIwfkYj9LbPx4xEkie6rAMJtySbpOAFXSDVQaBnAzYfB4X2Qr+FXJGxMoc3Bxp2Sm8OwvzMrywxyw0gLjIQ==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
+ "node_modules/@img/sharp-darwin-x64": {
+ "version": "0.34.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.5.tgz",
+ "integrity": "sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==",
+ "cpu": [
+ "x64"
],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bytes": "^5.8.0"
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-darwin-x64": "1.2.4"
}
},
- "node_modules/@ethersproject/basex": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.8.0.tgz",
- "integrity": "sha512-PIgTszMlDRmNwW9nhS6iqtVfdTAKosA7llYXNmGPw4YAI1PUyMv28988wAb41/gHF/WqGdoLv0erHaRcHRKW2Q==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
+ "node_modules/@img/sharp-libvips-darwin-arm64": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz",
+ "integrity": "sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==",
+ "cpu": [
+ "arm64"
],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/properties": "^5.8.0"
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
}
},
- "node_modules/@ethersproject/bignumber": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.8.0.tgz",
- "integrity": "sha512-ZyaT24bHaSeJon2tGPKIiHszWjD/54Sz8t57Toch475lCLljC6MgPmxk7Gtzz+ddNN5LuHea9qhAe0x3D+uYPA==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
+ "node_modules/@img/sharp-libvips-darwin-x64": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.4.tgz",
+ "integrity": "sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==",
+ "cpu": [
+ "x64"
],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/logger": "^5.8.0",
- "bn.js": "^5.2.1"
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
}
},
- "node_modules/@ethersproject/bytes": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.8.0.tgz",
- "integrity": "sha512-vTkeohgJVCPVHu5c25XWaWQOZ4v+DkGoC42/TS2ond+PARCxTJvgTFUNDZovyQ/uAQ4EcpqqowKydcdmRKjg7A==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
+ "node_modules/@img/sharp-libvips-linux-arm": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.4.tgz",
+ "integrity": "sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==",
+ "cpu": [
+ "arm"
],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/logger": "^5.8.0"
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
}
},
- "node_modules/@ethersproject/constants": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.8.0.tgz",
- "integrity": "sha512-wigX4lrf5Vu+axVTIvNsuL6YrV4O5AXl5ubcURKMEME5TnWBouUh0CDTWxZ2GpnRn1kcCgE7l8O5+VbV9QTTcg==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
+ "node_modules/@img/sharp-libvips-linux-arm64": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.4.tgz",
+ "integrity": "sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==",
+ "cpu": [
+ "arm64"
],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bignumber": "^5.8.0"
- }
- },
- "node_modules/@ethersproject/contracts": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.8.0.tgz",
- "integrity": "sha512-0eFjGz9GtuAi6MZwhb4uvUM216F38xiuR0yYCjKJpNfSEy4HUM8hvqqBj9Jmm0IUz8l0xKEhWwLIhPgxNY0yvQ==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/abi": "^5.8.0",
- "@ethersproject/abstract-provider": "^5.8.0",
- "@ethersproject/abstract-signer": "^5.8.0",
- "@ethersproject/address": "^5.8.0",
- "@ethersproject/bignumber": "^5.8.0",
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/constants": "^5.8.0",
- "@ethersproject/logger": "^5.8.0",
- "@ethersproject/properties": "^5.8.0",
- "@ethersproject/transactions": "^5.8.0"
- }
- },
- "node_modules/@ethersproject/hash": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.8.0.tgz",
- "integrity": "sha512-ac/lBcTbEWW/VGJij0CNSw/wPcw9bSRgCB0AIBz8CvED/jfvDoV9hsIIiWfvWmFEi8RcXtlNwp2jv6ozWOsooA==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/abstract-signer": "^5.8.0",
- "@ethersproject/address": "^5.8.0",
- "@ethersproject/base64": "^5.8.0",
- "@ethersproject/bignumber": "^5.8.0",
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/keccak256": "^5.8.0",
- "@ethersproject/logger": "^5.8.0",
- "@ethersproject/properties": "^5.8.0",
- "@ethersproject/strings": "^5.8.0"
- }
- },
- "node_modules/@ethersproject/hdnode": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.8.0.tgz",
- "integrity": "sha512-4bK1VF6E83/3/Im0ERnnUeWOY3P1BZml4ZD3wcH8Ys0/d1h1xaFt6Zc+Dh9zXf9TapGro0T4wvO71UTCp3/uoA==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/abstract-signer": "^5.8.0",
- "@ethersproject/basex": "^5.8.0",
- "@ethersproject/bignumber": "^5.8.0",
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/logger": "^5.8.0",
- "@ethersproject/pbkdf2": "^5.8.0",
- "@ethersproject/properties": "^5.8.0",
- "@ethersproject/sha2": "^5.8.0",
- "@ethersproject/signing-key": "^5.8.0",
- "@ethersproject/strings": "^5.8.0",
- "@ethersproject/transactions": "^5.8.0",
- "@ethersproject/wordlists": "^5.8.0"
- }
- },
- "node_modules/@ethersproject/json-wallets": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.8.0.tgz",
- "integrity": "sha512-HxblNck8FVUtNxS3VTEYJAcwiKYsBIF77W15HufqlBF9gGfhmYOJtYZp8fSDZtn9y5EaXTE87zDwzxRoTFk11w==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/abstract-signer": "^5.8.0",
- "@ethersproject/address": "^5.8.0",
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/hdnode": "^5.8.0",
- "@ethersproject/keccak256": "^5.8.0",
- "@ethersproject/logger": "^5.8.0",
- "@ethersproject/pbkdf2": "^5.8.0",
- "@ethersproject/properties": "^5.8.0",
- "@ethersproject/random": "^5.8.0",
- "@ethersproject/strings": "^5.8.0",
- "@ethersproject/transactions": "^5.8.0",
- "aes-js": "3.0.0",
- "scrypt-js": "3.0.1"
- }
- },
- "node_modules/@ethersproject/json-wallets/node_modules/aes-js": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz",
- "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==",
- "license": "MIT"
- },
- "node_modules/@ethersproject/keccak256": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.8.0.tgz",
- "integrity": "sha512-A1pkKLZSz8pDaQ1ftutZoaN46I6+jvuqugx5KYNeQOPqq+JZ0Txm7dlWesCHB5cndJSu5vP2VKptKf7cksERng==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bytes": "^5.8.0",
- "js-sha3": "0.8.0"
- }
- },
- "node_modules/@ethersproject/logger": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.8.0.tgz",
- "integrity": "sha512-Qe6knGmY+zPPWTC+wQrpitodgBfH7XoceCGL5bJVejmH+yCS3R8jJm8iiWuvWbG76RUmyEG53oqv6GMVWqunjA==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT"
- },
- "node_modules/@ethersproject/networks": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.8.0.tgz",
- "integrity": "sha512-egPJh3aPVAzbHwq8DD7Po53J4OUSsA1MjQp8Vf/OZPav5rlmWUaFLiq8cvQiGK0Z5K6LYzm29+VA/p4RL1FzNg==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/logger": "^5.8.0"
- }
- },
- "node_modules/@ethersproject/pbkdf2": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.8.0.tgz",
- "integrity": "sha512-wuHiv97BrzCmfEaPbUFpMjlVg/IDkZThp9Ri88BpjRleg4iePJaj2SW8AIyE8cXn5V1tuAaMj6lzvsGJkGWskg==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/sha2": "^5.8.0"
- }
- },
- "node_modules/@ethersproject/properties": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.8.0.tgz",
- "integrity": "sha512-PYuiEoQ+FMaZZNGrStmN7+lWjlsoufGIHdww7454FIaGdbe/p5rnaCXTr5MtBYl3NkeoVhHZuyzChPeGeKIpQw==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/logger": "^5.8.0"
- }
- },
- "node_modules/@ethersproject/providers": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.8.0.tgz",
- "integrity": "sha512-3Il3oTzEx3o6kzcg9ZzbE+oCZYyY+3Zh83sKkn4s1DZfTUjIegHnN2Cm0kbn9YFy45FDVcuCLLONhU7ny0SsCw==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/abstract-provider": "^5.8.0",
- "@ethersproject/abstract-signer": "^5.8.0",
- "@ethersproject/address": "^5.8.0",
- "@ethersproject/base64": "^5.8.0",
- "@ethersproject/basex": "^5.8.0",
- "@ethersproject/bignumber": "^5.8.0",
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/constants": "^5.8.0",
- "@ethersproject/hash": "^5.8.0",
- "@ethersproject/logger": "^5.8.0",
- "@ethersproject/networks": "^5.8.0",
- "@ethersproject/properties": "^5.8.0",
- "@ethersproject/random": "^5.8.0",
- "@ethersproject/rlp": "^5.8.0",
- "@ethersproject/sha2": "^5.8.0",
- "@ethersproject/strings": "^5.8.0",
- "@ethersproject/transactions": "^5.8.0",
- "@ethersproject/web": "^5.8.0",
- "bech32": "1.1.4",
- "ws": "8.18.0"
- }
- },
- "node_modules/@ethersproject/providers/node_modules/ws": {
- "version": "8.18.0",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz",
- "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==",
- "license": "MIT",
- "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
- }
- }
- },
- "node_modules/@ethersproject/random": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.8.0.tgz",
- "integrity": "sha512-E4I5TDl7SVqyg4/kkA/qTfuLWAQGXmSOgYyO01So8hLfwgKvYK5snIlzxJMk72IFdG/7oh8yuSqY2KX7MMwg+A==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/logger": "^5.8.0"
- }
- },
- "node_modules/@ethersproject/rlp": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.8.0.tgz",
- "integrity": "sha512-LqZgAznqDbiEunaUvykH2JAoXTT9NV0Atqk8rQN9nx9SEgThA/WMx5DnW8a9FOufo//6FZOCHZ+XiClzgbqV9Q==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/logger": "^5.8.0"
- }
- },
- "node_modules/@ethersproject/sha2": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.8.0.tgz",
- "integrity": "sha512-dDOUrXr9wF/YFltgTBYS0tKslPEKr6AekjqDW2dbn1L1xmjGR+9GiKu4ajxovnrDbwxAKdHjW8jNcwfz8PAz4A==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/logger": "^5.8.0",
- "hash.js": "1.1.7"
- }
- },
- "node_modules/@ethersproject/signing-key": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.8.0.tgz",
- "integrity": "sha512-LrPW2ZxoigFi6U6aVkFN/fa9Yx/+4AtIUe4/HACTvKJdhm0eeb107EVCIQcrLZkxaSIgc/eCrX8Q1GtbH+9n3w==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/logger": "^5.8.0",
- "@ethersproject/properties": "^5.8.0",
- "bn.js": "^5.2.1",
- "elliptic": "6.6.1",
- "hash.js": "1.1.7"
- }
- },
- "node_modules/@ethersproject/solidity": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.8.0.tgz",
- "integrity": "sha512-4CxFeCgmIWamOHwYN9d+QWGxye9qQLilpgTU0XhYs1OahkclF+ewO+3V1U0mvpiuQxm5EHHmv8f7ClVII8EHsA==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bignumber": "^5.8.0",
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/keccak256": "^5.8.0",
- "@ethersproject/logger": "^5.8.0",
- "@ethersproject/sha2": "^5.8.0",
- "@ethersproject/strings": "^5.8.0"
- }
- },
- "node_modules/@ethersproject/strings": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.8.0.tgz",
- "integrity": "sha512-qWEAk0MAvl0LszjdfnZ2uC8xbR2wdv4cDabyHiBh3Cldq/T8dPH3V4BbBsAYJUeonwD+8afVXld274Ls+Y1xXg==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/constants": "^5.8.0",
- "@ethersproject/logger": "^5.8.0"
- }
- },
- "node_modules/@ethersproject/transactions": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.8.0.tgz",
- "integrity": "sha512-UglxSDjByHG0TuU17bDfCemZ3AnKO2vYrL5/2n2oXvKzvb7Cz+W9gOWXKARjp2URVwcWlQlPOEQyAviKwT4AHg==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/address": "^5.8.0",
- "@ethersproject/bignumber": "^5.8.0",
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/constants": "^5.8.0",
- "@ethersproject/keccak256": "^5.8.0",
- "@ethersproject/logger": "^5.8.0",
- "@ethersproject/properties": "^5.8.0",
- "@ethersproject/rlp": "^5.8.0",
- "@ethersproject/signing-key": "^5.8.0"
- }
- },
- "node_modules/@ethersproject/units": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.8.0.tgz",
- "integrity": "sha512-lxq0CAnc5kMGIiWW4Mr041VT8IhNM+Pn5T3haO74XZWFulk7wH1Gv64HqE96hT4a7iiNMdOCFEBgaxWuk8ETKQ==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bignumber": "^5.8.0",
- "@ethersproject/constants": "^5.8.0",
- "@ethersproject/logger": "^5.8.0"
- }
- },
- "node_modules/@ethersproject/wallet": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.8.0.tgz",
- "integrity": "sha512-G+jnzmgg6UxurVKRKvw27h0kvG75YKXZKdlLYmAHeF32TGUzHkOFd7Zn6QHOTYRFWnfjtSSFjBowKo7vfrXzPA==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/abstract-provider": "^5.8.0",
- "@ethersproject/abstract-signer": "^5.8.0",
- "@ethersproject/address": "^5.8.0",
- "@ethersproject/bignumber": "^5.8.0",
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/hash": "^5.8.0",
- "@ethersproject/hdnode": "^5.8.0",
- "@ethersproject/json-wallets": "^5.8.0",
- "@ethersproject/keccak256": "^5.8.0",
- "@ethersproject/logger": "^5.8.0",
- "@ethersproject/properties": "^5.8.0",
- "@ethersproject/random": "^5.8.0",
- "@ethersproject/signing-key": "^5.8.0",
- "@ethersproject/transactions": "^5.8.0",
- "@ethersproject/wordlists": "^5.8.0"
- }
- },
- "node_modules/@ethersproject/web": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.8.0.tgz",
- "integrity": "sha512-j7+Ksi/9KfGviws6Qtf9Q7KCqRhpwrYKQPs+JBA/rKVFF/yaWLHJEH3zfVP2plVu+eys0d2DlFmhoQJayFewcw==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/base64": "^5.8.0",
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/logger": "^5.8.0",
- "@ethersproject/properties": "^5.8.0",
- "@ethersproject/strings": "^5.8.0"
- }
- },
- "node_modules/@ethersproject/wordlists": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.8.0.tgz",
- "integrity": "sha512-2df9bbXicZws2Sb5S6ET493uJ0Z84Fjr3pC4tu/qlnZERibZCeUVuqdtt+7Tv9xxhUxHoIekIA7avrKUWHrezg==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/bytes": "^5.8.0",
- "@ethersproject/hash": "^5.8.0",
- "@ethersproject/logger": "^5.8.0",
- "@ethersproject/properties": "^5.8.0",
- "@ethersproject/strings": "^5.8.0"
- }
- },
- "node_modules/@gemini-wallet/core": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/@gemini-wallet/core/-/core-0.3.2.tgz",
- "integrity": "sha512-Z4aHi3ECFf5oWYWM3F1rW83GJfB9OvhBYPTmb5q+VyK3uvzvS48lwo+jwh2eOoCRWEuT/crpb9Vwp2QaS5JqgQ==",
- "license": "MIT",
- "dependencies": {
- "@metamask/rpc-errors": "7.0.2",
- "eventemitter3": "5.0.1"
- },
- "peerDependencies": {
- "viem": ">=2.0.0"
- }
- },
- "node_modules/@heroicons/react": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.2.0.tgz",
- "integrity": "sha512-LMcepvRaS9LYHJGsF0zzmgKCUim/X3N/DQKc4jepAXJ7l8QxJ1PmxJzqplF2Z3FE4PqBAIGyJAQ/w4B5dsqbtQ==",
- "license": "MIT",
- "peerDependencies": {
- "react": ">= 16 || ^19.0.0-rc"
- }
- },
- "node_modules/@iden3/bigarray": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/@iden3/bigarray/-/bigarray-0.0.2.tgz",
- "integrity": "sha512-Xzdyxqm1bOFF6pdIsiHLLl3HkSLjbhqJHVyqaTxXt3RqXBEnmsUmEW47H7VOi/ak7TdkRpNkxjyK5Zbkm+y52g==",
- "license": "GPL-3.0"
- },
- "node_modules/@iden3/binfileutils": {
- "version": "0.0.12",
- "resolved": "https://registry.npmjs.org/@iden3/binfileutils/-/binfileutils-0.0.12.tgz",
- "integrity": "sha512-naAmzuDufRIcoNfQ1d99d7hGHufLA3wZSibtr4dMe6ZeiOPV1KwOZWTJ1YVz4HbaWlpDuzVU72dS4ATQS4PXBQ==",
- "license": "GPL-3.0",
- "dependencies": {
- "fastfile": "0.0.20",
- "ffjavascript": "^0.3.0"
- }
- },
- "node_modules/@iden3/binfileutils/node_modules/ffjavascript": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.3.1.tgz",
- "integrity": "sha512-4PbK1WYodQtuF47D4pRI5KUg3Q392vuP5WjE1THSnceHdXwU3ijaoS0OqxTzLknCtz4Z2TtABzkBdBdMn3B/Aw==",
- "license": "GPL-3.0",
- "dependencies": {
- "wasmbuilder": "0.0.16",
- "wasmcurves": "0.2.2",
- "web-worker": "1.2.0"
- }
- },
- "node_modules/@img/colour": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.0.0.tgz",
- "integrity": "sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==",
- "license": "MIT",
- "optional": true,
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@img/sharp-darwin-arm64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz",
- "integrity": "sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==",
- "cpu": [
- "arm64"
- ],
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-darwin-arm64": "1.2.4"
- }
- },
- "node_modules/@img/sharp-darwin-x64": {
- "version": "0.34.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.5.tgz",
- "integrity": "sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==",
- "cpu": [
- "x64"
- ],
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-darwin-x64": "1.2.4"
- }
- },
- "node_modules/@img/sharp-libvips-darwin-arm64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz",
- "integrity": "sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==",
- "cpu": [
- "arm64"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "darwin"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-darwin-x64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.4.tgz",
- "integrity": "sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==",
- "cpu": [
- "x64"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "darwin"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-arm": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.4.tgz",
- "integrity": "sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==",
- "cpu": [
- "arm"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-arm64": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.4.tgz",
- "integrity": "sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==",
- "cpu": [
- "arm64"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-linux-ppc64": {
@@ -2277,15 +1427,6 @@
"uuid": "dist/bin/uuid"
}
},
- "node_modules/@neondatabase/serverless": {
- "version": "0.9.5",
- "resolved": "https://registry.npmjs.org/@neondatabase/serverless/-/serverless-0.9.5.tgz",
- "integrity": "sha512-siFas6gItqv6wD/pZnvdu34wEqgG3nSE6zWZdq5j2DEsa+VvX8i/5HXJOo06qrw5axPXn+lGCxeR+NLaSPIXug==",
- "license": "MIT",
- "dependencies": {
- "@types/pg": "8.11.6"
- }
- },
"node_modules/@next/env": {
"version": "16.0.3",
"resolved": "https://registry.npmjs.org/@next/env/-/env-16.0.3.tgz",
@@ -2412,251 +1553,58 @@
"x64"
],
"license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@noble/ciphers": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.3.0.tgz",
- "integrity": "sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==",
- "license": "MIT",
- "engines": {
- "node": "^14.21.3 || >=16"
- },
- "funding": {
- "url": "https://paulmillr.com/funding/"
- }
- },
- "node_modules/@noble/curves": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz",
- "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==",
- "license": "MIT",
- "dependencies": {
- "@noble/hashes": "1.3.2"
- },
- "funding": {
- "url": "https://paulmillr.com/funding/"
- }
- },
- "node_modules/@noble/hashes": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz",
- "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==",
- "license": "MIT",
- "engines": {
- "node": ">= 16"
- },
- "funding": {
- "url": "https://paulmillr.com/funding/"
- }
- },
- "node_modules/@openpassport/zk-kit-imt": {
- "version": "0.0.5",
- "resolved": "https://registry.npmjs.org/@openpassport/zk-kit-imt/-/zk-kit-imt-0.0.5.tgz",
- "integrity": "sha512-edri5tUh7SFSOxZCzNGz+2ZqAG6mqOT4EMOw4gh66sBiWU6E6twKrOztx7h2J4HmZjz3hA/LDyL/F4QTUAB2Qg==",
- "license": "MIT",
- "dependencies": {
- "@openpassport/zk-kit-utils": "0.0.1"
- }
- },
- "node_modules/@openpassport/zk-kit-lean-imt": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/@openpassport/zk-kit-lean-imt/-/zk-kit-lean-imt-0.0.6.tgz",
- "integrity": "sha512-KUQ4b5ILubO79vscrOnSnOCyr1AJ3dSKQOJ1PBklIRyFG9CeRTUspnVblSFqrolf8F3dvXX9QDbrkJxK38Gsyg==",
- "license": "MIT",
- "dependencies": {
- "@openpassport/zk-kit-utils": "0.0.1"
- }
- },
- "node_modules/@openpassport/zk-kit-smt": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/@openpassport/zk-kit-smt/-/zk-kit-smt-0.0.1.tgz",
- "integrity": "sha512-P7Hkd5fD8JxGbqJ48lUq6gGKmZTaVzCB5I8FsOSUmljqf7VMeZmbyqo2ZmXt/lk6ltPXrmcrQ+QNhHXKZNcWhg==",
- "license": "MIT"
- },
- "node_modules/@openpassport/zk-kit-utils": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/@openpassport/zk-kit-utils/-/zk-kit-utils-0.0.1.tgz",
- "integrity": "sha512-T7jZ3vn+iCAPnvMS+NLg3Yj4ixF2xXG/geFkyNi48beEFd1hD/2Yca05QP+g2iaJAsIRvllwtni5SuLXGwv5Xw==",
- "license": "MIT",
- "dependencies": {
- "buffer": "^6.0.3"
- }
- },
- "node_modules/@paulmillr/qr": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/@paulmillr/qr/-/qr-0.2.1.tgz",
- "integrity": "sha512-IHnV6A+zxU7XwmKFinmYjUcwlyK9+xkG3/s9KcQhI9BjQKycrJ1JRO+FbNYPwZiPKW3je/DR0k7w8/gLa5eaxQ==",
- "deprecated": "The package is now available as \"qr\": npm install qr",
- "license": "(MIT OR Apache-2.0)",
- "funding": {
- "url": "https://paulmillr.com/funding/"
- }
- },
- "node_modules/@pcd/pcd-types": {
- "version": "0.10.0",
- "resolved": "https://registry.npmjs.org/@pcd/pcd-types/-/pcd-types-0.10.0.tgz",
- "integrity": "sha512-QoBlHYVhNA8nbjpl8hmwHLkV78XolFCC7hdpt0U+STY7dfQO+aAegVYbx18yHo4G76nFj9xRUSfjVFV8ZzxIlQ==",
- "license": "MIT"
- },
- "node_modules/@pcd/tsconfig": {
- "version": "0.6.2",
- "resolved": "https://registry.npmjs.org/@pcd/tsconfig/-/tsconfig-0.6.2.tgz",
- "integrity": "sha512-sdva2fJW+fB1a4xQ63oNhDwSJFrNn1Rc5TyJpuSeRH48U7YAQOYkYiKJz1jlRW6Ak0QJaSDgVhBmzsIE2DmNIg==",
- "license": "MIT"
- },
- "node_modules/@peculiar/asn1-cms": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/@peculiar/asn1-cms/-/asn1-cms-2.6.0.tgz",
- "integrity": "sha512-2uZqP+ggSncESeUF/9Su8rWqGclEfEiz1SyU02WX5fUONFfkjzS2Z/F1Li0ofSmf4JqYXIOdCAZqIXAIBAT1OA==",
- "license": "MIT",
- "dependencies": {
- "@peculiar/asn1-schema": "^2.6.0",
- "@peculiar/asn1-x509": "^2.6.0",
- "@peculiar/asn1-x509-attr": "^2.6.0",
- "asn1js": "^3.0.6",
- "tslib": "^2.8.1"
- }
- },
- "node_modules/@peculiar/asn1-csr": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/@peculiar/asn1-csr/-/asn1-csr-2.6.0.tgz",
- "integrity": "sha512-BeWIu5VpTIhfRysfEp73SGbwjjoLL/JWXhJ/9mo4vXnz3tRGm+NGm3KNcRzQ9VMVqwYS2RHlolz21svzRXIHPQ==",
- "license": "MIT",
- "dependencies": {
- "@peculiar/asn1-schema": "^2.6.0",
- "@peculiar/asn1-x509": "^2.6.0",
- "asn1js": "^3.0.6",
- "tslib": "^2.8.1"
- }
- },
- "node_modules/@peculiar/asn1-ecc": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/@peculiar/asn1-ecc/-/asn1-ecc-2.6.0.tgz",
- "integrity": "sha512-FF3LMGq6SfAOwUG2sKpPXblibn6XnEIKa+SryvUl5Pik+WR9rmRA3OCiwz8R3lVXnYnyRkSZsSLdml8H3UiOcw==",
- "license": "MIT",
- "dependencies": {
- "@peculiar/asn1-schema": "^2.6.0",
- "@peculiar/asn1-x509": "^2.6.0",
- "asn1js": "^3.0.6",
- "tslib": "^2.8.1"
- }
- },
- "node_modules/@peculiar/asn1-pfx": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/@peculiar/asn1-pfx/-/asn1-pfx-2.6.0.tgz",
- "integrity": "sha512-rtUvtf+tyKGgokHHmZzeUojRZJYPxoD/jaN1+VAB4kKR7tXrnDCA/RAWXAIhMJJC+7W27IIRGe9djvxKgsldCQ==",
- "license": "MIT",
- "dependencies": {
- "@peculiar/asn1-cms": "^2.6.0",
- "@peculiar/asn1-pkcs8": "^2.6.0",
- "@peculiar/asn1-rsa": "^2.6.0",
- "@peculiar/asn1-schema": "^2.6.0",
- "asn1js": "^3.0.6",
- "tslib": "^2.8.1"
- }
- },
- "node_modules/@peculiar/asn1-pkcs8": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/@peculiar/asn1-pkcs8/-/asn1-pkcs8-2.6.0.tgz",
- "integrity": "sha512-KyQ4D8G/NrS7Fw3XCJrngxmjwO/3htnA0lL9gDICvEQ+GJ+EPFqldcJQTwPIdvx98Tua+WjkdKHSC0/Km7T+lA==",
- "license": "MIT",
- "dependencies": {
- "@peculiar/asn1-schema": "^2.6.0",
- "@peculiar/asn1-x509": "^2.6.0",
- "asn1js": "^3.0.6",
- "tslib": "^2.8.1"
- }
- },
- "node_modules/@peculiar/asn1-pkcs9": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/@peculiar/asn1-pkcs9/-/asn1-pkcs9-2.6.0.tgz",
- "integrity": "sha512-b78OQ6OciW0aqZxdzliXGYHASeCvvw5caqidbpQRYW2mBtXIX2WhofNXTEe7NyxTb0P6J62kAAWLwn0HuMF1Fw==",
- "license": "MIT",
- "dependencies": {
- "@peculiar/asn1-cms": "^2.6.0",
- "@peculiar/asn1-pfx": "^2.6.0",
- "@peculiar/asn1-pkcs8": "^2.6.0",
- "@peculiar/asn1-schema": "^2.6.0",
- "@peculiar/asn1-x509": "^2.6.0",
- "@peculiar/asn1-x509-attr": "^2.6.0",
- "asn1js": "^3.0.6",
- "tslib": "^2.8.1"
- }
- },
- "node_modules/@peculiar/asn1-rsa": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/@peculiar/asn1-rsa/-/asn1-rsa-2.6.0.tgz",
- "integrity": "sha512-Nu4C19tsrTsCp9fDrH+sdcOKoVfdfoQQ7S3VqjJU6vedR7tY3RLkQ5oguOIB3zFW33USDUuYZnPEQYySlgha4w==",
- "license": "MIT",
- "dependencies": {
- "@peculiar/asn1-schema": "^2.6.0",
- "@peculiar/asn1-x509": "^2.6.0",
- "asn1js": "^3.0.6",
- "tslib": "^2.8.1"
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 10"
}
},
- "node_modules/@peculiar/asn1-schema": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.6.0.tgz",
- "integrity": "sha512-xNLYLBFTBKkCzEZIw842BxytQQATQv+lDTCEMZ8C196iJcJJMBUZxrhSTxLaohMyKK8QlzRNTRkUmanucnDSqg==",
+ "node_modules/@noble/ciphers": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.3.0.tgz",
+ "integrity": "sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==",
"license": "MIT",
- "dependencies": {
- "asn1js": "^3.0.6",
- "pvtsutils": "^1.3.6",
- "tslib": "^2.8.1"
+ "engines": {
+ "node": "^14.21.3 || >=16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
}
},
- "node_modules/@peculiar/asn1-x509": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/@peculiar/asn1-x509/-/asn1-x509-2.6.0.tgz",
- "integrity": "sha512-uzYbPEpoQiBoTq0/+jZtpM6Gq6zADBx+JNFP3yqRgziWBxQ/Dt/HcuvRfm9zJTPdRcBqPNdaRHTVwpyiq6iNMA==",
+ "node_modules/@noble/curves": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz",
+ "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==",
"license": "MIT",
"dependencies": {
- "@peculiar/asn1-schema": "^2.6.0",
- "asn1js": "^3.0.6",
- "pvtsutils": "^1.3.6",
- "tslib": "^2.8.1"
+ "@noble/hashes": "1.3.2"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
}
},
- "node_modules/@peculiar/asn1-x509-attr": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/@peculiar/asn1-x509-attr/-/asn1-x509-attr-2.6.0.tgz",
- "integrity": "sha512-MuIAXFX3/dc8gmoZBkwJWxUWOSvG4MMDntXhrOZpJVMkYX+MYc/rUAU2uJOved9iJEoiUx7//3D8oG83a78UJA==",
+ "node_modules/@noble/hashes": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz",
+ "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==",
"license": "MIT",
- "dependencies": {
- "@peculiar/asn1-schema": "^2.6.0",
- "@peculiar/asn1-x509": "^2.6.0",
- "asn1js": "^3.0.6",
- "tslib": "^2.8.1"
+ "engines": {
+ "node": ">= 16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
}
},
- "node_modules/@peculiar/x509": {
- "version": "1.14.2",
- "resolved": "https://registry.npmjs.org/@peculiar/x509/-/x509-1.14.2.tgz",
- "integrity": "sha512-r2w1Hg6pODDs0zfAKHkSS5HLkOLSeburtcgwvlLLWWCixw+MmW3U6kD5ddyvc2Y2YdbGuVwCF2S2ASoU1cFAag==",
- "license": "MIT",
- "dependencies": {
- "@peculiar/asn1-cms": "^2.6.0",
- "@peculiar/asn1-csr": "^2.6.0",
- "@peculiar/asn1-ecc": "^2.6.0",
- "@peculiar/asn1-pkcs9": "^2.6.0",
- "@peculiar/asn1-rsa": "^2.6.0",
- "@peculiar/asn1-schema": "^2.6.0",
- "@peculiar/asn1-x509": "^2.6.0",
- "pvtsutils": "^1.3.6",
- "reflect-metadata": "^0.2.2",
- "tslib": "^2.8.1",
- "tsyringe": "^4.10.0"
- },
- "engines": {
- "node": ">=22.0.0"
+ "node_modules/@paulmillr/qr": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/@paulmillr/qr/-/qr-0.2.1.tgz",
+ "integrity": "sha512-IHnV6A+zxU7XwmKFinmYjUcwlyK9+xkG3/s9KcQhI9BjQKycrJ1JRO+FbNYPwZiPKW3je/DR0k7w8/gLa5eaxQ==",
+ "deprecated": "The package is now available as \"qr\": npm install qr",
+ "license": "(MIT OR Apache-2.0)",
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
}
},
"node_modules/@rainbow-me/rainbowkit": {
@@ -3832,107 +2780,6 @@
"url": "https://paulmillr.com/funding/"
}
},
- "node_modules/@selfxyz/common": {
- "version": "0.0.9",
- "resolved": "https://registry.npmjs.org/@selfxyz/common/-/common-0.0.9.tgz",
- "integrity": "sha512-DXoDvRSyK3/MdghR2mietlGZXzdpSLU9tg0NUOauO2Ha3J08fXekGBk/zbmlfgSMJ7rxs+yAt7UFJJ84tLrZwA==",
- "license": "MIT",
- "dependencies": {
- "@anon-aadhaar/core": "npm:@selfxyz/anon-aadhaar-core@^0.0.1",
- "@openpassport/zk-kit-imt": "^0.0.5",
- "@openpassport/zk-kit-lean-imt": "^0.0.6",
- "@openpassport/zk-kit-smt": "^0.0.1",
- "@peculiar/x509": "^1.12.3",
- "@stablelib/cbor": "^2.0.1",
- "asn1.js": "^5.4.1",
- "asn1js": "^3.0.5",
- "axios": "^1.7.2",
- "buffer": "^6.0.3",
- "country-emoji": "^1.5.6",
- "country-iso-3-to-2": "^1.1.1",
- "elliptic": "^6.5.5",
- "ethers": "^6.14.4",
- "fs": "^0.0.1-security",
- "hash.js": "^1.1.7",
- "i18n-iso-countries": "^7.13.0",
- "js-sha1": "^0.7.0",
- "js-sha256": "^0.11.0",
- "js-sha512": "^0.9.0",
- "json-to-ts": "^2.1.0",
- "jsrsasign": "^11.1.0",
- "node-forge": "github:remicolin/forge#17a11a632dd0e50343b3b8393245a2696f78afbb",
- "path": "^0.12.7",
- "pkijs": "^3.2.4",
- "poseidon-lite": "^0.2.0",
- "snarkjs": "^0.7.5",
- "typescript-parser": "^2.6.1",
- "uuid": "^11.1.0"
- },
- "engines": {
- "node": ">=22 <23"
- }
- },
- "node_modules/@selfxyz/common/node_modules/node-forge": {
- "version": "1.3.2-0",
- "resolved": "git+ssh://git@github.com/remicolin/forge.git#17a11a632dd0e50343b3b8393245a2696f78afbb",
- "integrity": "sha512-5UV+H8jaqlSbDBhE6ISrjkcTmB8h/HUiZV2iAnS8aCe/fkrkwAMKzHPiDOY/GslJiZLBggInPJQbvVUVqbQuuQ==",
- "license": "(BSD-3-Clause OR GPL-2.0)",
- "engines": {
- "node": ">= 6.13.0"
- }
- },
- "node_modules/@selfxyz/common/node_modules/poseidon-lite": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/poseidon-lite/-/poseidon-lite-0.2.1.tgz",
- "integrity": "sha512-xIr+G6HeYfOhCuswdqcFpSX47SPhm0EpisWJ6h7fHlWwaVIvH3dLnejpatrtw6Xc6HaLrpq05y7VRfvDmDGIog==",
- "license": "MIT"
- },
- "node_modules/@selfxyz/common/node_modules/uuid": {
- "version": "11.1.0",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz",
- "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==",
- "funding": [
- "https://github.com/sponsors/broofa",
- "https://github.com/sponsors/ctavan"
- ],
- "license": "MIT",
- "bin": {
- "uuid": "dist/esm/bin/uuid"
- }
- },
- "node_modules/@selfxyz/core": {
- "version": "1.1.0-beta.7",
- "resolved": "https://registry.npmjs.org/@selfxyz/core/-/core-1.1.0-beta.7.tgz",
- "integrity": "sha512-wnPm+MniQDFf4rRMIgZbZ/wdidkDytk2fuGdNG6Ml8avgIq6fAxax1eMY35v3W1cNNeO09bWZ6N/lflgvsVB7g==",
- "license": "MIT",
- "dependencies": {
- "@selfxyz/common": "^0.0.9",
- "ethers": "^6.13.5",
- "js-sha1": "^0.7.0",
- "js-sha256": "^0.11.0",
- "js-sha512": "^0.9.0",
- "node-forge": "^1.3.1",
- "poseidon-lite": "^0.3.0",
- "snarkjs": "^0.7.4",
- "uuid": "^11.1.0"
- },
- "engines": {
- "node": ">=22 <23"
- }
- },
- "node_modules/@selfxyz/core/node_modules/uuid": {
- "version": "11.1.0",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz",
- "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==",
- "funding": [
- "https://github.com/sponsors/broofa",
- "https://github.com/sponsors/ctavan"
- ],
- "license": "MIT",
- "bin": {
- "uuid": "dist/esm/bin/uuid"
- }
- },
"node_modules/@selfxyz/qrcode": {
"version": "1.0.17",
"resolved": "https://registry.npmjs.org/@selfxyz/qrcode/-/qrcode-1.0.17.tgz",
@@ -4847,72 +3694,6 @@
"typescript": ">=5.3.3"
}
},
- "node_modules/@stablelib/binary": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@stablelib/binary/-/binary-2.0.1.tgz",
- "integrity": "sha512-U9iAO8lXgEDONsA0zPPSgcf3HUBNAqHiJmSHgZz62OvC3Hi2Bhc5kTnQ3S1/L+sthDTHtCMhcEiklmIly6uQ3w==",
- "license": "MIT",
- "dependencies": {
- "@stablelib/int": "^2.0.1"
- }
- },
- "node_modules/@stablelib/bytereader": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@stablelib/bytereader/-/bytereader-2.0.1.tgz",
- "integrity": "sha512-mjLY4ctbIHkmJkDuFQ6Ynu9OSZ90+RNeMQJkGcK0GKeKlwGSBtmJiaNs2492rrxMpvb87KYtpS5NnQdv2WmZXQ==",
- "license": "MIT",
- "dependencies": {
- "@stablelib/binary": "^2.0.1"
- }
- },
- "node_modules/@stablelib/bytewriter": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@stablelib/bytewriter/-/bytewriter-2.0.1.tgz",
- "integrity": "sha512-THzxvTKmjfGwf8goMvbupHYdvAE17w54fdupbCUjSJ2K7nLS8ZE8K859Q+Eo9UOSbkXM8zO4kmZuHnIkP/JcfQ==",
- "license": "MIT",
- "dependencies": {
- "@stablelib/binary": "^2.0.1",
- "@stablelib/int": "^2.0.1",
- "@stablelib/wipe": "^2.0.1"
- }
- },
- "node_modules/@stablelib/cbor": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@stablelib/cbor/-/cbor-2.0.1.tgz",
- "integrity": "sha512-NtJjhlcomRgGHHSjYJ2edE6DRnGf8xw/F0xECfPfPhf43O8GNX+kAyXaDxeJg0nng4jwV34cpiK2pyYF7tWhiA==",
- "license": "MIT",
- "dependencies": {
- "@stablelib/bytereader": "^2.0.1",
- "@stablelib/bytewriter": "^2.0.1",
- "@stablelib/float": "^2.0.1",
- "@stablelib/int": "^2.0.1",
- "@stablelib/utf8": "^2.0.1"
- }
- },
- "node_modules/@stablelib/float": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@stablelib/float/-/float-2.0.1.tgz",
- "integrity": "sha512-iV6fx5ABdFZkn1jJiK3x3NXd/Qj0oQ1JtsYHdzTi2UQ5djCloDnLglYul0Z1E3e8iIaNktCweV0dP1ACDQqeLA==",
- "license": "MIT"
- },
- "node_modules/@stablelib/int": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@stablelib/int/-/int-2.0.1.tgz",
- "integrity": "sha512-Ht63fQp3wz/F8U4AlXEPb7hfJOIILs8Lq55jgtD7KueWtyjhVuzcsGLSTAWtZs3XJDZYdF1WcSKn+kBtbzupww==",
- "license": "MIT"
- },
- "node_modules/@stablelib/utf8": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@stablelib/utf8/-/utf8-2.0.1.tgz",
- "integrity": "sha512-7+C2Iap42fbLyoKMaEIIDSb1TrcQVo+lGDItYAwb2JoAJr7QffyuDnbtvV/qzTyokOIMBrJgT+Rpsp1bPR8SjA==",
- "license": "MIT"
- },
- "node_modules/@stablelib/wipe": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@stablelib/wipe/-/wipe-2.0.1.tgz",
- "integrity": "sha512-1eU2K9EgOcV4qc9jcP6G72xxZxEm5PfeI5H55l08W95b4oRJaqhmlWRc4xZAm6IVSKhVNxMi66V67hCzzuMTAg==",
- "license": "MIT"
- },
"node_modules/@swc/helpers": {
"version": "0.5.15",
"resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz",
@@ -5243,26 +4024,6 @@
"undici-types": "~7.16.0"
}
},
- "node_modules/@types/node-forge": {
- "version": "1.3.14",
- "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.14.tgz",
- "integrity": "sha512-mhVF2BnD4BO+jtOp7z1CdzaK4mbuK0LLQYAvdOLqHTavxFNq4zA1EmYkpnFjP8HOUzedfQkRnp0E2ulSAYSzAw==",
- "license": "MIT",
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@types/pg": {
- "version": "8.11.6",
- "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.11.6.tgz",
- "integrity": "sha512-/2WmmBXHLsfRqzfHW7BNZ8SbYzE8OSk7i3WjFYvfgRHj7S1xj+16Je5fUKv3lVdVzk/zn9TXOqf+avFCFIE0yQ==",
- "license": "MIT",
- "dependencies": {
- "@types/node": "*",
- "pg-protocol": "*",
- "pg-types": "^4.0.1"
- }
- },
"node_modules/@types/prop-types": {
"version": "15.7.15",
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz",
@@ -5291,18 +4052,6 @@
"@types/react": "^18.0.0"
}
},
- "node_modules/@types/snarkjs": {
- "version": "0.7.9",
- "resolved": "https://registry.npmjs.org/@types/snarkjs/-/snarkjs-0.7.9.tgz",
- "integrity": "sha512-pb4Bq3GI2YQOQOG0dR/YuQs/mqcuL6k/vnz68LIPtpA2frrUL3twf69a3AUK9eUmNNeW0RIKkq6scDlC75Is+g==",
- "license": "MIT"
- },
- "node_modules/@types/stylis": {
- "version": "4.2.5",
- "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.5.tgz",
- "integrity": "sha512-1Xve+NMN7FWjY14vLoY5tL3BVEQ/n42YLwaqJIPYhotZ9uBHt87VceMwWQpzmdEt2TNXIorIFG+YeCUUW7RInw==",
- "license": "MIT"
- },
"node_modules/@types/trusted-types": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",
@@ -5368,20 +4117,6 @@
"@vanilla-extract/css": "^1.0.0"
}
},
- "node_modules/@vercel/postgres": {
- "version": "0.10.0",
- "resolved": "https://registry.npmjs.org/@vercel/postgres/-/postgres-0.10.0.tgz",
- "integrity": "sha512-fSD23DxGND40IzSkXjcFcxr53t3Tiym59Is0jSYIFpG4/0f0KO9SGtcp1sXiebvPaGe7N/tU05cH4yt2S6/IPg==",
- "license": "Apache-2.0",
- "dependencies": {
- "@neondatabase/serverless": "^0.9.3",
- "bufferutil": "^4.0.8",
- "ws": "^8.17.1"
- },
- "engines": {
- "node": ">=18.14"
- }
- },
"node_modules/@wagmi/connectors": {
"version": "6.1.4",
"resolved": "https://registry.npmjs.org/@wagmi/connectors/-/connectors-6.1.4.tgz",
@@ -6064,99 +4799,6 @@
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"license": "0BSD"
},
- "node_modules/@zk-email/helpers": {
- "version": "6.4.2",
- "resolved": "https://registry.npmjs.org/@zk-email/helpers/-/helpers-6.4.2.tgz",
- "integrity": "sha512-0S49A5cezcnCR98qAw/zJfjr8l/uFy20BcPxS8ADXNA9RVp4cUB2EQ4imRqnAg8ZoM+C/D+si1h/9KkW9qrJyw==",
- "license": "MIT",
- "dependencies": {
- "addressparser": "^1.0.1",
- "atob": "^2.1.2",
- "circomlibjs": "^0.1.7",
- "libmime": "^5.2.1",
- "localforage": "^1.10.0",
- "node-forge": "^1.3.1",
- "pako": "^2.1.0",
- "psl": "^1.9.0",
- "snarkjs": "https://github.com/sampritipanda/snarkjs.git#fef81fc51d17a734637555c6edbd585ecda02d9e"
- }
- },
- "node_modules/@zk-email/helpers/node_modules/@iden3/binfileutils": {
- "version": "0.0.11",
- "resolved": "https://registry.npmjs.org/@iden3/binfileutils/-/binfileutils-0.0.11.tgz",
- "integrity": "sha512-LylnJoZ0CTdgErnKY8OxohvW4K+p6UHD3sxt+3P9AmMyBQjYR4IpoqoYZZ+9aMj89cmCQ21UvdhndAx04er3NA==",
- "license": "GPL-3.0",
- "dependencies": {
- "fastfile": "0.0.20",
- "ffjavascript": "^0.2.48"
- }
- },
- "node_modules/@zk-email/helpers/node_modules/circom_runtime": {
- "version": "0.1.21",
- "resolved": "https://registry.npmjs.org/circom_runtime/-/circom_runtime-0.1.21.tgz",
- "integrity": "sha512-qTkud630B/GK8y76hnOaaS1aNuF6prfV0dTrkeRsiJKnlP1ryQbP2FWLgDOPqn6aKyaPlam+Z+DTbBhkEzh8dA==",
- "license": "Apache-2.0",
- "dependencies": {
- "ffjavascript": "0.2.56"
- },
- "bin": {
- "calcwit": "calcwit.js"
- }
- },
- "node_modules/@zk-email/helpers/node_modules/ffjavascript": {
- "version": "0.2.56",
- "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.56.tgz",
- "integrity": "sha512-em6G5Lrj7ucIqj4TYEgyoHs/j99Urwwqa4+YxEVY2hggnpRimVj+noX5pZQTxI1pvtiekZI4rG65JBf0xraXrg==",
- "license": "GPL-3.0",
- "dependencies": {
- "wasmbuilder": "0.0.16",
- "wasmcurves": "0.2.0",
- "web-worker": "^1.2.0"
- }
- },
- "node_modules/@zk-email/helpers/node_modules/r1csfile": {
- "version": "0.0.41",
- "resolved": "https://registry.npmjs.org/r1csfile/-/r1csfile-0.0.41.tgz",
- "integrity": "sha512-Q1WDF3u1vYeAwjHo4YuddkA8Aq0TulbKjmGm99+Atn13Lf5fTsMZBnBV9T741w8iSyPFG6Uh6sapQby77sREqA==",
- "license": "GPL-3.0",
- "dependencies": {
- "@iden3/bigarray": "0.0.2",
- "@iden3/binfileutils": "0.0.11",
- "fastfile": "0.0.20",
- "ffjavascript": "0.2.56"
- }
- },
- "node_modules/@zk-email/helpers/node_modules/snarkjs": {
- "version": "0.5.0",
- "resolved": "git+ssh://git@github.com/sampritipanda/snarkjs.git#fef81fc51d17a734637555c6edbd585ecda02d9e",
- "integrity": "sha512-SGOqRmCuQlLDFR/gEzDSo6knTD1BQhKOa3g38qhpDrlMryrTDUkG3lytjpnqngBnqt7T9JBbURs7nIhrG1/Yrg==",
- "license": "GPL-3.0",
- "dependencies": {
- "@iden3/binfileutils": "0.0.11",
- "bfj": "^7.0.2",
- "blake2b-wasm": "^2.4.0",
- "circom_runtime": "0.1.21",
- "ejs": "^3.1.6",
- "fastfile": "0.0.20",
- "ffjavascript": "0.2.56",
- "js-sha3": "^0.8.0",
- "localforage": "^1.10.0",
- "logplease": "^1.2.15",
- "r1csfile": "0.0.41"
- },
- "bin": {
- "snarkjs": "build/cli.cjs"
- }
- },
- "node_modules/@zk-email/helpers/node_modules/wasmcurves": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/wasmcurves/-/wasmcurves-0.2.0.tgz",
- "integrity": "sha512-3e2rbxdujOwaod657gxgmdhZNn+i1qKdHO3Y/bK+8E7bV8ttV/fu5FO4/WLBACF375cK0QDLOP+65Na63qYuWA==",
- "license": "GPL-3.0",
- "dependencies": {
- "wasmbuilder": "0.0.16"
- }
- },
"node_modules/abitype": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/abitype/-/abitype-1.1.0.tgz",
@@ -6178,12 +4820,6 @@
}
}
},
- "node_modules/addressparser": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/addressparser/-/addressparser-1.0.1.tgz",
- "integrity": "sha512-aQX7AISOMM7HFE0iZ3+YnD07oIeJqWGVnJ+ZIKaBZAk03ftmVYVqsGas/rbXKR21n4D/hKCSHypvcyOkds/xzg==",
- "license": "MIT"
- },
"node_modules/aes-js": {
"version": "4.0.0-beta.5",
"resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz",
@@ -6193,178 +4829,50 @@
"node_modules/agentkeepalive": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.6.0.tgz",
- "integrity": "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==",
- "license": "MIT",
- "dependencies": {
- "humanize-ms": "^1.2.1"
- },
- "engines": {
- "node": ">= 8.0.0"
- }
- },
- "node_modules/ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "license": "MIT",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "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==",
- "license": "ISC",
- "dependencies": {
- "normalize-path": "^3.0.0",
- "picomatch": "^2.0.4"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/array-buffer-byte-length": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz",
- "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.3",
- "is-array-buffer": "^3.0.5"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/array-includes": {
- "version": "3.1.9",
- "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz",
- "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==",
- "license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.8",
- "call-bound": "^1.0.4",
- "define-properties": "^1.2.1",
- "es-abstract": "^1.24.0",
- "es-object-atoms": "^1.1.1",
- "get-intrinsic": "^1.3.0",
- "is-string": "^1.1.1",
- "math-intrinsics": "^1.1.0"
+ "integrity": "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==",
+ "license": "MIT",
+ "dependencies": {
+ "humanize-ms": "^1.2.1"
},
"engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
+ "node": ">= 8.0.0"
}
},
- "node_modules/array.prototype.reduce": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/array.prototype.reduce/-/array.prototype.reduce-1.0.8.tgz",
- "integrity": "sha512-DwuEqgXFBwbmZSRqt3BpQigWNUoqw9Ml2dTWdF3B2zQlQX4OeUE0zyuzX0fX0IbTvjdkZbcBTU3idgpO78qkTw==",
+ "node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.8",
- "call-bound": "^1.0.4",
- "define-properties": "^1.2.1",
- "es-abstract": "^1.23.9",
- "es-array-method-boxes-properly": "^1.0.0",
- "es-errors": "^1.3.0",
- "es-object-atoms": "^1.1.1",
- "is-string": "^1.1.1"
- },
"engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
+ "node": ">=8"
}
},
- "node_modules/arraybuffer.prototype.slice": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz",
- "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==",
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"license": "MIT",
"dependencies": {
- "array-buffer-byte-length": "^1.0.1",
- "call-bind": "^1.0.8",
- "define-properties": "^1.2.1",
- "es-abstract": "^1.23.5",
- "es-errors": "^1.3.0",
- "get-intrinsic": "^1.2.6",
- "is-array-buffer": "^3.0.4"
+ "color-convert": "^2.0.1"
},
"engines": {
- "node": ">= 0.4"
+ "node": ">=8"
},
"funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/asn1.js": {
- "version": "5.4.1",
- "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz",
- "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==",
- "license": "MIT",
- "dependencies": {
- "bn.js": "^4.0.0",
- "inherits": "^2.0.1",
- "minimalistic-assert": "^1.0.0",
- "safer-buffer": "^2.1.0"
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
- "node_modules/asn1.js/node_modules/bn.js": {
- "version": "4.12.2",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz",
- "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==",
- "license": "MIT"
- },
- "node_modules/asn1js": {
- "version": "3.0.6",
- "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.6.tgz",
- "integrity": "sha512-UOCGPYbl0tv8+006qks/dTgV9ajs97X2p0FAbyS2iyCRrmLSRolDaHdp+v/CLgnzHc3fVB+CwYiUmei7ndFcgA==",
- "license": "BSD-3-Clause",
+ "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==",
+ "license": "ISC",
"dependencies": {
- "pvtsutils": "^1.3.6",
- "pvutils": "^1.1.3",
- "tslib": "^2.8.1"
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
},
"engines": {
- "node": ">=12.0.0"
- }
- },
- "node_modules/async": {
- "version": "3.2.6",
- "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz",
- "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==",
- "license": "MIT"
- },
- "node_modules/async-function": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz",
- "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
+ "node": ">= 8"
}
},
"node_modules/async-mutex": {
@@ -6382,18 +4890,6 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
"license": "MIT"
},
- "node_modules/atob": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
- "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
- "license": "(MIT OR Apache-2.0)",
- "bin": {
- "atob": "bin/atob.js"
- },
- "engines": {
- "node": ">= 4.5.0"
- }
- },
"node_modules/atomic-sleep": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz",
@@ -6478,26 +4974,6 @@
"axios": "0.x || 1.x"
}
},
- "node_modules/b4a": {
- "version": "1.7.3",
- "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.7.3.tgz",
- "integrity": "sha512-5Q2mfq2WfGuFp3uS//0s6baOJLMoVduPYVeNmDYxu5OUA1/cBfvr2RIS7vi62LdNj/urk1hfmj867I3qt6uZ7Q==",
- "license": "Apache-2.0",
- "peerDependencies": {
- "react-native-b4a": "*"
- },
- "peerDependenciesMeta": {
- "react-native-b4a": {
- "optional": true
- }
- }
- },
- "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==",
- "license": "MIT"
- },
"node_modules/base-x": {
"version": "3.0.11",
"resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz",
@@ -6536,28 +5012,6 @@
"baseline-browser-mapping": "dist/cli.js"
}
},
- "node_modules/bech32": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
- "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==",
- "license": "MIT"
- },
- "node_modules/bfj": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/bfj/-/bfj-7.1.0.tgz",
- "integrity": "sha512-I6MMLkn+anzNdCUp9hMRyui1HaNEUCco50lxbvNS4+EyXg8lN3nJ48PjPWtbH8UVS9CuMoaKE9U2V3l29DaRQw==",
- "license": "MIT",
- "dependencies": {
- "bluebird": "^3.7.2",
- "check-types": "^11.2.3",
- "hoopy": "^0.1.4",
- "jsonpath": "^1.1.1",
- "tryer": "^1.0.1"
- },
- "engines": {
- "node": ">= 8.0.0"
- }
- },
"node_modules/big.js": {
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/big.js/-/big.js-6.2.2.tgz",
@@ -6571,62 +5025,6 @@
"url": "https://opencollective.com/bigjs"
}
},
- "node_modules/bignumber.js": {
- "version": "9.3.1",
- "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz",
- "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==",
- "license": "MIT",
- "engines": {
- "node": "*"
- }
- },
- "node_modules/blake-hash": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/blake-hash/-/blake-hash-2.0.0.tgz",
- "integrity": "sha512-Igj8YowDu1PRkRsxZA7NVkdFNxH5rKv5cpLxQ0CVXSIA77pVYwCPRQJ2sMew/oneUpfuYRyjG6r8SmmmnbZb1w==",
- "hasInstallScript": true,
- "license": "MIT",
- "dependencies": {
- "node-addon-api": "^3.0.0",
- "node-gyp-build": "^4.2.2",
- "readable-stream": "^3.6.0"
- },
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/blake-hash/node_modules/node-addon-api": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz",
- "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==",
- "license": "MIT"
- },
- "node_modules/blake2b": {
- "version": "2.1.4",
- "resolved": "https://registry.npmjs.org/blake2b/-/blake2b-2.1.4.tgz",
- "integrity": "sha512-AyBuuJNI64gIvwx13qiICz6H6hpmjvYS5DGkG6jbXMOT8Z3WUJ3V1X0FlhIoT1b/5JtHE3ki+xjtMvu1nn+t9A==",
- "license": "ISC",
- "dependencies": {
- "blake2b-wasm": "^2.4.0",
- "nanoassert": "^2.0.0"
- }
- },
- "node_modules/blake2b-wasm": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/blake2b-wasm/-/blake2b-wasm-2.4.0.tgz",
- "integrity": "sha512-S1kwmW2ZhZFFFOghcx73+ZajEfKBqhP82JMssxtLVMxlaPea1p9uoLiUZ5WYyHn0KddwbLc+0vh4wR0KBNoT5w==",
- "license": "MIT",
- "dependencies": {
- "b4a": "^1.0.1",
- "nanoassert": "^2.0.0"
- }
- },
- "node_modules/bluebird": {
- "version": "3.7.2",
- "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
- "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
- "license": "MIT"
- },
"node_modules/bn.js": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz",
@@ -6650,21 +5048,6 @@
"integrity": "sha512-z4rE2Gxh7tvshQ4hluIT7XcFrgLIQaw9X3A+kTTRdovCz5PMukm/0QC/BKSYPj3omF5Qfypn9O/c5kgpmvYUCw==",
"license": "MIT"
},
- "node_modules/brace-expansion": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
- "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
- "license": "MIT",
- "dependencies": {
- "balanced-match": "^1.0.0"
- }
- },
- "node_modules/brorand": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
- "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==",
- "license": "MIT"
- },
"node_modules/browserslist": {
"version": "4.28.0",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz",
@@ -6744,15 +5127,6 @@
"node": ">=6.14.2"
}
},
- "node_modules/bytestreamjs": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/bytestreamjs/-/bytestreamjs-2.0.1.tgz",
- "integrity": "sha512-U1Z/ob71V/bXfVABvNr/Kumf5VyeQRBEm6Txb0PQ6S7V5GpBM3w4Cbqz/xPDicR5tN0uvDifng8C+5qECeGwyQ==",
- "license": "BSD-3-Clause",
- "engines": {
- "node": ">=6.0.0"
- }
- },
"node_modules/call-bind": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz",
@@ -6809,15 +5183,6 @@
"node": ">=6"
}
},
- "node_modules/camelize": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.1.tgz",
- "integrity": "sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==",
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/caniuse-lite": {
"version": "1.0.30001756",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001756.tgz",
@@ -6886,12 +5251,6 @@
"node": "*"
}
},
- "node_modules/check-types": {
- "version": "11.2.3",
- "resolved": "https://registry.npmjs.org/check-types/-/check-types-11.2.3.tgz",
- "integrity": "sha512-+67P1GkJRaxQD6PKK0Et9DhwQB+vGg3PM5+aavopCpZT1lj9jeqfvpgTLAWErNj8qApkkmXlu/Ug74kmhagkXg==",
- "license": "MIT"
- },
"node_modules/chokidar": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz",
@@ -6907,89 +5266,6 @@
"url": "https://paulmillr.com/funding/"
}
},
- "node_modules/circom_runtime": {
- "version": "0.1.28",
- "resolved": "https://registry.npmjs.org/circom_runtime/-/circom_runtime-0.1.28.tgz",
- "integrity": "sha512-ACagpQ7zBRLKDl5xRZ4KpmYIcZDUjOiNRuxvXLqhnnlLSVY1Dbvh73TI853nqoR0oEbihtWmMSjgc5f+pXf/jQ==",
- "license": "Apache-2.0",
- "dependencies": {
- "ffjavascript": "0.3.1"
- },
- "bin": {
- "calcwit": "calcwit.js"
- }
- },
- "node_modules/circom_runtime/node_modules/ffjavascript": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.3.1.tgz",
- "integrity": "sha512-4PbK1WYodQtuF47D4pRI5KUg3Q392vuP5WjE1THSnceHdXwU3ijaoS0OqxTzLknCtz4Z2TtABzkBdBdMn3B/Aw==",
- "license": "GPL-3.0",
- "dependencies": {
- "wasmbuilder": "0.0.16",
- "wasmcurves": "0.2.2",
- "web-worker": "1.2.0"
- }
- },
- "node_modules/circomlibjs": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/circomlibjs/-/circomlibjs-0.1.7.tgz",
- "integrity": "sha512-GRAUoAlKAsiiTa+PA725G9RmEmJJRc8tRFxw/zKktUxlQISGznT4hH4ESvW8FNTsrGg/nNd06sGP/Wlx0LUHVg==",
- "license": "GPL-3.0",
- "dependencies": {
- "blake-hash": "^2.0.0",
- "blake2b": "^2.1.3",
- "ethers": "^5.5.1",
- "ffjavascript": "^0.2.45"
- }
- },
- "node_modules/circomlibjs/node_modules/ethers": {
- "version": "5.8.0",
- "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.8.0.tgz",
- "integrity": "sha512-DUq+7fHrCg1aPDFCHx6UIPb3nmt2XMpM7Y/g2gLhsl3lIBqeAfOJIl1qEvRf2uq3BiKxmh6Fh5pfp2ieyek7Kg==",
- "funding": [
- {
- "type": "individual",
- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"
- },
- {
- "type": "individual",
- "url": "https://www.buymeacoffee.com/ricmoo"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "@ethersproject/abi": "5.8.0",
- "@ethersproject/abstract-provider": "5.8.0",
- "@ethersproject/abstract-signer": "5.8.0",
- "@ethersproject/address": "5.8.0",
- "@ethersproject/base64": "5.8.0",
- "@ethersproject/basex": "5.8.0",
- "@ethersproject/bignumber": "5.8.0",
- "@ethersproject/bytes": "5.8.0",
- "@ethersproject/constants": "5.8.0",
- "@ethersproject/contracts": "5.8.0",
- "@ethersproject/hash": "5.8.0",
- "@ethersproject/hdnode": "5.8.0",
- "@ethersproject/json-wallets": "5.8.0",
- "@ethersproject/keccak256": "5.8.0",
- "@ethersproject/logger": "5.8.0",
- "@ethersproject/networks": "5.8.0",
- "@ethersproject/pbkdf2": "5.8.0",
- "@ethersproject/properties": "5.8.0",
- "@ethersproject/providers": "5.8.0",
- "@ethersproject/random": "5.8.0",
- "@ethersproject/rlp": "5.8.0",
- "@ethersproject/sha2": "5.8.0",
- "@ethersproject/signing-key": "5.8.0",
- "@ethersproject/solidity": "5.8.0",
- "@ethersproject/strings": "5.8.0",
- "@ethersproject/transactions": "5.8.0",
- "@ethersproject/units": "5.8.0",
- "@ethersproject/wallet": "5.8.0",
- "@ethersproject/web": "5.8.0",
- "@ethersproject/wordlists": "5.8.0"
- }
- },
"node_modules/client-only": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
@@ -7067,18 +5343,6 @@
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
"license": "MIT"
},
- "node_modules/country-emoji": {
- "version": "1.5.6",
- "resolved": "https://registry.npmjs.org/country-emoji/-/country-emoji-1.5.6.tgz",
- "integrity": "sha512-pSB8OOROfimFc2bcN+H41DuzXYIod/JQ6SgF4pYXkRCm9f8uF1JAJ0vXPhenug6xkpt3Gv33mdypMXB49CJWRA==",
- "license": "MIT"
- },
- "node_modules/country-iso-3-to-2": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/country-iso-3-to-2/-/country-iso-3-to-2-1.1.1.tgz",
- "integrity": "sha512-nirmbzPq5vt40WT9YWrWEvruxNt3h0g/h/k5umfo1ctq0ncw4Kwjd3+MKVL1vp5W5npb/fc3gv4E62xa/PZDiA==",
- "license": "MIT"
- },
"node_modules/crc-32": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
@@ -7118,26 +5382,6 @@
"node": "*"
}
},
- "node_modules/css-color-keywords": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz",
- "integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==",
- "license": "ISC",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/css-to-react-native": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.2.0.tgz",
- "integrity": "sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ==",
- "license": "MIT",
- "dependencies": {
- "camelize": "^1.0.0",
- "css-color-keywords": "^1.0.0",
- "postcss-value-parser": "^4.0.2"
- }
- },
"node_modules/css-what": {
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz",
@@ -7193,57 +5437,6 @@
}
}
},
- "node_modules/data-view-buffer": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz",
- "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.3",
- "es-errors": "^1.3.0",
- "is-data-view": "^1.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/data-view-byte-length": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz",
- "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.3",
- "es-errors": "^1.3.0",
- "is-data-view": "^1.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/inspect-js"
- }
- },
- "node_modules/data-view-byte-offset": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz",
- "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.2",
- "es-errors": "^1.3.0",
- "is-data-view": "^1.0.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/date-fns": {
"version": "2.30.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz",
@@ -7315,12 +5508,6 @@
}
}
},
- "node_modules/deep-is": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
- "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
- "license": "MIT"
- },
"node_modules/deep-object-diff": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/deep-object-diff/-/deep-object-diff-1.1.9.tgz",
@@ -7353,23 +5540,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/define-properties": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",
- "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",
- "license": "MIT",
- "dependencies": {
- "define-data-property": "^1.0.1",
- "has-property-descriptors": "^1.0.0",
- "object-keys": "^1.1.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/defu": {
"version": "6.1.4",
"resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz",
@@ -7433,12 +5603,6 @@
"integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==",
"license": "MIT"
},
- "node_modules/diacritics": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/diacritics/-/diacritics-1.3.0.tgz",
- "integrity": "sha512-wlwEkqcsaxvPJML+rDh/2iS824jbREk6DUMUKkEaSlxdYHeS43cClJtsWglvw2RfeXGm6ohKDqsXteJ5sP5enA==",
- "license": "MIT"
- },
"node_modules/dijkstrajs": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz",
@@ -7515,48 +5679,12 @@
"url": "https://paulmillr.com/funding/"
}
},
- "node_modules/ejs": {
- "version": "3.1.10",
- "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz",
- "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==",
- "license": "Apache-2.0",
- "dependencies": {
- "jake": "^10.8.5"
- },
- "bin": {
- "ejs": "bin/cli.js"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/electron-to-chromium": {
"version": "1.5.256",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.256.tgz",
"integrity": "sha512-uqYq1IQhpXXLX+HgiXdyOZml7spy4xfy42yPxcCCRjswp0fYM2X+JwCON07lqnpLEGVCj739B7Yr+FngmHBMEQ==",
"license": "ISC"
},
- "node_modules/elliptic": {
- "version": "6.6.1",
- "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz",
- "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==",
- "license": "MIT",
- "dependencies": {
- "bn.js": "^4.11.9",
- "brorand": "^1.1.0",
- "hash.js": "^1.0.0",
- "hmac-drbg": "^1.0.1",
- "inherits": "^2.0.4",
- "minimalistic-assert": "^1.0.1",
- "minimalistic-crypto-utils": "^1.0.1"
- }
- },
- "node_modules/elliptic/node_modules/bn.js": {
- "version": "4.12.2",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz",
- "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==",
- "license": "MIT"
- },
"node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
@@ -7569,15 +5697,6 @@
"integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==",
"license": "MIT"
},
- "node_modules/encoding-japanese": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/encoding-japanese/-/encoding-japanese-2.2.0.tgz",
- "integrity": "sha512-EuJWwlHPZ1LbADuKTClvHtwbaFn4rOD+dRAbWysqEOXRc2Uui0hJInNJrsdH0c+OhJA4nrCBdSkW4DD5YxAo6A==",
- "license": "MIT",
- "engines": {
- "node": ">=8.10.0"
- }
- },
"node_modules/end-of-stream": {
"version": "1.4.5",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz",
@@ -7622,80 +5741,6 @@
"node": ">=10.13.0"
}
},
- "node_modules/es-abstract": {
- "version": "1.24.0",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz",
- "integrity": "sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==",
- "license": "MIT",
- "dependencies": {
- "array-buffer-byte-length": "^1.0.2",
- "arraybuffer.prototype.slice": "^1.0.4",
- "available-typed-arrays": "^1.0.7",
- "call-bind": "^1.0.8",
- "call-bound": "^1.0.4",
- "data-view-buffer": "^1.0.2",
- "data-view-byte-length": "^1.0.2",
- "data-view-byte-offset": "^1.0.1",
- "es-define-property": "^1.0.1",
- "es-errors": "^1.3.0",
- "es-object-atoms": "^1.1.1",
- "es-set-tostringtag": "^2.1.0",
- "es-to-primitive": "^1.3.0",
- "function.prototype.name": "^1.1.8",
- "get-intrinsic": "^1.3.0",
- "get-proto": "^1.0.1",
- "get-symbol-description": "^1.1.0",
- "globalthis": "^1.0.4",
- "gopd": "^1.2.0",
- "has-property-descriptors": "^1.0.2",
- "has-proto": "^1.2.0",
- "has-symbols": "^1.1.0",
- "hasown": "^2.0.2",
- "internal-slot": "^1.1.0",
- "is-array-buffer": "^3.0.5",
- "is-callable": "^1.2.7",
- "is-data-view": "^1.0.2",
- "is-negative-zero": "^2.0.3",
- "is-regex": "^1.2.1",
- "is-set": "^2.0.3",
- "is-shared-array-buffer": "^1.0.4",
- "is-string": "^1.1.1",
- "is-typed-array": "^1.1.15",
- "is-weakref": "^1.1.1",
- "math-intrinsics": "^1.1.0",
- "object-inspect": "^1.13.4",
- "object-keys": "^1.1.1",
- "object.assign": "^4.1.7",
- "own-keys": "^1.0.1",
- "regexp.prototype.flags": "^1.5.4",
- "safe-array-concat": "^1.1.3",
- "safe-push-apply": "^1.0.0",
- "safe-regex-test": "^1.1.0",
- "set-proto": "^1.0.0",
- "stop-iteration-iterator": "^1.1.0",
- "string.prototype.trim": "^1.2.10",
- "string.prototype.trimend": "^1.0.9",
- "string.prototype.trimstart": "^1.0.8",
- "typed-array-buffer": "^1.0.3",
- "typed-array-byte-length": "^1.0.3",
- "typed-array-byte-offset": "^1.0.4",
- "typed-array-length": "^1.0.7",
- "unbox-primitive": "^1.1.0",
- "which-typed-array": "^1.1.19"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/es-array-method-boxes-properly": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz",
- "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==",
- "license": "MIT"
- },
"node_modules/es-define-property": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
@@ -7741,23 +5786,6 @@
"node": ">= 0.4"
}
},
- "node_modules/es-to-primitive": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz",
- "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==",
- "license": "MIT",
- "dependencies": {
- "is-callable": "^1.2.7",
- "is-date-object": "^1.0.5",
- "is-symbol": "^1.0.4"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/es-toolkit": {
"version": "1.33.0",
"resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.33.0.tgz",
@@ -7783,26 +5811,6 @@
"es6-promise": "^4.0.3"
}
},
- "node_modules/es7-shim": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/es7-shim/-/es7-shim-6.0.0.tgz",
- "integrity": "sha512-aiQ/QyJBVJbabtsSediM1S4qI+P3p8F5J5YR5o/bH003BCnnclzxK9pi5Qd2Hg01ktAtZCaQBdejHrkOBGwf5Q==",
- "license": "MIT",
- "dependencies": {
- "array-includes": "^3.0.2",
- "object.entries": "^1.0.3",
- "object.getownpropertydescriptors": "^2.0.2",
- "object.values": "^1.0.3",
- "string-at": "^1.0.1",
- "string.prototype.padend": "^3.0.0",
- "string.prototype.padstart": "^3.0.0",
- "string.prototype.trimleft": "^2.0.0",
- "string.prototype.trimright": "^2.0.0"
- },
- "engines": {
- "node": ">=0.4.0"
- }
- },
"node_modules/escalade": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
@@ -7812,71 +5820,6 @@
"node": ">=6"
}
},
- "node_modules/escodegen": {
- "version": "1.14.3",
- "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz",
- "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==",
- "license": "BSD-2-Clause",
- "dependencies": {
- "esprima": "^4.0.1",
- "estraverse": "^4.2.0",
- "esutils": "^2.0.2",
- "optionator": "^0.8.1"
- },
- "bin": {
- "escodegen": "bin/escodegen.js",
- "esgenerate": "bin/esgenerate.js"
- },
- "engines": {
- "node": ">=4.0"
- },
- "optionalDependencies": {
- "source-map": "~0.6.1"
- }
- },
- "node_modules/escodegen/node_modules/esprima": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
- "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
- "license": "BSD-2-Clause",
- "bin": {
- "esparse": "bin/esparse.js",
- "esvalidate": "bin/esvalidate.js"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/esprima": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz",
- "integrity": "sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A==",
- "bin": {
- "esparse": "bin/esparse.js",
- "esvalidate": "bin/esvalidate.js"
- },
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/estraverse": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
- "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
- "license": "BSD-2-Clause",
- "engines": {
- "node": ">=4.0"
- }
- },
- "node_modules/esutils": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
- "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
- "license": "BSD-2-Clause",
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/eth-block-tracker": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-7.1.0.tgz",
@@ -8134,12 +6077,6 @@
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"license": "MIT"
},
- "node_modules/fast-levenshtein": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
- "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
- "license": "MIT"
- },
"node_modules/fast-redact": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.5.0.tgz",
@@ -8168,32 +6105,6 @@
"license": "CC0-1.0",
"peer": true
},
- "node_modules/fastfile": {
- "version": "0.0.20",
- "resolved": "https://registry.npmjs.org/fastfile/-/fastfile-0.0.20.tgz",
- "integrity": "sha512-r5ZDbgImvVWCP0lA/cGNgQcZqR+aYdFx3u+CtJqUE510pBUVGMn4ulL/iRTI4tACTYsNJ736uzFxEBXesPAktA==",
- "license": "GPL-3.0"
- },
- "node_modules/ffjavascript": {
- "version": "0.2.63",
- "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.63.tgz",
- "integrity": "sha512-dBgdsfGks58b66JnUZeZpGxdMIDQ4QsD3VYlRJyFVrKQHb2kJy4R2gufx5oetrTxXPT+aEjg0dOvOLg1N0on4A==",
- "license": "GPL-3.0",
- "dependencies": {
- "wasmbuilder": "0.0.16",
- "wasmcurves": "0.2.2",
- "web-worker": "1.2.0"
- }
- },
- "node_modules/filelist": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz",
- "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==",
- "license": "Apache-2.0",
- "dependencies": {
- "minimatch": "^5.0.1"
- }
- },
"node_modules/filter-obj": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz",
@@ -8280,12 +6191,6 @@
"url": "https://github.com/sponsors/rawify"
}
},
- "node_modules/fs": {
- "version": "0.0.1-security",
- "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
- "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==",
- "license": "ISC"
- },
"node_modules/function-bind": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
@@ -8295,35 +6200,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/function.prototype.name": {
- "version": "1.1.8",
- "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz",
- "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==",
- "license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.8",
- "call-bound": "^1.0.3",
- "define-properties": "^1.2.1",
- "functions-have-names": "^1.2.3",
- "hasown": "^2.0.2",
- "is-callable": "^1.2.7"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/functions-have-names": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz",
- "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/generator-function": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz",
@@ -8388,39 +6264,6 @@
"node": ">= 0.4"
}
},
- "node_modules/get-symbol-description": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz",
- "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.3",
- "es-errors": "^1.3.0",
- "get-intrinsic": "^1.2.6"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/globalthis": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",
- "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==",
- "license": "MIT",
- "dependencies": {
- "define-properties": "^1.2.1",
- "gopd": "^1.0.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/gopd": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
@@ -8456,18 +6299,6 @@
"uncrypto": "^0.1.3"
}
},
- "node_modules/has-bigints": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz",
- "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/has-property-descriptors": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
@@ -8480,21 +6311,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/has-proto": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz",
- "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==",
- "license": "MIT",
- "dependencies": {
- "dunder-proto": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/has-symbols": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
@@ -8522,16 +6338,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/hash.js": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
- "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
- "license": "MIT",
- "dependencies": {
- "inherits": "^2.0.3",
- "minimalistic-assert": "^1.0.1"
- }
- },
"node_modules/hasown": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
@@ -8544,17 +6350,6 @@
"node": ">= 0.4"
}
},
- "node_modules/hmac-drbg": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
- "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==",
- "license": "MIT",
- "dependencies": {
- "hash.js": "^1.0.3",
- "minimalistic-assert": "^1.0.0",
- "minimalistic-crypto-utils": "^1.0.1"
- }
- },
"node_modules/hono": {
"version": "4.10.6",
"resolved": "https://registry.npmjs.org/hono/-/hono-4.10.6.tgz",
@@ -8564,15 +6359,6 @@
"node": ">=16.9.0"
}
},
- "node_modules/hoopy": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz",
- "integrity": "sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==",
- "license": "MIT",
- "engines": {
- "node": ">= 6.0.0"
- }
- },
"node_modules/humanize-ms": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
@@ -8582,30 +6368,6 @@
"ms": "^2.0.0"
}
},
- "node_modules/i18n-iso-countries": {
- "version": "7.14.0",
- "resolved": "https://registry.npmjs.org/i18n-iso-countries/-/i18n-iso-countries-7.14.0.tgz",
- "integrity": "sha512-nXHJZYtNrfsi1UQbyRqm3Gou431elgLjKl//CYlnBGt5aTWdRPH1PiS2T/p/n8Q8LnqYqzQJik3Q7mkwvLokeg==",
- "license": "MIT",
- "dependencies": {
- "diacritics": "1.3.0"
- },
- "engines": {
- "node": ">= 12"
- }
- },
- "node_modules/iconv-lite": {
- "version": "0.6.3",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
- "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
- "license": "MIT",
- "dependencies": {
- "safer-buffer": ">= 2.1.2 < 3.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/idb-keyval": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/idb-keyval/-/idb-keyval-6.2.1.tgz",
@@ -8625,128 +6387,41 @@
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "BSD-3-Clause"
- },
- "node_modules/ignore-loader": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/ignore-loader/-/ignore-loader-0.1.2.tgz",
- "integrity": "sha512-yOJQEKrNwoYqrWLS4DcnzM7SEQhRKis5mB+LdKKh4cPmGYlLPR0ozRzHV5jmEk2IxptqJNQA5Cc0gw8Fj12bXA==",
- "dev": true
- },
- "node_modules/immediate": {
- "version": "3.0.6",
- "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
- "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==",
- "license": "MIT"
- },
- "node_modules/inherits": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
- "license": "ISC"
- },
- "node_modules/internal-slot": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz",
- "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==",
- "license": "MIT",
- "dependencies": {
- "es-errors": "^1.3.0",
- "hasown": "^2.0.2",
- "side-channel": "^1.1.0"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/iron-webcrypto": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz",
- "integrity": "sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==",
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/brc-dd"
- }
- },
- "node_modules/is-arguments": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz",
- "integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.2",
- "has-tostringtag": "^1.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-array-buffer": {
- "version": "3.0.5",
- "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz",
- "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==",
- "license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.8",
- "call-bound": "^1.0.3",
- "get-intrinsic": "^1.2.6"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "BSD-3-Clause"
},
- "node_modules/is-async-function": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz",
- "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==",
- "license": "MIT",
- "dependencies": {
- "async-function": "^1.0.0",
- "call-bound": "^1.0.3",
- "get-proto": "^1.0.1",
- "has-tostringtag": "^1.0.2",
- "safe-regex-test": "^1.1.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
+ "node_modules/ignore-loader": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/ignore-loader/-/ignore-loader-0.1.2.tgz",
+ "integrity": "sha512-yOJQEKrNwoYqrWLS4DcnzM7SEQhRKis5mB+LdKKh4cPmGYlLPR0ozRzHV5jmEk2IxptqJNQA5Cc0gw8Fj12bXA==",
+ "dev": true
},
- "node_modules/is-bigint": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz",
- "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==",
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "license": "ISC"
+ },
+ "node_modules/iron-webcrypto": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz",
+ "integrity": "sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==",
"license": "MIT",
- "dependencies": {
- "has-bigints": "^1.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- },
"funding": {
- "url": "https://github.com/sponsors/ljharb"
+ "url": "https://github.com/sponsors/brc-dd"
}
},
- "node_modules/is-boolean-object": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz",
- "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==",
+ "node_modules/is-arguments": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz",
+ "integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==",
"license": "MIT",
"dependencies": {
- "call-bound": "^1.0.3",
+ "call-bound": "^1.0.2",
"has-tostringtag": "^1.0.2"
},
"engines": {
@@ -8774,54 +6449,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/is-data-view": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz",
- "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.2",
- "get-intrinsic": "^1.2.6",
- "is-typed-array": "^1.1.13"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-date-object": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz",
- "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.2",
- "has-tostringtag": "^1.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-finalizationregistry": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz",
- "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.3"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
@@ -8850,46 +6477,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/is-map": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz",
- "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-negative-zero": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz",
- "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-number-object": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz",
- "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.3",
- "has-tostringtag": "^1.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/is-regex": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz",
@@ -8920,33 +6507,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/is-set": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz",
- "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-shared-array-buffer": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz",
- "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.3"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/is-stream": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
@@ -8959,39 +6519,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/is-string": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz",
- "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.3",
- "has-tostringtag": "^1.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-symbol": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz",
- "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.2",
- "has-symbols": "^1.1.0",
- "safe-regex-test": "^1.1.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/is-typed-array": {
"version": "1.1.15",
"resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz",
@@ -9007,49 +6534,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/is-weakmap": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz",
- "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-weakref": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz",
- "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.3"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-weakset": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz",
- "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.3",
- "get-intrinsic": "^1.2.6"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/isarray": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
@@ -9080,23 +6564,6 @@
"ws": "*"
}
},
- "node_modules/jake": {
- "version": "10.9.4",
- "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.4.tgz",
- "integrity": "sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==",
- "license": "Apache-2.0",
- "dependencies": {
- "async": "^3.2.6",
- "filelist": "^1.0.4",
- "picocolors": "^1.1.1"
- },
- "bin": {
- "jake": "bin/cli.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
"node_modules/jayson": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/jayson/-/jayson-4.2.0.tgz",
@@ -9186,33 +6653,12 @@
"integrity": "sha512-o6WSo/LUvY2uC4j7mO50a2ms7E/EAdbP0swigLV+nzHKTTaYnaLIWJ02VdXrsJX0vGedDESQnLsOekr94ryfjg==",
"license": "MIT"
},
- "node_modules/js-sha3": {
- "version": "0.8.0",
- "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz",
- "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==",
- "license": "MIT"
- },
"node_modules/js-sha512": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/js-sha512/-/js-sha512-0.9.0.tgz",
"integrity": "sha512-mirki9WS/SUahm+1TbAPkqvbCiCfOAAsyXeHxK1UkullnJVVqoJG2pL9ObvT05CN+tM7fxhfYm0NbXn+1hWoZg==",
"license": "MIT"
},
- "node_modules/js-tokens": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
- "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
- "license": "MIT"
- },
- "node_modules/json-bigint": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz",
- "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==",
- "license": "MIT",
- "dependencies": {
- "bignumber.js": "^9.0.0"
- }
- },
"node_modules/json-rpc-engine": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-6.1.0.tgz",
@@ -9244,37 +6690,6 @@
"integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",
"license": "ISC"
},
- "node_modules/json-to-ts": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/json-to-ts/-/json-to-ts-2.1.0.tgz",
- "integrity": "sha512-JeScjtIGYAxQVxEYgQUKROU0329eS+rsTSviGtuKiwKuXpcIU7DxhDYm2tey0vcBetwc9kD0+YHDI5KvEexMew==",
- "license": "ISC",
- "dependencies": {
- "es7-shim": "^6.0.0",
- "hash.js": "^1.0.3",
- "pluralize": "^3.1.0"
- }
- },
- "node_modules/jsonpath": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.1.1.tgz",
- "integrity": "sha512-l6Cg7jRpixfbgoWgkrl77dgEj8RPvND0wMH6TwQmi9Qs4TFfS9u5cUFnbeKTwj5ga5Y3BTGGNI28k117LJ009w==",
- "license": "MIT",
- "dependencies": {
- "esprima": "1.2.2",
- "static-eval": "2.0.2",
- "underscore": "1.12.1"
- }
- },
- "node_modules/jsrsasign": {
- "version": "11.1.0",
- "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-11.1.0.tgz",
- "integrity": "sha512-Ov74K9GihaK9/9WncTe1mPmvrO7Py665TUfUKvraXBpu+xcTWitrtuOwcjf4KMU9maPaYn0OuaWy0HOzy/GBXg==",
- "license": "MIT",
- "funding": {
- "url": "https://github.com/kjur/jsrsasign#donations"
- }
- },
"node_modules/keccak": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz",
@@ -9296,52 +6711,6 @@
"integrity": "sha512-8t6Q3TclQ4uZynJY9IGr2+SsIGwK9JHcO6ootkHCGA0CrQCRy+VkouYNO2xicET6b9al7QKzpebNow+gkpCL8g==",
"license": "MIT"
},
- "node_modules/levn": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
- "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==",
- "license": "MIT",
- "dependencies": {
- "prelude-ls": "~1.1.2",
- "type-check": "~0.3.2"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/libbase64": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/libbase64/-/libbase64-1.3.0.tgz",
- "integrity": "sha512-GgOXd0Eo6phYgh0DJtjQ2tO8dc0IVINtZJeARPeiIJqge+HdsWSuaDTe8ztQ7j/cONByDZ3zeB325AHiv5O0dg==",
- "license": "MIT"
- },
- "node_modules/libmime": {
- "version": "5.3.7",
- "resolved": "https://registry.npmjs.org/libmime/-/libmime-5.3.7.tgz",
- "integrity": "sha512-FlDb3Wtha8P01kTL3P9M+ZDNDWPKPmKHWaU/cG/lg5pfuAwdflVpZE+wm9m7pKmC5ww6s+zTxBKS1p6yl3KpSw==",
- "license": "MIT",
- "dependencies": {
- "encoding-japanese": "2.2.0",
- "iconv-lite": "0.6.3",
- "libbase64": "1.3.0",
- "libqp": "2.1.1"
- }
- },
- "node_modules/libqp": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/libqp/-/libqp-2.1.1.tgz",
- "integrity": "sha512-0Wd+GPz1O134cP62YU2GTOPNA7Qgl09XwCqM5zpBv87ERCXdfDtyKXvV7c9U22yWJh44QZqBocFnXN11K96qow==",
- "license": "MIT"
- },
- "node_modules/lie": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz",
- "integrity": "sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==",
- "license": "MIT",
- "dependencies": {
- "immediate": "~3.0.5"
- }
- },
"node_modules/lightningcss": {
"version": "1.30.2",
"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.30.2.tgz",
@@ -9617,18 +6986,9 @@
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.3.1.tgz",
"integrity": "sha512-S9hbyDu/vs1qNrithiNyeyv64c9yqiW9l+DBgI18fL+MTvOtWoFR0FWiyq1TxaYef5wNlpEmzlXoBlZEO+WjoA==",
- "license": "BSD-3-Clause",
- "dependencies": {
- "@types/trusted-types": "^2.0.2"
- }
- },
- "node_modules/localforage": {
- "version": "1.10.0",
- "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz",
- "integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==",
- "license": "Apache-2.0",
+ "license": "BSD-3-Clause",
"dependencies": {
- "lie": "3.1.1"
+ "@types/trusted-types": "^2.0.2"
}
},
"node_modules/locate-path": {
@@ -9649,30 +7009,6 @@
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"license": "MIT"
},
- "node_modules/lodash-es": {
- "version": "4.17.21",
- "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
- "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==",
- "license": "MIT"
- },
- "node_modules/logplease": {
- "version": "1.2.15",
- "resolved": "https://registry.npmjs.org/logplease/-/logplease-1.2.15.tgz",
- "integrity": "sha512-jLlHnlsPSJjpwUfcNyUxXCl33AYg2cHhIf9QhGL2T4iPT0XPB+xP1LRKFPgIg1M/sg9kAJvy94w9CzBNrfnstA==",
- "license": "MIT"
- },
- "node_modules/loose-envify": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
- "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
- "license": "MIT",
- "dependencies": {
- "js-tokens": "^3.0.0 || ^4.0.0"
- },
- "bin": {
- "loose-envify": "cli.js"
- }
- },
"node_modules/lottie-react": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/lottie-react/-/lottie-react-2.4.1.tgz",
@@ -9772,30 +7108,6 @@
"node": ">= 0.6"
}
},
- "node_modules/minimalistic-assert": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
- "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
- "license": "ISC"
- },
- "node_modules/minimalistic-crypto-utils": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
- "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==",
- "license": "MIT"
- },
- "node_modules/minimatch": {
- "version": "5.1.6",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
- "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^2.0.1"
- },
- "engines": {
- "node": ">=10"
- }
- },
"node_modules/mipd": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/mipd/-/mipd-0.0.7.tgz",
@@ -9834,12 +7146,6 @@
"integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==",
"license": "(Apache-2.0 AND MIT)"
},
- "node_modules/nanoassert": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-2.0.0.tgz",
- "integrity": "sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA==",
- "license": "ISC"
- },
"node_modules/nanoid": {
"version": "3.3.11",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
@@ -10067,107 +7373,6 @@
"safe-buffer": "~5.1.0"
}
},
- "node_modules/object-inspect": {
- "version": "1.13.4",
- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
- "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/object-keys": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
- "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/object.assign": {
- "version": "4.1.7",
- "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz",
- "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==",
- "license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.8",
- "call-bound": "^1.0.3",
- "define-properties": "^1.2.1",
- "es-object-atoms": "^1.0.0",
- "has-symbols": "^1.1.0",
- "object-keys": "^1.1.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/object.entries": {
- "version": "1.1.9",
- "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz",
- "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==",
- "license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.8",
- "call-bound": "^1.0.4",
- "define-properties": "^1.2.1",
- "es-object-atoms": "^1.1.1"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/object.getownpropertydescriptors": {
- "version": "2.1.8",
- "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.8.tgz",
- "integrity": "sha512-qkHIGe4q0lSYMv0XI4SsBTJz3WaURhLvd0lKSgtVuOsJ2krg4SgMw3PIRQFMp07yi++UR3se2mkcLqsBNpBb/A==",
- "license": "MIT",
- "dependencies": {
- "array.prototype.reduce": "^1.0.6",
- "call-bind": "^1.0.7",
- "define-properties": "^1.2.1",
- "es-abstract": "^1.23.2",
- "es-object-atoms": "^1.0.0",
- "gopd": "^1.0.1",
- "safe-array-concat": "^1.1.2"
- },
- "engines": {
- "node": ">= 0.8"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/object.values": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz",
- "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==",
- "license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.8",
- "call-bound": "^1.0.3",
- "define-properties": "^1.2.1",
- "es-object-atoms": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/obuf": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz",
- "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==",
- "license": "MIT"
- },
"node_modules/ofetch": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/ofetch/-/ofetch-1.5.1.tgz",
@@ -10209,40 +7414,6 @@
"integrity": "sha512-opyTPaunsklCBpTK8JGef6mfPhLSnyy5a0IN9vKtx3+4aExf+KxEqYwIy3hqkedXIB97u357uLMJsOnm3GVjsw==",
"license": "MIT"
},
- "node_modules/optionator": {
- "version": "0.8.3",
- "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
- "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
- "license": "MIT",
- "dependencies": {
- "deep-is": "~0.1.3",
- "fast-levenshtein": "~2.0.6",
- "levn": "~0.3.0",
- "prelude-ls": "~1.1.2",
- "type-check": "~0.3.2",
- "word-wrap": "~1.2.3"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/own-keys": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz",
- "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==",
- "license": "MIT",
- "dependencies": {
- "get-intrinsic": "^1.2.6",
- "object-keys": "^1.1.1",
- "safe-push-apply": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/ox": {
"version": "0.9.6",
"resolved": "https://registry.npmjs.org/ox/-/ox-0.9.6.tgz",
@@ -10342,22 +7513,6 @@
"node": ">=6"
}
},
- "node_modules/pako": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz",
- "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==",
- "license": "(MIT AND Zlib)"
- },
- "node_modules/path": {
- "version": "0.12.7",
- "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
- "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==",
- "license": "MIT",
- "dependencies": {
- "process": "^0.11.1",
- "util": "^0.10.3"
- }
- },
"node_modules/path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@@ -10367,63 +7522,6 @@
"node": ">=8"
}
},
- "node_modules/path/node_modules/inherits": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==",
- "license": "ISC"
- },
- "node_modules/path/node_modules/util": {
- "version": "0.10.4",
- "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
- "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
- "license": "MIT",
- "dependencies": {
- "inherits": "2.0.3"
- }
- },
- "node_modules/pg-int8": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz",
- "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==",
- "license": "ISC",
- "engines": {
- "node": ">=4.0.0"
- }
- },
- "node_modules/pg-numeric": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/pg-numeric/-/pg-numeric-1.0.2.tgz",
- "integrity": "sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw==",
- "license": "ISC",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/pg-protocol": {
- "version": "1.10.3",
- "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.10.3.tgz",
- "integrity": "sha512-6DIBgBQaTKDJyxnXaLiLR8wBpQQcGWuAESkRBX/t6OwA8YsqP+iVSiond2EDy6Y/dsGk8rh/jtax3js5NeV7JQ==",
- "license": "MIT"
- },
- "node_modules/pg-types": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-4.1.0.tgz",
- "integrity": "sha512-o2XFanIMy/3+mThw69O8d4n1E5zsLhdO+OPqswezu7Z5ekP4hYDqlDjlmOpYMbzY2Br0ufCwJLdDIXeNVwcWFg==",
- "license": "MIT",
- "dependencies": {
- "pg-int8": "1.0.1",
- "pg-numeric": "1.0.2",
- "postgres-array": "~3.0.1",
- "postgres-bytea": "~3.0.0",
- "postgres-date": "~2.1.0",
- "postgres-interval": "^3.0.0",
- "postgres-range": "^1.1.1"
- },
- "engines": {
- "node": ">=10"
- }
- },
"node_modules/picocolors": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
@@ -10489,41 +7587,6 @@
"integrity": "sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q==",
"license": "MIT"
},
- "node_modules/pkijs": {
- "version": "3.3.3",
- "resolved": "https://registry.npmjs.org/pkijs/-/pkijs-3.3.3.tgz",
- "integrity": "sha512-+KD8hJtqQMYoTuL1bbGOqxb4z+nZkTAwVdNtWwe8Tc2xNbEmdJYIYoc6Qt0uF55e6YW6KuTHw1DjQ18gMhzepw==",
- "license": "BSD-3-Clause",
- "dependencies": {
- "@noble/hashes": "1.4.0",
- "asn1js": "^3.0.6",
- "bytestreamjs": "^2.0.1",
- "pvtsutils": "^1.3.6",
- "pvutils": "^1.1.3",
- "tslib": "^2.8.1"
- },
- "engines": {
- "node": ">=16.0.0"
- }
- },
- "node_modules/pkijs/node_modules/@noble/hashes": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz",
- "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==",
- "license": "MIT",
- "engines": {
- "node": ">= 16"
- },
- "funding": {
- "url": "https://paulmillr.com/funding/"
- }
- },
- "node_modules/pluralize": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-3.1.0.tgz",
- "integrity": "sha512-2wcybwjwXOzGI1rlxWtlcs0/nSYK0OzNPqsg35TKxJFQlGhFu3cZ1x7EHS4r4bubQlhzyF4YxxlJqQnIhkUQCw==",
- "license": "MIT"
- },
"node_modules/pngjs": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz",
@@ -10655,51 +7718,6 @@
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
"license": "MIT"
},
- "node_modules/postgres-array": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-3.0.4.tgz",
- "integrity": "sha512-nAUSGfSDGOaOAEGwqsRY27GPOea7CNipJPOA7lPbdEpx5Kg3qzdP0AaWC5MlhTWV9s4hFX39nomVZ+C4tnGOJQ==",
- "license": "MIT",
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/postgres-bytea": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-3.0.0.tgz",
- "integrity": "sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw==",
- "license": "MIT",
- "dependencies": {
- "obuf": "~1.1.2"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/postgres-date": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-2.1.0.tgz",
- "integrity": "sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA==",
- "license": "MIT",
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/postgres-interval": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-3.0.0.tgz",
- "integrity": "sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw==",
- "license": "MIT",
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/postgres-range": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/postgres-range/-/postgres-range-1.1.4.tgz",
- "integrity": "sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w==",
- "license": "MIT"
- },
"node_modules/preact": {
"version": "10.24.2",
"resolved": "https://registry.npmjs.org/preact/-/preact-10.24.2.tgz",
@@ -10710,23 +7728,6 @@
"url": "https://opencollective.com/preact"
}
},
- "node_modules/prelude-ls": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
- "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==",
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/process": {
- "version": "0.11.10",
- "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
- "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6.0"
- }
- },
"node_modules/process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
@@ -10751,18 +7752,6 @@
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
"license": "MIT"
},
- "node_modules/psl": {
- "version": "1.15.0",
- "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz",
- "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==",
- "license": "MIT",
- "dependencies": {
- "punycode": "^2.3.1"
- },
- "funding": {
- "url": "https://github.com/sponsors/lupomontero"
- }
- },
"node_modules/pump": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz",
@@ -10773,33 +7762,6 @@
"once": "^1.3.1"
}
},
- "node_modules/punycode": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
- "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/pvtsutils": {
- "version": "1.3.6",
- "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz",
- "integrity": "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==",
- "license": "MIT",
- "dependencies": {
- "tslib": "^2.8.1"
- }
- },
- "node_modules/pvutils": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.5.tgz",
- "integrity": "sha512-KTqnxsgGiQ6ZAzZCVlJH5eOjSnvlyEgx1m8bkRJfOhmGRqfo5KLvmAlACQkrjEtOQ4B7wF9TdSLIs9O90MX9xA==",
- "license": "MIT",
- "engines": {
- "node": ">=16.0.0"
- }
- },
"node_modules/qr": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/qr/-/qr-0.5.2.tgz",
@@ -10860,29 +7822,6 @@
"integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==",
"license": "MIT"
},
- "node_modules/r1csfile": {
- "version": "0.0.48",
- "resolved": "https://registry.npmjs.org/r1csfile/-/r1csfile-0.0.48.tgz",
- "integrity": "sha512-kHRkKUJNaor31l05f2+RFzvcH5XSa7OfEfd/l4hzjte6NL6fjRkSMfZ4BjySW9wmfdwPOtq3mXurzPvPGEf5Tw==",
- "license": "GPL-3.0",
- "dependencies": {
- "@iden3/bigarray": "0.0.2",
- "@iden3/binfileutils": "0.0.12",
- "fastfile": "0.0.20",
- "ffjavascript": "0.3.0"
- }
- },
- "node_modules/r1csfile/node_modules/ffjavascript": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.3.0.tgz",
- "integrity": "sha512-l7sR5kmU3gRwDy8g0Z2tYBXy5ttmafRPFOqY7S6af5cq51JqJWt5eQ/lSR/rs2wQNbDYaYlQr5O+OSUf/oMLoQ==",
- "license": "GPL-3.0",
- "dependencies": {
- "wasmbuilder": "0.0.16",
- "wasmcurves": "0.2.2",
- "web-worker": "1.2.0"
- }
- },
"node_modules/radix3": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/radix3/-/radix3-1.1.2.tgz",
@@ -11006,61 +7945,13 @@
"url": "https://paulmillr.com/funding/"
}
},
- "node_modules/real-require": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.1.0.tgz",
- "integrity": "sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg==",
- "license": "MIT",
- "engines": {
- "node": ">= 12.13.0"
- }
- },
- "node_modules/reflect-metadata": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz",
- "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==",
- "license": "Apache-2.0"
- },
- "node_modules/reflect.getprototypeof": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz",
- "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==",
- "license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.8",
- "define-properties": "^1.2.1",
- "es-abstract": "^1.23.9",
- "es-errors": "^1.3.0",
- "es-object-atoms": "^1.0.0",
- "get-intrinsic": "^1.2.7",
- "get-proto": "^1.0.1",
- "which-builtin-type": "^1.2.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/regexp.prototype.flags": {
- "version": "1.5.4",
- "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz",
- "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==",
+ "node_modules/real-require": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.1.0.tgz",
+ "integrity": "sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg==",
"license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.8",
- "define-properties": "^1.2.1",
- "es-errors": "^1.3.0",
- "get-proto": "^1.0.1",
- "gopd": "^1.2.0",
- "set-function-name": "^2.0.2"
- },
"engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
+ "node": ">= 12.13.0"
}
},
"node_modules/require-directory": {
@@ -11110,25 +8001,6 @@
"@types/node": "*"
}
},
- "node_modules/safe-array-concat": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz",
- "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==",
- "license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.8",
- "call-bound": "^1.0.2",
- "get-intrinsic": "^1.2.6",
- "has-symbols": "^1.1.0",
- "isarray": "^2.0.5"
- },
- "engines": {
- "node": ">=0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
@@ -11149,22 +8021,6 @@
],
"license": "MIT"
},
- "node_modules/safe-push-apply": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz",
- "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==",
- "license": "MIT",
- "dependencies": {
- "es-errors": "^1.3.0",
- "isarray": "^2.0.5"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/safe-regex-test": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz",
@@ -11191,24 +8047,12 @@
"node": ">=10"
}
},
- "node_modules/safer-buffer": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
- "license": "MIT"
- },
"node_modules/scheduler": {
"version": "0.27.0",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz",
"integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==",
"license": "MIT"
},
- "node_modules/scrypt-js": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz",
- "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==",
- "license": "MIT"
- },
"node_modules/semver": {
"version": "7.7.3",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
@@ -11244,35 +8088,6 @@
"node": ">= 0.4"
}
},
- "node_modules/set-function-name": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz",
- "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==",
- "license": "MIT",
- "dependencies": {
- "define-data-property": "^1.1.4",
- "es-errors": "^1.3.0",
- "functions-have-names": "^1.2.3",
- "has-property-descriptors": "^1.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/set-proto": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz",
- "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==",
- "license": "MIT",
- "dependencies": {
- "dunder-proto": "^1.0.1",
- "es-errors": "^1.3.0",
- "es-object-atoms": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
"node_modules/sha.js": {
"version": "2.4.12",
"resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz",
@@ -11293,12 +8108,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/shallowequal": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz",
- "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==",
- "license": "MIT"
- },
"node_modules/sharp": {
"version": "0.34.5",
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.5.tgz",
@@ -11344,110 +8153,6 @@
"@img/sharp-win32-x64": "0.34.5"
}
},
- "node_modules/side-channel": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
- "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
- "license": "MIT",
- "dependencies": {
- "es-errors": "^1.3.0",
- "object-inspect": "^1.13.3",
- "side-channel-list": "^1.0.0",
- "side-channel-map": "^1.0.1",
- "side-channel-weakmap": "^1.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/side-channel-list": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
- "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
- "license": "MIT",
- "dependencies": {
- "es-errors": "^1.3.0",
- "object-inspect": "^1.13.3"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/side-channel-map": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
- "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.2",
- "es-errors": "^1.3.0",
- "get-intrinsic": "^1.2.5",
- "object-inspect": "^1.13.3"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/side-channel-weakmap": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
- "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.2",
- "es-errors": "^1.3.0",
- "get-intrinsic": "^1.2.5",
- "object-inspect": "^1.13.3",
- "side-channel-map": "^1.0.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/snarkjs": {
- "version": "0.7.5",
- "resolved": "https://registry.npmjs.org/snarkjs/-/snarkjs-0.7.5.tgz",
- "integrity": "sha512-h+3c4rXZKLhLuHk4LHydZCk/h5GcNvk5GjVKRRkHmfb6Ntf8gHOA9zea3g656iclRuhqQ3iKDWFgiD9ypLrKiA==",
- "license": "GPL-3.0",
- "dependencies": {
- "@iden3/binfileutils": "0.0.12",
- "bfj": "^7.0.2",
- "blake2b-wasm": "^2.4.0",
- "circom_runtime": "0.1.28",
- "ejs": "^3.1.6",
- "fastfile": "0.0.20",
- "ffjavascript": "0.3.1",
- "js-sha3": "^0.8.0",
- "logplease": "^1.2.15",
- "r1csfile": "0.0.48"
- },
- "bin": {
- "snarkjs": "build/cli.cjs"
- }
- },
- "node_modules/snarkjs/node_modules/ffjavascript": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.3.1.tgz",
- "integrity": "sha512-4PbK1WYodQtuF47D4pRI5KUg3Q392vuP5WjE1THSnceHdXwU3ijaoS0OqxTzLknCtz4Z2TtABzkBdBdMn3B/Aw==",
- "license": "GPL-3.0",
- "dependencies": {
- "wasmbuilder": "0.0.16",
- "wasmcurves": "0.2.2",
- "web-worker": "1.2.0"
- }
- },
"node_modules/socket.io-client": {
"version": "4.8.1",
"resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.8.1.tgz",
@@ -11485,16 +8190,6 @@
"atomic-sleep": "^1.0.0"
}
},
- "node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "license": "BSD-3-Clause",
- "optional": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/source-map-js": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
@@ -11518,227 +8213,61 @@
"resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz",
"integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==",
"license": "ISC",
- "engines": {
- "node": ">= 10.x"
- }
- },
- "node_modules/static-eval": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.2.tgz",
- "integrity": "sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==",
- "license": "MIT",
- "dependencies": {
- "escodegen": "^1.8.1"
- }
- },
- "node_modules/stop-iteration-iterator": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz",
- "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==",
- "license": "MIT",
- "dependencies": {
- "es-errors": "^1.3.0",
- "internal-slot": "^1.1.0"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/stream-chain": {
- "version": "2.2.5",
- "resolved": "https://registry.npmjs.org/stream-chain/-/stream-chain-2.2.5.tgz",
- "integrity": "sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA==",
- "license": "BSD-3-Clause"
- },
- "node_modules/stream-json": {
- "version": "1.9.1",
- "resolved": "https://registry.npmjs.org/stream-json/-/stream-json-1.9.1.tgz",
- "integrity": "sha512-uWkjJ+2Nt/LO9Z/JyKZbMusL8Dkh97uUBTv3AJQ74y07lVahLY4eEFsPsE97pxYBwr8nnjMAIch5eqI0gPShyw==",
- "license": "BSD-3-Clause",
- "dependencies": {
- "stream-chain": "^2.2.5"
- }
- },
- "node_modules/stream-shift": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz",
- "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==",
- "license": "MIT"
- },
- "node_modules/strict-uri-encode": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
- "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==",
- "license": "MIT",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/string_decoder": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
- "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
- "license": "MIT",
- "dependencies": {
- "safe-buffer": "~5.2.0"
- }
- },
- "node_modules/string-at": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/string-at/-/string-at-1.1.0.tgz",
- "integrity": "sha512-jCpPowWKBn0NFdvtmK2qxK40Ol4jPcgCt8qYnKpPx6B5eDwHMDhRvq9MCsDEgsOTNtbXY6beAMHMRT2qPJXllA==",
- "deprecated": "The original `String.prototype.at` proposal has been replaced by a new one; please use v1 or later of `string.prototype.at` instead",
- "license": "MIT",
- "dependencies": {
- "define-properties": "^1.1.3",
- "es-abstract": "^1.17.0-next.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/string-width": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "license": "MIT",
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/string.prototype.padend": {
- "version": "3.1.6",
- "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz",
- "integrity": "sha512-XZpspuSB7vJWhvJc9DLSlrXl1mcA2BdoY5jjnS135ydXqLoqhs96JjDtCkjJEQHvfqZIp9hBuBMgI589peyx9Q==",
- "license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.7",
- "define-properties": "^1.2.1",
- "es-abstract": "^1.23.2",
- "es-object-atoms": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/string.prototype.padstart": {
- "version": "3.1.7",
- "resolved": "https://registry.npmjs.org/string.prototype.padstart/-/string.prototype.padstart-3.1.7.tgz",
- "integrity": "sha512-hc5ZFzw8H2Bl4AeHxE5s+CniFg+bPcr7lRRS189GCM6KhJQBACNRhtMsdcnpBNbjc1XisnUOqbP0c94RZU4GCw==",
- "license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.8",
- "call-bound": "^1.0.4",
- "define-properties": "^1.2.1",
- "es-abstract": "^1.23.9",
- "es-object-atoms": "^1.1.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/string.prototype.trim": {
- "version": "1.2.10",
- "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz",
- "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==",
- "license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.8",
- "call-bound": "^1.0.2",
- "define-data-property": "^1.1.4",
- "define-properties": "^1.2.1",
- "es-abstract": "^1.23.5",
- "es-object-atoms": "^1.0.0",
- "has-property-descriptors": "^1.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
+ "engines": {
+ "node": ">= 10.x"
}
},
- "node_modules/string.prototype.trimend": {
- "version": "1.0.9",
- "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz",
- "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==",
- "license": "MIT",
+ "node_modules/stream-chain": {
+ "version": "2.2.5",
+ "resolved": "https://registry.npmjs.org/stream-chain/-/stream-chain-2.2.5.tgz",
+ "integrity": "sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/stream-json": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/stream-json/-/stream-json-1.9.1.tgz",
+ "integrity": "sha512-uWkjJ+2Nt/LO9Z/JyKZbMusL8Dkh97uUBTv3AJQ74y07lVahLY4eEFsPsE97pxYBwr8nnjMAIch5eqI0gPShyw==",
+ "license": "BSD-3-Clause",
"dependencies": {
- "call-bind": "^1.0.8",
- "call-bound": "^1.0.2",
- "define-properties": "^1.2.1",
- "es-object-atoms": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
+ "stream-chain": "^2.2.5"
}
},
- "node_modules/string.prototype.trimleft": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.3.tgz",
- "integrity": "sha512-699Ibssmj/awVzvdNk4g83/Iu8U9vDohzmA/ly2BrQWGhamuY4Tlvs5XKmKliDt3ky6SKbE1bzPhASKCFlx9Sg==",
+ "node_modules/stream-shift": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz",
+ "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==",
+ "license": "MIT"
+ },
+ "node_modules/strict-uri-encode": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
+ "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==",
"license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.0",
- "define-properties": "^1.1.3",
- "string.prototype.trimstart": "^1.0.3"
- },
"engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
+ "node": ">=4"
}
},
- "node_modules/string.prototype.trimright": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.3.tgz",
- "integrity": "sha512-hoOq56oRFnnfDuXNy2lGHiwT77MehHv9d0zGfRZ8QdC+4zjrkFB9vd5i/zYTd/ymFBd4YxtbdgHt3U6ksGeuBw==",
+ "node_modules/string_decoder": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"license": "MIT",
"dependencies": {
- "call-bind": "^1.0.0",
- "define-properties": "^1.1.3",
- "string.prototype.trimend": "^1.0.3"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
+ "safe-buffer": "~5.2.0"
}
},
- "node_modules/string.prototype.trimstart": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz",
- "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==",
+ "node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"license": "MIT",
"dependencies": {
- "call-bind": "^1.0.7",
- "define-properties": "^1.2.1",
- "es-object-atoms": "^1.0.0"
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
},
"engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
+ "node": ">=8"
}
},
"node_modules/strip-ansi": {
@@ -11753,74 +8282,6 @@
"node": ">=8"
}
},
- "node_modules/styled-components": {
- "version": "6.1.19",
- "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.19.tgz",
- "integrity": "sha512-1v/e3Dl1BknC37cXMhwGomhO8AkYmN41CqyX9xhUDxry1ns3BFQy2lLDRQXJRdVVWB9OHemv/53xaStimvWyuA==",
- "license": "MIT",
- "dependencies": {
- "@emotion/is-prop-valid": "1.2.2",
- "@emotion/unitless": "0.8.1",
- "@types/stylis": "4.2.5",
- "css-to-react-native": "3.2.0",
- "csstype": "3.1.3",
- "postcss": "8.4.49",
- "shallowequal": "1.1.0",
- "stylis": "4.3.2",
- "tslib": "2.6.2"
- },
- "engines": {
- "node": ">= 16"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/styled-components"
- },
- "peerDependencies": {
- "react": ">= 16.8.0",
- "react-dom": ">= 16.8.0"
- }
- },
- "node_modules/styled-components/node_modules/csstype": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
- "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
- "license": "MIT"
- },
- "node_modules/styled-components/node_modules/postcss": {
- "version": "8.4.49",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz",
- "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==",
- "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"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "nanoid": "^3.3.7",
- "picocolors": "^1.1.1",
- "source-map-js": "^1.2.1"
- },
- "engines": {
- "node": "^10 || ^12 || >=14"
- }
- },
- "node_modules/styled-components/node_modules/tslib": {
- "version": "2.6.2",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
- "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
- "license": "0BSD"
- },
"node_modules/styled-jsx": {
"version": "5.1.6",
"resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.6.tgz",
@@ -11844,12 +8305,6 @@
}
}
},
- "node_modules/stylis": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.2.tgz",
- "integrity": "sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==",
- "license": "MIT"
- },
"node_modules/superstruct": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/superstruct/-/superstruct-2.0.2.tgz",
@@ -11912,48 +8367,12 @@
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
"license": "MIT"
},
- "node_modules/tryer": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz",
- "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==",
- "license": "MIT"
- },
"node_modules/tslib": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
"license": "0BSD"
},
- "node_modules/tsyringe": {
- "version": "4.10.0",
- "resolved": "https://registry.npmjs.org/tsyringe/-/tsyringe-4.10.0.tgz",
- "integrity": "sha512-axr3IdNuVIxnaK5XGEUFTu3YmAQ6lllgrvqfEoR16g/HGnYY/6We4oWENtAnzK6/LpJ2ur9PAb80RBt7/U4ugw==",
- "license": "MIT",
- "dependencies": {
- "tslib": "^1.9.3"
- },
- "engines": {
- "node": ">= 6.0.0"
- }
- },
- "node_modules/tsyringe/node_modules/tslib": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
- "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
- "license": "0BSD"
- },
- "node_modules/type-check": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
- "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==",
- "license": "MIT",
- "dependencies": {
- "prelude-ls": "~1.1.2"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
"node_modules/typed-array-buffer": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz",
@@ -11968,66 +8387,6 @@
"node": ">= 0.4"
}
},
- "node_modules/typed-array-byte-length": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz",
- "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==",
- "license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.8",
- "for-each": "^0.3.3",
- "gopd": "^1.2.0",
- "has-proto": "^1.2.0",
- "is-typed-array": "^1.1.14"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/typed-array-byte-offset": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz",
- "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==",
- "license": "MIT",
- "dependencies": {
- "available-typed-arrays": "^1.0.7",
- "call-bind": "^1.0.8",
- "for-each": "^0.3.3",
- "gopd": "^1.2.0",
- "has-proto": "^1.2.0",
- "is-typed-array": "^1.1.15",
- "reflect.getprototypeof": "^1.0.9"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/typed-array-length": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz",
- "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==",
- "license": "MIT",
- "dependencies": {
- "call-bind": "^1.0.7",
- "for-each": "^0.3.3",
- "gopd": "^1.0.1",
- "is-typed-array": "^1.1.13",
- "possible-typed-array-names": "^1.0.0",
- "reflect.getprototypeof": "^1.0.6"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/typescript": {
"version": "5.9.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
@@ -12041,37 +8400,6 @@
"node": ">=14.17"
}
},
- "node_modules/typescript-parser": {
- "version": "2.6.1",
- "resolved": "https://registry.npmjs.org/typescript-parser/-/typescript-parser-2.6.1.tgz",
- "integrity": "sha512-p4ZC10pu67KO8+WJALsJWhbAq4pRBIcP+ls8Bhl+V8KvzYQDwxw/P5hJhn3rBdLnfS5aGLflfh7WiZpN6yi+5g==",
- "license": "MIT",
- "dependencies": {
- "lodash": "^4.17.10",
- "lodash-es": "^4.17.10",
- "tslib": "^1.9.3",
- "typescript": "^3.0.3"
- }
- },
- "node_modules/typescript-parser/node_modules/tslib": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
- "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
- "license": "0BSD"
- },
- "node_modules/typescript-parser/node_modules/typescript": {
- "version": "3.9.10",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz",
- "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==",
- "license": "Apache-2.0",
- "bin": {
- "tsc": "bin/tsc",
- "tsserver": "bin/tsserver"
- },
- "engines": {
- "node": ">=4.2.0"
- }
- },
"node_modules/ua-parser-js": {
"version": "1.0.41",
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.41.tgz",
@@ -12113,36 +8441,12 @@
"multiformats": "^9.4.2"
}
},
- "node_modules/unbox-primitive": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz",
- "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.3",
- "has-bigints": "^1.0.2",
- "has-symbols": "^1.1.0",
- "which-boxed-primitive": "^1.1.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/uncrypto": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/uncrypto/-/uncrypto-0.1.3.tgz",
"integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==",
"license": "MIT"
},
- "node_modules/underscore": {
- "version": "1.12.1",
- "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz",
- "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==",
- "license": "MIT"
- },
"node_modules/undici-types": {
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
@@ -12368,11 +8672,6 @@
"uuid": "dist/bin/uuid"
}
},
- "node_modules/valid-url": {
- "version": "1.0.9",
- "resolved": "https://registry.npmjs.org/valid-url/-/valid-url-1.0.9.tgz",
- "integrity": "sha512-QQDsV8OnSf5Uc30CKSwG9lnhMPe6exHtTXLRYX8uMwKENy640pU+2BgBL0LRbDh/eYRahNCS7aewCx0wf3NYVA=="
- },
"node_modules/valtio": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/valtio/-/valtio-1.13.2.tgz",
@@ -12511,27 +8810,6 @@
}
}
},
- "node_modules/wasmbuilder": {
- "version": "0.0.16",
- "resolved": "https://registry.npmjs.org/wasmbuilder/-/wasmbuilder-0.0.16.tgz",
- "integrity": "sha512-Qx3lEFqaVvp1cEYW7Bfi+ebRJrOiwz2Ieu7ZG2l7YyeSJIok/reEQCQCuicj/Y32ITIJuGIM9xZQppGx5LrQdA==",
- "license": "GPL-3.0"
- },
- "node_modules/wasmcurves": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/wasmcurves/-/wasmcurves-0.2.2.tgz",
- "integrity": "sha512-JRY908NkmKjFl4ytnTu5ED6AwPD+8VJ9oc94kdq7h5bIwbj0L4TDJ69mG+2aLs2SoCmGfqIesMWTEJjtYsoQXQ==",
- "license": "GPL-3.0",
- "dependencies": {
- "wasmbuilder": "0.0.16"
- }
- },
- "node_modules/web-worker": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.2.0.tgz",
- "integrity": "sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA==",
- "license": "Apache-2.0"
- },
"node_modules/webextension-polyfill": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/webextension-polyfill/-/webextension-polyfill-0.10.0.tgz",
@@ -12554,70 +8832,6 @@
"webidl-conversions": "^3.0.0"
}
},
- "node_modules/which-boxed-primitive": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz",
- "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==",
- "license": "MIT",
- "dependencies": {
- "is-bigint": "^1.1.0",
- "is-boolean-object": "^1.2.1",
- "is-number-object": "^1.1.1",
- "is-string": "^1.1.1",
- "is-symbol": "^1.1.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/which-builtin-type": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz",
- "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.2",
- "function.prototype.name": "^1.1.6",
- "has-tostringtag": "^1.0.2",
- "is-async-function": "^2.0.0",
- "is-date-object": "^1.1.0",
- "is-finalizationregistry": "^1.1.0",
- "is-generator-function": "^1.0.10",
- "is-regex": "^1.2.1",
- "is-weakref": "^1.0.2",
- "isarray": "^2.0.5",
- "which-boxed-primitive": "^1.1.0",
- "which-collection": "^1.0.2",
- "which-typed-array": "^1.1.16"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/which-collection": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz",
- "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==",
- "license": "MIT",
- "dependencies": {
- "is-map": "^2.0.3",
- "is-set": "^2.0.3",
- "is-weakmap": "^2.0.2",
- "is-weakset": "^2.0.3"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
"node_modules/which-module": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz",
@@ -12645,15 +8859,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/word-wrap": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
- "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/wrap-ansi": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
diff --git a/next-frontend/package.json b/next-frontend/package.json
index e6577ea..d0e55e8 100644
--- a/next-frontend/package.json
+++ b/next-frontend/package.json
@@ -19,11 +19,9 @@
"@ensdomains/ens-contracts": "^0.0.22",
"@heroicons/react": "^2.2.0",
"@rainbow-me/rainbowkit": "^2.2.9",
- "@selfxyz/core": "^1.1.0-beta.7",
"@selfxyz/qrcode": "^1.0.17",
"@tailwindcss/postcss": "^4.1.17",
"@tanstack/react-query": "^5.90.10",
- "@vercel/postgres": "^0.10.0",
"autoprefixer": "^10.4.22",
"ethers": "^6.15.0",
"lucide-react": "^0.554.0",
diff --git a/next-frontend/src/app/api/self/status/route.ts b/next-frontend/src/app/api/self/status/route.ts
deleted file mode 100644
index 18a5d67..0000000
--- a/next-frontend/src/app/api/self/status/route.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { NextRequest, NextResponse } from 'next/server';
-import { getVerification } from '@/lib/db';
-
-export async function POST(request: NextRequest) {
- try {
- const body = await request.json();
- const { address } = body;
-
- if (!address) {
- return NextResponse.json(
- { error: 'Address is required' },
- { status: 400 }
- );
- }
-
- // Check if user is verified in database
- const verificationData = await getVerification(address);
-
- return NextResponse.json(verificationData);
- } catch (error) {
- console.error('Error checking verification status:', error);
- return NextResponse.json(
- { error: 'Internal server error' },
- { status: 500 }
- );
- }
-}
\ No newline at end of file
diff --git a/next-frontend/src/app/api/self/verify/route.ts b/next-frontend/src/app/api/self/verify/route.ts
deleted file mode 100644
index e40fa74..0000000
--- a/next-frontend/src/app/api/self/verify/route.ts
+++ /dev/null
@@ -1,111 +0,0 @@
-import { NextRequest, NextResponse } from 'next/server';
-import { SelfBackendVerifier, DefaultConfigStore, AllIds } from '@selfxyz/core';
-import { saveVerification, initDatabase } from '@/lib/db';
-
-// Initialize Self Backend Verifier
-const getSelfVerifier = () => {
- const scope = process.env.SELF_SCOPE || 'blockbelle-chat';
- const endpoint = process.env.NEXT_PUBLIC_SELF_VERIFY_URL || `${process.env.NEXT_PUBLIC_BASE_URL}/api/self/verify`;
- const useMockPassport = process.env.SELF_USE_MOCK_PASSPORT === 'true';
-
- return new SelfBackendVerifier(
- scope,
- endpoint,
- useMockPassport,
- AllIds,
- new DefaultConfigStore({
- minimumAge: 18,
- excludedCountries: ['CUB', 'IRN', 'PRK', 'RUS'], // Cuba, Iran, North Korea, Russia
- ofac: false,
- }),
- 'hex'
- );
-};
-
-export async function POST(request: NextRequest) {
- try {
- // Initialize database on first request (idempotent)
- await initDatabase();
-
- const body = await request.json();
- const { attestationId, proof, publicSignals, userContextData } = body;
-
- // Validate required fields
- if (!proof || !publicSignals || !attestationId || !userContextData) {
- return NextResponse.json(
- {
- status: 'error',
- result: false,
- reason: 'Proof, publicSignals, attestationId and userContextData are required',
- },
- { status: 200 }
- );
- }
-
- // Initialize verifier
- const selfBackendVerifier = getSelfVerifier();
-
- // Verify the proof
- const result = await selfBackendVerifier.verify(
- attestationId,
- proof,
- publicSignals,
- userContextData
- );
-
- const { isValid, isMinimumAgeValid } = result.isValidDetails;
-
- if (!isValid || !isMinimumAgeValid) {
- let reason = 'Verification failed';
- if (!isMinimumAgeValid) reason = 'Minimum age verification failed';
-
- return NextResponse.json(
- {
- status: 'error',
- result: false,
- reason,
- },
- { status: 200 }
- );
- }
-
- // Extract user identifier from userContextData
- const userIdentifier = result.userData?.userIdentifier;
-
- // Store verification result in database
- if (userIdentifier) {
- await saveVerification(userIdentifier, {
- verified: true,
- verifiedAt: new Date().toISOString(),
- selfDid: userIdentifier,
- attestationId,
- nationality: result.discloseOutput?.nationality,
- gender: result.discloseOutput?.gender,
- minimumAge: result.discloseOutput?.minimumAge,
- });
- }
-
- return NextResponse.json(
- {
- status: 'success',
- result: true,
- data: {
- nationality: result.discloseOutput?.nationality,
- gender: result.discloseOutput?.gender,
- minimumAge: result.discloseOutput?.minimumAge,
- },
- },
- { status: 200 }
- );
- } catch (error) {
- console.error('Verification error:', error);
- return NextResponse.json(
- {
- status: 'error',
- result: false,
- reason: error instanceof Error ? error.message : 'Unknown error',
- },
- { status: 200 }
- );
- }
-}
\ No newline at end of file
diff --git a/next-frontend/src/components/Account.tsx b/next-frontend/src/components/Account.tsx
index c7ff435..790df25 100644
--- a/next-frontend/src/components/Account.tsx
+++ b/next-frontend/src/components/Account.tsx
@@ -16,6 +16,8 @@ export default function Account() {
const [selfApp, setSelfApp] = useState(null);
const [showQRCode, setShowQRCode] = useState(false);
const [isVerifying, setIsVerifying] = useState(false);
+ const [showVerificationModal, setShowVerificationModal] = useState(false);
+ const [verifiedGender, setVerifiedGender] = useState<'female' | 'male' | null>(null);
useEffect(() => {
if (!address || !isConnected) {
@@ -28,10 +30,10 @@ export default function Account() {
version: 2,
appName: process.env.NEXT_PUBLIC_SELF_APP_NAME || 'BlockBelle',
scope: process.env.NEXT_PUBLIC_SELF_SCOPE || 'blockbelle-chat',
- endpoint: process.env.NEXT_PUBLIC_SELF_ENDPOINT || `${window.location.origin}/api/self/verify`,
+ endpoint: process.env.NEXT_PUBLIC_SELF_ENDPOINT || '0x72493afca2789da494dd3695d74b50de7774336a', // ProofOfHuman contract
logoBase64: 'https://i.postimg.cc/mrmVf9hm/self.png',
userId: address,
- endpointType: (process.env.NEXT_PUBLIC_SELF_ENDPOINT_TYPE as any) || 'staging_https',
+ endpointType: 'celo', // Celo Mainnet
userIdType: 'hex',
userDefinedData: `BlockBelle verification for ${ensName || address}`,
disclosures: {
@@ -49,21 +51,49 @@ export default function Account() {
setSelfApp(app);
}, [address, isConnected, ensName]);
- const handleSuccessfulVerification = async () => {
+ const handleSuccessfulVerification = async (verificationResult?: any) => {
setIsVerifying(true);
+
try {
- // Wait a bit for the backend to process the verification
- await new Promise(resolve => setTimeout(resolve, 2000));
-
- // Refresh verification status from backend API
- await refreshVerification();
-
- // Close QR code modal if verification successful
- if (verificationData.selfVerified) {
+ // Extract gender from Self Protocol response
+ // The verificationResult should contain the disclosed data
+ console.log('Verification result:', verificationResult);
+
+ // Try to extract gender from the response
+ // Self Protocol may return it in different formats, so we check multiple possibilities
+ const gender = verificationResult?.gender ||
+ verificationResult?.disclosures?.gender ||
+ verificationResult?.data?.gender;
+
+ console.log('Extracted gender:', gender);
+
+ // Store the gender
+ if (gender) {
+ setVerifiedGender(gender.toLowerCase());
+ }
+
+ // Check if user is female
+ const isFemale = gender?.toLowerCase() === 'female' || gender?.toLowerCase() === 'f';
+
+ if (!isFemale) {
+ // Male or other gender - show redirect message immediately
+ setIsVerifying(false);
setShowQRCode(false);
+ setShowVerificationModal(true);
+ return; // Don't proceed with blockchain verification
}
+
+ // Female - proceed with blockchain verification
+ await new Promise(resolve => setTimeout(resolve, 3000));
+
+ setShowQRCode(false);
+
+ // Show success modal after a brief delay
+ setTimeout(() => {
+ setShowVerificationModal(true);
+ }, 1000);
} catch (error) {
- console.error('Error fetching verification status:', error);
+ console.error('Error during verification:', error);
} finally {
setIsVerifying(false);
}
@@ -249,6 +279,58 @@ export default function Account() {
✨ Tier 3 users display a crown badge next to their username, indicating verified identity status.
+
+ {/* Gender-Specific Verification Modal */}
+ {showVerificationModal && (
+
+
+ {verifiedGender === 'female' || verificationData.gender?.toLowerCase() === 'female' ? (
+ // Female Success Message
+ <>
+
👑
+
+ Congratulations, Queen!
+
+
+ You're officially verified
+
+
+ Welcome to BlockBelle - where queens in Web3 connect, collaborate, and thrive together.
+
+
+ >
+ ) : (
+ // Male or Other Gender Redirect Message
+ <>
+
💪
+
+ Love the support, King!
+
+
+ BlockBelle is a queens-only space
+
+
+ This platform is exclusively for women in Web3. Want to support? Share BlockBelle with the amazing women builders in your network!
+
+
+ >
+ )}
+
+
+ )}
);
}
\ No newline at end of file
diff --git a/next-frontend/src/components/ChatInterface.tsx b/next-frontend/src/components/ChatInterface.tsx
index 5e5390f..118fd6b 100644
--- a/next-frontend/src/components/ChatInterface.tsx
+++ b/next-frontend/src/components/ChatInterface.tsx
@@ -45,9 +45,15 @@ const ChatInterface: React.FC = () => {
const {
selectedUser,
messages,
+ pinnedMessage,
isLoadingMessages,
+ isLoadingPinnedMessage,
isSending,
+ isPinning,
+ isUnpinning,
sendMessage,
+ pinMessage,
+ unpinMessage,
selectUser,
} = useChat()
const { showNewMessageNotification, isEnabled } = useNotifications()
@@ -141,6 +147,50 @@ const ChatInterface: React.FC = () => {
}
}
+ const handlePinMessage = async (messageId: number) => {
+ if (!selectedUser || isPinning) return
+
+ try {
+ await pinMessage(messageId)
+ setNotification({
+ message: 'Message pinned successfully!',
+ type: 'success',
+ show: true,
+ })
+ setTimeout(() => setNotification({ message: '', type: 'info', show: false }), 3000)
+ } catch (error) {
+ console.error('Failed to pin message:', error)
+ setNotification({
+ message: 'Failed to pin message. Please try again.',
+ type: 'error',
+ show: true,
+ })
+ setTimeout(() => setNotification({ message: '', type: 'info', show: false }), 5000)
+ }
+ }
+
+ const handleUnpinMessage = async () => {
+ if (!selectedUser || isUnpinning) return
+
+ try {
+ await unpinMessage()
+ setNotification({
+ message: 'Message unpinned successfully!',
+ type: 'success',
+ show: true,
+ })
+ setTimeout(() => setNotification({ message: '', type: 'info', show: false }), 3000)
+ } catch (error) {
+ console.error('Failed to unpin message:', error)
+ setNotification({
+ message: 'Failed to unpin message. Please try again.',
+ type: 'error',
+ show: true,
+ })
+ setTimeout(() => setNotification({ message: '', type: 'info', show: false }), 5000)
+ }
+ }
+
const showNotification = (message: string, type: 'success' | 'error' | 'info') => {
setNotification({ message, type, show: true })
setTimeout(() => setNotification({ message: '', type: 'info', show: false }), type === 'error' ? 5000 : 3000)
diff --git a/next-frontend/src/components/GroupChat.tsx b/next-frontend/src/components/GroupChat.tsx
index 2c2f179..f76d126 100644
--- a/next-frontend/src/components/GroupChat.tsx
+++ b/next-frontend/src/components/GroupChat.tsx
@@ -13,9 +13,12 @@ const chatAbi = parseAbi([
'function createGroup(string _name) external returns (uint256)',
'function addMember(uint256 _groupId, address _member) external',
'function sendGroupMessage(uint256 _groupId, string _content) external',
- 'function getGroupMessages(uint256 _groupId, uint256 _start, uint256 _count) external view returns ((address sender, string content, uint256 timestamp)[])',
+ 'function getGroupMessages(uint256 _groupId, uint256 _start, uint256 _count) external view returns ((address sender, string content, uint256 timestamp, bool isPinned)[])',
'function getGroupMembers(uint256 _groupId) external view returns (address[])',
'function groupCount() external view returns (uint256)',
+ 'function pinGroupMessage(uint256 _groupId, uint256 _messageId) external',
+ 'function unpinGroupMessage(uint256 _groupId) external',
+ 'function getGroupPinnedMessage(uint256 _groupId) external view returns ((uint256 messageId, address sender, string content, uint256 timestamp))',
])
const registryAbi = parseAbi([
@@ -27,15 +30,25 @@ interface Message {
sender: string
content: string
timestamp: bigint
+ isPinned?: boolean
+}
+
+interface PinnedMessage {
+ messageId: bigint
+ sender: string
+ content: string
+ timestamp: bigint
}
export default function GroupChat() {
const [selectedGroup, setSelectedGroup] = useState(null)
const [messages, setMessages] = useState([])
+ const [pinnedMessage, setPinnedMessage] = useState(null)
const [newMessage, setNewMessage] = useState('')
const [newGroupName, setNewGroupName] = useState('')
const [newMember, setNewMember] = useState('')
const [userNames, setUserNames] = useState>({})
+ const [isLoadingPinnedMessage, setIsLoadingPinnedMessage] = useState(false)
// Message search functionality
const {
@@ -63,11 +76,30 @@ export default function GroupChat() {
args: selectedGroup ? [BigInt(selectedGroup), 0n, 100n] : undefined,
})
+ const { data: pinnedMessageData } = useReadContract({
+ address: CONTRACT_ADDRESSES.chat,
+ abi: chatAbi,
+ functionName: 'getGroupPinnedMessage',
+ args: selectedGroup ? [BigInt(selectedGroup)] : undefined,
+ query: {
+ enabled: !!selectedGroup,
+ },
+ })
+
useEffect(() => {
if (groupMessages) {
setMessages(groupMessages as Message[])
}
- }, [groupMessages])
+ }, [groupMessages])
+
+ useEffect(() => {
+ if (pinnedMessageData) {
+ setPinnedMessage(pinnedMessageData as PinnedMessage)
+ setIsLoadingPinnedMessage(false)
+ } else {
+ setPinnedMessage(null)
+ }
+ }, [pinnedMessageData])
useEffect(() => {
if (allUsers && allUsers.length > 0 && publicClient) {
@@ -133,6 +165,26 @@ export default function GroupChat() {
setNewMessage('')
}
+ const handlePinMessage = (messageId: number) => {
+ if (!selectedGroup) return
+ writeContract({
+ address: CONTRACT_ADDRESSES.chat,
+ abi: chatAbi,
+ functionName: 'pinGroupMessage',
+ args: [BigInt(selectedGroup), BigInt(messageId)],
+ })
+ }
+
+ const handleUnpinMessage = () => {
+ if (!selectedGroup) return
+ writeContract({
+ address: CONTRACT_ADDRESSES.chat,
+ abi: chatAbi,
+ functionName: 'unpinGroupMessage',
+ args: [BigInt(selectedGroup)],
+ })
+ }
+
const handleMemberSelect = (member: { address: string; ensName: string }) => {
setNewMember(member.address)
}
diff --git a/next-frontend/src/components/MainChat.tsx b/next-frontend/src/components/MainChat.tsx
index 744c7d2..6bc18ac 100644
--- a/next-frontend/src/components/MainChat.tsx
+++ b/next-frontend/src/components/MainChat.tsx
@@ -82,7 +82,7 @@ export default function MainChat({ onClose }: MainChatProps) {
// Get verification status for selected chat user
const recipientAddress = selectedChat?.id.replace('private_', '') as `0x${string}` | undefined
- const { verifications: userVerifications } = useBulkPublicVerification(
+ const { verifications: userVerifications } = useBulkSelfVerification(
recipientAddress ? [recipientAddress] : []
)
diff --git a/next-frontend/src/components/PresenceIndicator.tsx b/next-frontend/src/components/PresenceIndicator.tsx
index 6c4ff60..d481ed6 100644
--- a/next-frontend/src/components/PresenceIndicator.tsx
+++ b/next-frontend/src/components/PresenceIndicator.tsx
@@ -2,7 +2,7 @@
import { useState, useEffect } from 'react';
import Tier3Badge from '@/components/Tier3Badge';
-import { useBulkPublicVerification } from '@/hooks/usePublicVerification';
+import { useBulkSelfVerification } from '@/hooks/useBulkSelfVerification';
interface UserPresence {
address: string
@@ -24,9 +24,9 @@ export default function PresenceIndicator({
}: PresenceIndicatorProps) {
const [presenceData, setPresenceData] = useState(users)
- // Fetch public verification status for all users
+ // Fetch on-chain verification status for all users
const userAddresses = users.map(u => u.address)
- const { verifications: userVerifications } = useBulkPublicVerification(userAddresses)
+ const { verifications: userVerifications } = useBulkSelfVerification(userAddresses)
// Simulate real-time presence updates
useEffect(() => {
diff --git a/next-frontend/src/components/UserProfile.tsx b/next-frontend/src/components/UserProfile.tsx
index abee3b3..2d7f7cf 100644
--- a/next-frontend/src/components/UserProfile.tsx
+++ b/next-frontend/src/components/UserProfile.tsx
@@ -2,7 +2,7 @@
import { useAccount, useDisconnect } from 'wagmi';
import { useRegistration } from '@/hooks/useRegistration';
-import { usePublicVerification } from '@/hooks/usePublicVerification';
+import { useSelfVerification } from '@/hooks/useSelfVerification';
import Tier3Badge from '@/components/Tier3Badge';
interface UserProfileProps {
@@ -13,7 +13,7 @@ export default function UserProfile({ showFullAddress = false }: UserProfileProp
const { address, isConnected } = useAccount()
const { disconnect } = useDisconnect()
const { isRegistered, ensName, isLoading } = useRegistration()
- const { isVerified } = usePublicVerification(address)
+ const { verificationData } = useSelfVerification()
if (!isConnected || !address) {
return null // Let SimpleOnboarding handle the connect button
@@ -50,7 +50,7 @@ export default function UserProfile({ showFullAddress = false }: UserProfileProp
>>>>>>> 56443b93e5f2166e2a99d58f94535713daaf9b80
{displayName}
- {isVerified && }
+ {verificationData.selfVerified && }
{isRegistered && (
<<<<<<< HEAD
diff --git a/next-frontend/src/hooks/useBulkSelfVerification.ts b/next-frontend/src/hooks/useBulkSelfVerification.ts
new file mode 100644
index 0000000..cfb5c16
--- /dev/null
+++ b/next-frontend/src/hooks/useBulkSelfVerification.ts
@@ -0,0 +1,53 @@
+import { useReadContracts } from 'wagmi';
+import { useMemo } from 'react';
+
+const PROOF_OF_HUMAN_ADDRESS = (process.env.NEXT_PUBLIC_SELF_ENDPOINT || '0x72493afCa2789dA494DD3695d74b50DE7774336A') as `0x${string}`;
+
+const PROOF_OF_HUMAN_ABI = [
+ {
+ inputs: [{ name: '', type: 'address' }],
+ name: 'isVerified',
+ outputs: [{ name: '', type: 'bool' }],
+ stateMutability: 'view',
+ type: 'function',
+ },
+] as const;
+
+/**
+ * Hook to check verification status for multiple users from blockchain
+ * Returns a map of address -> verification status
+ */
+export function useBulkSelfVerification(addresses: string[]) {
+ // Create contracts array for batch reading
+ const contracts = useMemo(() =>
+ addresses.map(address => ({
+ address: PROOF_OF_HUMAN_ADDRESS,
+ abi: PROOF_OF_HUMAN_ABI,
+ functionName: 'isVerified' as const,
+ args: [address as `0x${string}`],
+ })),
+ [addresses.join(',')]
+ );
+
+ const { data, isLoading } = useReadContracts({
+ contracts,
+ query: {
+ enabled: addresses.length > 0,
+ },
+ });
+
+ // Transform results into a map
+ const verifications = useMemo(() => {
+ const result: Record = {};
+
+ if (data) {
+ addresses.forEach((address, index) => {
+ result[address] = (data[index]?.result as boolean) || false;
+ });
+ }
+
+ return result;
+ }, [data, addresses.join(',')]);
+
+ return { verifications, isLoading };
+}
\ No newline at end of file
diff --git a/next-frontend/src/hooks/useChat.ts b/next-frontend/src/hooks/useChat.ts
index ed08e5a..69d3fb2 100644
--- a/next-frontend/src/hooks/useChat.ts
+++ b/next-frontend/src/hooks/useChat.ts
@@ -10,6 +10,14 @@ interface Message {
receiver: string
content: string
timestamp: bigint
+ isPinned?: boolean
+}
+
+interface PinnedMessage {
+ messageId: bigint
+ sender: string
+ content: string
+ timestamp: bigint
}
const chatAbi = chatArtifact.abi
@@ -18,14 +26,26 @@ export function useChat() {
const { address: currentUserAddress } = useAccount()
const [selectedUser, setSelectedUser] = useState('')
const [messages, setMessages] = useState([])
+ const [pinnedMessage, setPinnedMessage] = useState(null)
const [isLoadingMessages, setIsLoadingMessages] = useState(false)
+ const [isLoadingPinnedMessage, setIsLoadingPinnedMessage] = useState(false)
const { writeContract: sendMessage, data: sendHash, isPending: isSending } = useWriteContract()
+ const { writeContract: pinMessage, data: pinHash, isPending: isPinning } = useWriteContract()
+ const { writeContract: unpinMessage, data: unpinHash, isPending: isUnpinning } = useWriteContract()
const { isLoading: isConfirmingSend, isSuccess: isSendSuccess } = useWaitForTransactionReceipt({
hash: sendHash,
})
+ const { isLoading: isConfirmingPin, isSuccess: isPinSuccess } = useWaitForTransactionReceipt({
+ hash: pinHash,
+ })
+
+ const { isLoading: isConfirmingUnpin, isSuccess: isUnpinSuccess } = useWaitForTransactionReceipt({
+ hash: unpinHash,
+ })
+
// Fetch messages for the selected conversation
const { data: conversationData, isLoading: isLoadingConversation, refetch: refetchConversation } = useReadContract({
address: CONTRACT_ADDRESSES.chat,
@@ -37,6 +57,17 @@ export function useChat() {
},
})
+ // Fetch pinned message for the selected conversation
+ const { data: pinnedMessageData, isLoading: isLoadingPinned, refetch: refetchPinnedMessage } = useReadContract({
+ address: CONTRACT_ADDRESSES.chat,
+ abi: chatAbi,
+ functionName: 'getPinnedMessage',
+ args: selectedUser && currentUserAddress ? [currentUserAddress, selectedUser] : undefined,
+ query: {
+ enabled: !!selectedUser && !!currentUserAddress,
+ },
+ })
+
// Update messages when conversation data changes
useEffect(() => {
if (conversationData) {
@@ -45,15 +76,28 @@ export function useChat() {
}
}, [conversationData])
+ // Update pinned message when data changes
+ useEffect(() => {
+ if (pinnedMessageData) {
+ setPinnedMessage(pinnedMessageData as PinnedMessage)
+ setIsLoadingPinnedMessage(false)
+ } else {
+ setPinnedMessage(null)
+ }
+ }, [pinnedMessageData])
+
// Load messages when user is selected
useEffect(() => {
if (selectedUser && currentUserAddress) {
setIsLoadingMessages(true)
+ setIsLoadingPinnedMessage(true)
refetchConversation()
+ refetchPinnedMessage()
} else {
setMessages([])
+ setPinnedMessage(null)
}
- }, [selectedUser, currentUserAddress, refetchConversation])
+ }, [selectedUser, currentUserAddress, refetchConversation, refetchPinnedMessage])
const handleSendMessage = useCallback(async (content: string) => {
if (!selectedUser || !content.trim() || !currentUserAddress) return
@@ -70,6 +114,36 @@ export function useChat() {
}
}, [selectedUser, currentUserAddress, sendMessage])
+ const handlePinMessage = useCallback(async (messageId: number) => {
+ if (!selectedUser || !currentUserAddress) return
+
+ try {
+ await pinMessage({
+ address: CONTRACT_ADDRESSES.chat,
+ abi: chatAbi,
+ functionName: 'pinMessage',
+ args: [selectedUser, BigInt(messageId)],
+ })
+ } catch (error) {
+ console.error('Failed to pin message:', error)
+ }
+ }, [selectedUser, currentUserAddress, pinMessage])
+
+ const handleUnpinMessage = useCallback(async () => {
+ if (!selectedUser || !currentUserAddress) return
+
+ try {
+ await unpinMessage({
+ address: CONTRACT_ADDRESSES.chat,
+ abi: chatAbi,
+ functionName: 'unpinMessage',
+ args: [selectedUser],
+ })
+ } catch (error) {
+ console.error('Failed to unpin message:', error)
+ }
+ }, [selectedUser, currentUserAddress, unpinMessage])
+
// Refresh messages after successful send
useEffect(() => {
if (isSendSuccess) {
@@ -77,6 +151,14 @@ export function useChat() {
}
}, [isSendSuccess, refetchConversation])
+ // Refresh pinned message after successful pin/unpin
+ useEffect(() => {
+ if (isPinSuccess || isUnpinSuccess) {
+ refetchPinnedMessage()
+ refetchConversation()
+ }
+ }, [isPinSuccess, isUnpinSuccess, refetchPinnedMessage, refetchConversation])
+
const selectUser = useCallback((userAddress: string) => {
setSelectedUser(userAddress)
}, [])
@@ -84,9 +166,15 @@ export function useChat() {
return {
selectedUser,
messages,
+ pinnedMessage,
isLoadingMessages: isLoadingMessages || isLoadingConversation,
+ isLoadingPinnedMessage: isLoadingPinnedMessage || isLoadingPinned,
isSending: isSending || isConfirmingSend,
+ isPinning: isPinning || isConfirmingPin,
+ isUnpinning: isUnpinning || isConfirmingUnpin,
sendMessage: handleSendMessage,
+ pinMessage: handlePinMessage,
+ unpinMessage: handleUnpinMessage,
selectUser,
currentUserAddress,
}
diff --git a/next-frontend/src/hooks/usePublicVerification.ts b/next-frontend/src/hooks/usePublicVerification.ts
deleted file mode 100644
index 77a63bc..0000000
--- a/next-frontend/src/hooks/usePublicVerification.ts
+++ /dev/null
@@ -1,97 +0,0 @@
-import { useState, useEffect } from 'react';
-
-/**
- * Hook to check if a user (by address) has completed Self Protocol verification
- * This data is public and fetched from the backend API
- */
-export function usePublicVerification(address: string | undefined) {
- const [isVerified, setIsVerified] = useState(false);
- const [isLoading, setIsLoading] = useState(false);
-
- useEffect(() => {
- if (!address) {
- setIsVerified(false);
- setIsLoading(false);
- return;
- }
-
- const checkVerification = async () => {
- setIsLoading(true);
- try {
- const response = await fetch('/api/self/status', {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({ address }),
- });
-
- if (response.ok) {
- const data = await response.json();
- setIsVerified(data.verified || false);
- } else {
- setIsVerified(false);
- }
- } catch (error) {
- console.error('Error checking verification status:', error);
- setIsVerified(false);
- } finally {
- setIsLoading(false);
- }
- };
-
- checkVerification();
- }, [address]);
-
- return { isVerified, isLoading };
-}
-
-/**
- * Hook to check verification status for multiple users
- * Returns a map of address -> verification status
- */
-export function useBulkPublicVerification(addresses: string[]) {
- const [verifications, setVerifications] = useState>({});
- const [isLoading, setIsLoading] = useState(false);
-
- useEffect(() => {
- if (!addresses || addresses.length === 0) {
- setVerifications({});
- setIsLoading(false);
- return;
- }
-
- const checkVerifications = async () => {
- setIsLoading(true);
- const results: Record = {};
-
- // Fetch verification status for each address
- await Promise.all(
- addresses.map(async (address) => {
- try {
- const response = await fetch('/api/self/status', {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({ address }),
- });
-
- if (response.ok) {
- const data = await response.json();
- results[address] = data.verified || false;
- } else {
- results[address] = false;
- }
- } catch (error) {
- console.error(`Error checking verification for ${address}:`, error);
- results[address] = false;
- }
- })
- );
-
- setVerifications(results);
- setIsLoading(false);
- };
-
- checkVerifications();
- }, [addresses.join(',')]); // Use join to create stable dependency
-
- return { verifications, isLoading };
-}
\ No newline at end of file
diff --git a/next-frontend/src/hooks/useSelfVerification.ts b/next-frontend/src/hooks/useSelfVerification.ts
index 359445c..2a2dc28 100644
--- a/next-frontend/src/hooks/useSelfVerification.ts
+++ b/next-frontend/src/hooks/useSelfVerification.ts
@@ -1,5 +1,5 @@
import { useState, useEffect } from 'react';
-import { useAccount } from 'wagmi';
+import { useAccount, useReadContract } from 'wagmi';
export interface SelfVerificationData {
selfVerified: boolean;
@@ -10,61 +10,78 @@ export interface SelfVerificationData {
minimumAge?: string;
}
+const PROOF_OF_HUMAN_ADDRESS = (process.env.NEXT_PUBLIC_SELF_ENDPOINT || '0x72493afCa2789dA494DD3695d74b50DE7774336A') as `0x${string}`;
+
+const PROOF_OF_HUMAN_ABI = [
+ {
+ inputs: [{ name: '', type: 'address' }],
+ name: 'isVerified',
+ outputs: [{ name: '', type: 'bool' }],
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ inputs: [{ name: '', type: 'address' }],
+ name: 'verificationTimestamp',
+ outputs: [{ name: '', type: 'uint256' }],
+ stateMutability: 'view',
+ type: 'function',
+ },
+] as const;
+
export function useSelfVerification() {
const { address } = useAccount();
const [verificationData, setVerificationData] = useState({
selfVerified: false,
});
- const [isLoading, setIsLoading] = useState(true);
- // Fetch verification status from backend API
- const fetchVerificationStatus = async () => {
+ // Read verification status from blockchain using mapping
+ const { data: isVerifiedOnChain, isLoading: isLoadingVerified } = useReadContract({
+ address: PROOF_OF_HUMAN_ADDRESS,
+ abi: PROOF_OF_HUMAN_ABI,
+ functionName: 'isVerified',
+ args: address ? [address] : undefined,
+ query: {
+ enabled: !!address,
+ }
+ });
+
+ // Read verification timestamp from blockchain
+ const { data: timestamp, isLoading: isLoadingTimestamp } = useReadContract({
+ address: PROOF_OF_HUMAN_ADDRESS,
+ abi: PROOF_OF_HUMAN_ABI,
+ functionName: 'verificationTimestamp',
+ args: address ? [address] : undefined,
+ query: {
+ enabled: !!address && !!isVerifiedOnChain,
+ }
+ });
+
+ const isLoading = isLoadingVerified || isLoadingTimestamp;
+
+ useEffect(() => {
if (!address) {
setVerificationData({ selfVerified: false });
- setIsLoading(false);
return;
}
- setIsLoading(true);
- try {
- const response = await fetch('/api/self/status', {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({ address }),
- });
+ const verified = !!isVerifiedOnChain;
+ let verifiedAt: string | undefined;
- if (response.ok) {
- const data = await response.json();
- if (data.verified) {
- setVerificationData({
- selfVerified: true,
- selfDid: data.selfDid,
- verifiedAt: data.verifiedAt,
- nationality: data.nationality,
- gender: data.gender,
- minimumAge: data.minimumAge,
- });
- } else {
- setVerificationData({ selfVerified: false });
- }
- } else {
- setVerificationData({ selfVerified: false });
- }
- } catch (error) {
- console.error('Error fetching verification status:', error);
- setVerificationData({ selfVerified: false });
- } finally {
- setIsLoading(false);
+ if (verified && timestamp) {
+ // Convert Unix timestamp to ISO string
+ verifiedAt = new Date(Number(timestamp) * 1000).toISOString();
}
- };
- useEffect(() => {
- fetchVerificationStatus();
- }, [address]);
+ setVerificationData({
+ selfVerified: verified,
+ verifiedAt,
+ });
+ }, [address, isVerifiedOnChain, timestamp]);
- // Refresh verification status (call after successful verification)
+ // Refresh is handled automatically by wagmi's useReadContract
const refreshVerification = async () => {
- await fetchVerificationStatus();
+ // No-op: wagmi automatically refetches on block changes
};
const saveVerification = async (data: Omit) => {
diff --git a/next-frontend/src/lib/db.ts b/next-frontend/src/lib/db.ts
deleted file mode 100644
index fdf8dff..0000000
--- a/next-frontend/src/lib/db.ts
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- * Database module for BlockBelle Next.js application
- * This module provides database functionality using Vercel Postgres
- * Currently falls back to in-memory shared store for development
- */
-
-import {
- saveVerification as storeSaveVerification,
- getVerification as storeGetVerification,
- type VerificationData
-} from './shared-store';
-
-export type { VerificationData } from './shared-store';
-
-export interface VerificationRecord {
- id: number;
- user_identifier: string;
- attestation_id: number;
- verified_at: string;
- nationality?: string;
- gender?: string;
- minimum_age?: string;
-}
-
-// Lazy-loaded SQL client
-let sqlClient: any = null;
-let sqlInitialized = false;
-
-async function getSql() {
- if (sqlInitialized) {
- return sqlClient;
- }
-
- sqlInitialized = true;
-
- // Only try to load Vercel Postgres if we have the connection string
- if (process.env.POSTGRES_URL) {
- try {
- const postgres = await import('@vercel/postgres');
- sqlClient = postgres.sql;
- return sqlClient;
- } catch (error) {
- console.warn('Vercel Postgres not available:', error);
- return null;
- }
- }
-
- return null;
-}
-
-/**
- * Initialize database tables (idempotent)
- * This function creates the necessary tables if they don't exist
- */
-export async function initDatabase(): Promise {
- const sql = await getSql();
-
- if (!sql) {
- console.log('Database not available, using in-memory store');
- return;
- }
-
- try {
- // Create verifications table if it doesn't exist
- await sql`
- CREATE TABLE IF NOT EXISTS verifications (
- id SERIAL PRIMARY KEY,
- user_identifier VARCHAR(255) UNIQUE NOT NULL,
- attestation_id INTEGER NOT NULL,
- verified_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
- nationality VARCHAR(3),
- gender VARCHAR(10),
- minimum_age VARCHAR(20)
- )
- `;
-
- console.log('Database initialized successfully');
- } catch (error) {
- console.warn('Database initialization failed, falling back to in-memory store:', error);
- }
-}
-
-/**
- * Save verification data to database
- */
-export async function saveVerification(userIdentifier: string, data: VerificationData): Promise {
- const sql = await getSql();
-
- if (!sql) {
- storeSaveVerification(userIdentifier, data);
- return;
- }
-
- try {
- // Try to save to database first
- await sql`
- INSERT INTO verifications (
- user_identifier,
- attestation_id,
- verified_at,
- nationality,
- gender,
- minimum_age
- ) VALUES (
- ${userIdentifier},
- ${data.attestationId || 0},
- ${data.verifiedAt},
- ${data.nationality || null},
- ${data.gender || null},
- ${data.minimumAge || null}
- )
- ON CONFLICT (user_identifier)
- DO UPDATE SET
- attestation_id = EXCLUDED.attestation_id,
- verified_at = EXCLUDED.verified_at,
- nationality = EXCLUDED.nationality,
- gender = EXCLUDED.gender,
- minimum_age = EXCLUDED.minimum_age
- `;
- } catch (error) {
- console.warn('Database save failed, using in-memory store:', error);
- // Fallback to in-memory storage
- storeSaveVerification(userIdentifier, data);
- }
-}
-
-/**
- * Get verification data from database
- */
-export async function getVerification(userIdentifier: string): Promise {
- const sql = await getSql();
-
- if (!sql) {
- return storeGetVerification(userIdentifier) || null;
- }
-
- try {
- // Try to get from database first
- const { rows } = await sql`
- SELECT * FROM verifications WHERE user_identifier = ${userIdentifier}
- `;
-
- if (rows.length === 0) {
- return null;
- }
-
- const row = rows[0];
- return {
- verified: true,
- attestationId: row.attestation_id,
- verifiedAt: row.verified_at,
- selfDid: row.user_identifier,
- nationality: row.nationality || undefined,
- gender: row.gender || undefined,
- minimumAge: row.minimum_age || undefined,
- };
- } catch (error) {
- console.warn('Database read failed, using in-memory store:', error);
- // Fallback to in-memory storage
- return storeGetVerification(userIdentifier) || null;
- }
-}
-
-/**
- * Check if a user is verified
- */
-export async function isVerified(userIdentifier: string): Promise {
- const verificationData = await getVerification(userIdentifier);
- return verificationData?.verified ?? false;
-}
\ No newline at end of file
diff --git a/next-frontend/src/lib/shared-store.ts b/next-frontend/src/lib/shared-store.ts
deleted file mode 100644
index 26762c5..0000000
--- a/next-frontend/src/lib/shared-store.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Shared verification store for SELF Protocol
- * This is a temporary in-memory store until database is connected
- *
- * IMPORTANT: This will be replaced with Vercel Postgres database
- */
-
-export interface VerificationData {
- verified: boolean;
- attestationId?: number;
- verifiedAt: string;
- selfDid: string;
- nationality?: string;
- gender?: string;
- minimumAge?: string;
-}
-
-// Shared Map instance used by both verify and status routes
-export const verificationStore = new Map();
-
-/**
- * Save verification data for a wallet address
- */
-export function saveVerification(address: string, data: VerificationData): void {
- verificationStore.set(address.toLowerCase(), data);
-}
-
-/**
- * Get verification data for a wallet address
- */
-export function getVerification(address: string): VerificationData | undefined {
- return verificationStore.get(address.toLowerCase());
-}
-
-/**
- * Check if an address is verified
- */
-export function isVerified(address: string): boolean {
- const data = verificationStore.get(address.toLowerCase());
- return data?.verified ?? false;
-}
-
-/**
- * Clear all verification data (for testing)
- */
-export function clearAllVerifications(): void {
- verificationStore.clear();
-}
\ No newline at end of file
diff --git a/src/WhisprChat.sol b/src/WhisprChat.sol
index f9092d5..2027be3 100644
--- a/src/WhisprChat.sol
+++ b/src/WhisprChat.sol
@@ -15,6 +15,7 @@ contract WhisprChat is AutomationCompatibleInterface {
address receiver;
string content;
uint256 timestamp;
+ bool isPinned;
}
// Group struct for group conversations
@@ -22,6 +23,15 @@ contract WhisprChat is AutomationCompatibleInterface {
string name;
string avatarHash;
address[] members;
+ uint256 pinnedMessageId;
+ }
+
+ // Pinned message struct
+ struct PinnedMessage {
+ uint256 messageId;
+ address sender;
+ string content;
+ uint256 timestamp;
}
// Mapping from conversation ID to array of messages
@@ -33,6 +43,12 @@ contract WhisprChat is AutomationCompatibleInterface {
// Mapping from group ID to array of messages
mapping(uint256 => Message[]) private groupConversations;
+ // Mapping from conversation ID to pinned message
+ mapping(bytes32 => PinnedMessage) private conversationPinnedMessages;
+
+ // Mapping from group ID to pinned message
+ mapping(uint256 => PinnedMessage) private groupPinnedMessages;
+
// Counter for group IDs
uint256 public groupCounter;
@@ -58,6 +74,10 @@ contract WhisprChat is AutomationCompatibleInterface {
event GroupCreated(uint256 indexed groupId, string name, address indexed creator);
event GroupMessageSent(uint256 indexed groupId, address indexed sender, string message, uint256 timestamp);
event OraclePricesPosted(uint256 indexed groupId, uint256 timestamp);
+ event MessagePinned(address indexed from, address indexed to, uint256 messageId, uint256 timestamp);
+ event GroupMessagePinned(uint256 indexed groupId, address indexed sender, uint256 messageId, uint256 timestamp);
+ event MessageUnpinned(address indexed from, address indexed to, uint256 timestamp);
+ event GroupMessageUnpinned(uint256 indexed groupId, address indexed sender, uint256 timestamp);
/**
* @dev Constructor to initialize Chainlink price feeds and automation interval
@@ -69,7 +89,7 @@ contract WhisprChat is AutomationCompatibleInterface {
ethUsdPriceFeed = AggregatorV3Interface(0x694AA1769357215DE4FAC081bf1f309aDC325306);
btcEthPriceFeed = AggregatorV3Interface(0xCfe54B5c468301f0C6AE4a63F9b6C1d28932D7dc);
bnbEthPriceFeed = AggregatorV3Interface(0x9Ae3a6b1E5F0c5C60b675ECa8d7edD0Eed417F07);
-
+
interval = _interval;
lastTimeStamp = block.timestamp;
}
@@ -92,7 +112,8 @@ contract WhisprChat is AutomationCompatibleInterface {
sender: msg.sender,
receiver: to,
content: content,
- timestamp: block.timestamp
+ timestamp: block.timestamp,
+ isPinned: false
});
conversations[conversationId].push(newMessage);
@@ -152,7 +173,8 @@ contract WhisprChat is AutomationCompatibleInterface {
groups[groupId] = Group({
name: name,
avatarHash: avatarHash,
- members: finalMembers
+ members: finalMembers,
+ pinnedMessageId: 0
});
// Emit event
@@ -176,7 +198,8 @@ contract WhisprChat is AutomationCompatibleInterface {
sender: msg.sender,
receiver: address(0), // No specific receiver for group messages
content: content,
- timestamp: block.timestamp
+ timestamp: block.timestamp,
+ isPinned: false
});
groupConversations[groupId].push(newMessage);
@@ -193,7 +216,7 @@ contract WhisprChat is AutomationCompatibleInterface {
function getGroupConversation(uint256 groupId) external view returns (Message[] memory) {
require(groupId > 0 && groupId <= groupCounter, "Invalid group ID");
require(isGroupMember(groupId, msg.sender), "Not a member of this group");
-
+
return groupConversations[groupId];
}
@@ -206,7 +229,7 @@ contract WhisprChat is AutomationCompatibleInterface {
*/
function getGroupDetails(uint256 groupId) external view returns (string memory name, string memory avatarHash, address[] memory members) {
require(groupId > 0 && groupId <= groupCounter, "Invalid group ID");
-
+
Group memory group = groups[groupId];
return (group.name, group.avatarHash, group.members);
}
@@ -292,7 +315,8 @@ contract WhisprChat is AutomationCompatibleInterface {
sender: ORACLE_BOT,
receiver: address(0),
content: priceMessages[i],
- timestamp: block.timestamp
+ timestamp: block.timestamp,
+ isPinned: false
});
groupConversations[groupId].push(oracleMessage);
@@ -339,6 +363,130 @@ contract WhisprChat is AutomationCompatibleInterface {
defaultGroupId = _newDefaultGroupId;
}
+ /**
+ * @dev Pin a message in a conversation
+ * @param to The address of the other user in the conversation
+ * @param messageId The ID of the message to pin
+ */
+ function pinMessage(address to, uint256 messageId) external {
+ require(to != address(0), "Invalid receiver address");
+ require(to != msg.sender, "Cannot pin message in conversation with yourself");
+
+ bytes32 conversationId = getConversationId(msg.sender, to);
+ Message[] storage conversationMessages = conversations[conversationId];
+
+ require(messageId < conversationMessages.length, "Invalid message ID");
+ require(!conversationMessages[messageId].isPinned, "Message is already pinned");
+
+ conversationMessages[messageId].isPinned = true;
+
+ conversationPinnedMessages[conversationId] = PinnedMessage({
+ messageId: messageId,
+ sender: conversationMessages[messageId].sender,
+ content: conversationMessages[messageId].content,
+ timestamp: conversationMessages[messageId].timestamp
+ });
+
+ emit MessagePinned(msg.sender, to, messageId, block.timestamp);
+ }
+
+ /**
+ * @dev Unpin a message in a conversation
+ * @param to The address of the other user in the conversation
+ */
+ function unpinMessage(address to) external {
+ require(to != address(0), "Invalid receiver address");
+ require(to != msg.sender, "Cannot unpin message in conversation with yourself");
+
+ bytes32 conversationId = getConversationId(msg.sender, to);
+ Message[] storage conversationMessages = conversations[conversationId];
+
+ // Find the currently pinned message and unpin it
+ for (uint256 i = 0; i < conversationMessages.length; i++) {
+ if (conversationMessages[i].isPinned) {
+ conversationMessages[i].isPinned = false;
+ delete conversationPinnedMessages[conversationId];
+ emit MessageUnpinned(msg.sender, to, block.timestamp);
+ return;
+ }
+ }
+
+ revert("No pinned message found");
+ }
+
+ /**
+ * @dev Get the pinned message in a conversation
+ * @param user1 First user address
+ * @param user2 Second user address
+ * @return The pinned message if exists
+ */
+ function getPinnedMessage(address user1, address user2) external view returns (PinnedMessage memory) {
+ bytes32 conversationId = getConversationId(user1, user2);
+ return conversationPinnedMessages[conversationId];
+ }
+
+ /**
+ * @dev Pin a message in a group conversation
+ * @param groupId The ID of the group
+ * @param messageId The ID of the message to pin
+ */
+ function pinGroupMessage(uint256 groupId, uint256 messageId) external {
+ require(groupId > 0 && groupId <= groupCounter, "Invalid group ID");
+ require(isGroupMember(groupId, msg.sender), "Not a member of this group");
+
+ Message[] storage groupMessages = groupConversations[groupId];
+
+ require(messageId < groupMessages.length, "Invalid message ID");
+ require(!groupMessages[messageId].isPinned, "Message is already pinned");
+
+ groupMessages[messageId].isPinned = true;
+
+ groupPinnedMessages[groupId] = PinnedMessage({
+ messageId: messageId,
+ sender: groupMessages[messageId].sender,
+ content: groupMessages[messageId].content,
+ timestamp: groupMessages[messageId].timestamp
+ });
+
+ groups[groupId].pinnedMessageId = messageId;
+
+ emit GroupMessagePinned(groupId, msg.sender, messageId, block.timestamp);
+ }
+
+ /**
+ * @dev Unpin a message in a group conversation
+ * @param groupId The ID of the group
+ */
+ function unpinGroupMessage(uint256 groupId) external {
+ require(groupId > 0 && groupId <= groupCounter, "Invalid group ID");
+ require(isGroupMember(groupId, msg.sender), "Not a member of this group");
+
+ Message[] storage groupMessages = groupConversations[groupId];
+
+ // Find the currently pinned message and unpin it
+ for (uint256 i = 0; i < groupMessages.length; i++) {
+ if (groupMessages[i].isPinned) {
+ groupMessages[i].isPinned = false;
+ delete groupPinnedMessages[groupId];
+ groups[groupId].pinnedMessageId = 0;
+ emit GroupMessageUnpinned(groupId, msg.sender, block.timestamp);
+ return;
+ }
+ }
+
+ revert("No pinned message found");
+ }
+
+ /**
+ * @dev Get the pinned message in a group conversation
+ * @param groupId The ID of the group
+ * @return The pinned message if exists
+ */
+ function getGroupPinnedMessage(uint256 groupId) external view returns (PinnedMessage memory) {
+ require(groupId > 0 && groupId <= groupCounter, "Invalid group ID");
+ return groupPinnedMessages[groupId];
+ }
+
/**
* @dev Helper function to convert int to string
* @param _i Integer to convert
@@ -348,30 +496,30 @@ contract WhisprChat is AutomationCompatibleInterface {
if (_i == 0) {
return "0";
}
-
+
bool negative = _i < 0;
uint256 temp = uint256(negative ? -_i : _i);
uint256 digits;
-
+
uint256 tempValue = temp;
while (tempValue != 0) {
digits++;
tempValue /= 10;
}
-
+
bytes memory buffer = new bytes(negative ? digits + 1 : digits);
uint256 index = buffer.length;
-
+
while (temp != 0) {
index--;
buffer[index] = bytes1(uint8(48 + temp % 10));
temp /= 10;
}
-
+
if (negative) {
buffer[0] = "-";
}
-
+
return string(buffer);
}