feat: simplify
This commit is contained in:
36
src/bin/lib/help.rs
Normal file
36
src/bin/lib/help.rs
Normal file
@@ -0,0 +1,36 @@
|
||||
pub const HELP_TEXT: &str = "\
|
||||
USAGE:
|
||||
tycho-encode [ROUTER_ADDRESS]
|
||||
|
||||
ARGS:
|
||||
ROUTER_ADDRESS The address of the router contract [default: 0x1234567890123456789012345678901234567890]
|
||||
|
||||
The program reads a JSON object from stdin containing the swap details and outputs the encoded transaction.
|
||||
The JSON object should have the following structure:
|
||||
{
|
||||
\"sender\": \"0x...\",
|
||||
\"receiver\": \"0x...\",
|
||||
\"given_token\": \"0x...\",
|
||||
\"given_amount\": \"123...\",
|
||||
\"checked_token\": \"0x...\",
|
||||
\"exact_out\": false,
|
||||
\"slippage\": 0.01,
|
||||
\"expected_amount\": \"123...\",
|
||||
\"check_amount\": \"123...\",
|
||||
\"swaps\": [{
|
||||
\"component\": {
|
||||
\"id\": \"...\",
|
||||
\"protocol_system\": \"...\",
|
||||
\"protocol_type_name\": \"...\",
|
||||
\"chain\": \"ethereum\",
|
||||
\"tokens\": [\"0x...\"],
|
||||
\"contract_ids\": [\"0x...\"],
|
||||
\"static_attributes\": {\"key\": \"0x...\"}
|
||||
},
|
||||
\"token_in\": \"0x...\",
|
||||
\"token_out\": \"0x...\",
|
||||
\"split\": 1.0
|
||||
}],
|
||||
\"router_address\": \"0x...\",
|
||||
\"direct_execution\": false
|
||||
}";
|
||||
Reference in New Issue
Block a user