Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to Executor Contract
# Contributing to Multiplexer

We love your input! We want to make contributing to Executor Contract as easy and transparent as possible, whether it's:
We love your input! We want to make contributing to Multiplexer as easy and transparent as possible, whether it's:

- Reporting a bug
- Discussing the current state of the code
Expand All @@ -24,8 +24,8 @@ Pull requests are the best way to propose changes to the codebase. We actively w
## Any contributions you make will be under the MIT Software License
In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.

## Report bugs using Github's [issue tracker](https://github.com/yourusername/executor-contract/issues)
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/yourusername/executor-contract/issues/new); it's that easy!
## Report bugs using Github's [issue tracker](https://github.com/BitFinding/multiplexer/issues)
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/BitFinding/multiplexer/issues/new); it's that easy!

## Write bug reports with detail, background, and sample code

Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ readme = "README.md"
alloy-primitives = { version = "1.5.2" }

[dev-dependencies]
tokio = { version = "1.44", features = ["rt", "macros"] }
alloy = { version = "1.2.1", features = ["full", "node-bindings"] }
tokio = { version = "1", features = ["rt", "macros"] }
alloy = { version = "1.7", features = ["full", "node-bindings"] }

[build-dependencies]
hex = "0.4.3"
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ This example demonstrates how to construct the bytecode for a Morpho flash loan

```rust
use alloy::{
primitives::{address, uint, Address, Bytes, U256, hex},
primitives::{address, uint, Address, U256, hex},
sol,
sol_types::{SolCall},
sol_types::SolCall,
};
use multiplexer::FlowBuilder;
use multiplexer_evm::FlowBuilder;

// Define necessary constants
const ONEHUNDRED_ETH: U256 = uint!(100000000000000000000_U256); // 100e18
const HUNDRED_ETH: U256 = uint!(100000000000000000000_U256); // 100e18
const WETH9: Address = address!("c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2");
const MORPHO: Address = address!("BBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb");

Expand All @@ -74,9 +74,9 @@ fn generate_morpho_flashloan_flow() -> Vec<u8> {
// It needs to ensure Morpho can pull the funds back.
let approve_calldata = IERC20::approveCall {
spender: MORPHO,
value: ONEHUNDRED_ETH, // Approve the exact loan amount.
// Note: A real flash loan requires approving amount + fee.
// The executor must hold sufficient WETH *before* this approval runs.
value: HUNDRED_ETH, // Approve the exact loan amount.
// Note: A real flash loan requires approving amount + fee.
// The executor must hold sufficient WETH *before* this approval runs.
}.abi_encode();

let inner_flow_bytes = FlowBuilder::empty()
Expand All @@ -89,7 +89,7 @@ fn generate_morpho_flashloan_flow() -> Vec<u8> {
// This is the main flow sent to the executor contract transaction.
let flashloan_calldata = IMorpho::flashLoanCall {
token: WETH9, // Asset to borrow
assets: ONEHUNDRED_ETH, // Amount to borrow
assets: HUNDRED_ETH, // Amount to borrow
data: inner_flow_bytes.into(), // Pass the repayment flow as callback data
}.abi_encode();

Expand Down
Loading