chore: small polishings to example
- Add note in readme that order will need to be encoded still - Fix log - Don't pass executors to builder
This commit is contained in:
@@ -5,6 +5,9 @@ This guide enables you to:
|
|||||||
1. Create a Solution object
|
1. Create a Solution object
|
||||||
2. Create callback data for executing a UniswapX Order
|
2. Create callback data for executing a UniswapX Order
|
||||||
|
|
||||||
|
Note: This guide only encodes the callback data for you. You will still have to encode the call to the
|
||||||
|
`execute` method of the filler, which also includes the encoded UniswapX order.
|
||||||
|
|
||||||
## How to run
|
## How to run
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ fn main() {
|
|||||||
let encoder = TychoRouterEncoderBuilder::new()
|
let encoder = TychoRouterEncoderBuilder::new()
|
||||||
.chain(tycho_common::models::Chain::Ethereum)
|
.chain(tycho_common::models::Chain::Ethereum)
|
||||||
.user_transfer_type(UserTransferType::TransferFrom)
|
.user_transfer_type(UserTransferType::TransferFrom)
|
||||||
.executors_file_path("config/test_executor_addresses.json".to_string())
|
|
||||||
.router_address(router_address.clone())
|
.router_address(router_address.clone())
|
||||||
.build()
|
.build()
|
||||||
.expect("Failed to build encoder");
|
.expect("Failed to build encoder");
|
||||||
@@ -163,7 +162,7 @@ fn main() {
|
|||||||
|
|
||||||
let hex_calldata = encode(&full_calldata);
|
let hex_calldata = encode(&full_calldata);
|
||||||
|
|
||||||
println!(" ====== Simple swap WETH -> USDC ======");
|
println!(" ====== Simple swap DAI -> USDT ======");
|
||||||
println!(
|
println!(
|
||||||
"The following callback data should be sent to the filler contract, along with the \
|
"The following callback data should be sent to the filler contract, along with the \
|
||||||
encoded order and signature: {:?}",
|
encoded order and signature: {:?}",
|
||||||
|
|||||||
Reference in New Issue
Block a user