Skip to content

Instantly share code, notes, and snippets.

@Luke-Rogerson
Created January 25, 2024 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Luke-Rogerson/4f6b5fbc5242df547b6f2c5704014ea8 to your computer and use it in GitHub Desktop.
Save Luke-Rogerson/4f6b5fbc5242df547b6f2c5704014ea8 to your computer and use it in GitHub Desktop.
create_order_body
{
"price": "0.86500000",
"size": "40",
"symbol": "MATIC-USDC",
"side": "sell",
"clientOrderId": "550e8400-e29b-41d4-a716-446655440000",
"eip712Sig": "0xc83cacc200812f9f62f643f3ff6e3ce5474c05d440ae8149097596db632ede033179ca2ee150cdc17a146697ac43c08eacd1e7faf2ec1dacebbc837823ea5f791c",
"eip712Domain": {
"name": "RePermit",
"chainId": "137",
"verifyingContract": "0x4d415B58EA43988FfF7f50A3475718b0858fE0f1"
},
"eip712Msg": {
"permitted": {
"token": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
"amount": "40000000000000000000"
},
"spender": "0x0B94c1A3E11F8aaA25D27cAf8DD05818e6f2Ad97",
"nonce": "1000",
"deadline": "1709071200",
"witness": {
"info": {
"reactor": "0x0B94c1A3E11F8aaA25D27cAf8DD05818e6f2Ad97",
"swapper": "0x8fd379246834eac74B8419FfdA202CF8051F7A03",
"nonce": "1000",
"deadline": "1709071200",
"additionalValidationContract": "0x0000000000000000000000000000000000000000",
"additionalValidationData": "0x"
},
"exclusiveFiller": "0x1a08D64Fb4a7D0b6DA5606A1e4619c147C3fB95e",
"exclusivityOverrideBps": "0",
"input": {
"token": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
"amount": "40000000000000000000"
},
"outputs": [
{
"token": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
"amount": "34600000",
"recipient": "0x8fd379246834eac74B8419FfdA202CF8051F7A03"
}
]
}
},
"eip712MsgTypes": {
"RePermitWitnessTransferFrom": [
{
"name": "permitted",
"type": "TokenPermissions"
},
{
"name": "spender",
"type": "address"
},
{
"name": "nonce",
"type": "uint256"
},
{
"name": "deadline",
"type": "uint256"
},
{
"name": "witness",
"type": "PartialOrder"
}
],
"TokenPermissions": [
{
"name": "token",
"type": "address"
},
{
"name": "amount",
"type": "uint256"
}
],
"PartialOrder": [
{
"name": "info",
"type": "OrderInfo"
},
{
"name": "exclusiveFiller",
"type": "address"
},
{
"name": "exclusivityOverrideBps",
"type": "uint256"
},
{
"name": "input",
"type": "PartialInput"
},
{
"name": "outputs",
"type": "PartialOutput[]"
}
],
"OrderInfo": [
{
"name": "reactor",
"type": "address"
},
{
"name": "swapper",
"type": "address"
},
{
"name": "nonce",
"type": "uint256"
},
{
"name": "deadline",
"type": "uint256"
},
{
"name": "additionalValidationContract",
"type": "address"
},
{
"name": "additionalValidationData",
"type": "bytes"
}
],
"PartialInput": [
{
"name": "token",
"type": "address"
},
{
"name": "amount",
"type": "uint256"
}
],
"PartialOutput": [
{
"name": "token",
"type": "address"
},
{
"name": "amount",
"type": "uint256"
},
{
"name": "recipient",
"type": "address"
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment