# Full Mode Simulation
curl 'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate' \
-H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
-H 'content-type: application/json' \
--data-raw '{"network_id":"1","from":"0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df","to":"0xdef171fe48cf0115b1d80b88dc8eab59176fee57","input":"0xa94e78ef000000000000000000000000000000000000000000000000000000000000002000000000000000000000000068037790a0229e9ce6eaa8a99ea92964106c470300000000000000000000000000000000000000000000010f0cf064dd592000000000000000000000000000000000000000000000000000000000000145dc1b2e00000000000000000000000000000000000000000000000000000001477f4d7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000007800000000000000000000000000000000000000000000000000000000064d281e65c9438a5a99c4bccb1035296d5d2d8d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000320000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002b68037790a0229e9ce6eaa8a99ea92964106c47030001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a730000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000060000000000000000000000001b81d678ffb9c0263b24a97847620c99d213eb14000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000064dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","gas":648318,"block_number":17884583,"value":"0","save":true,"save_if_fails":true,"simulation_type":"full"}' \
--compressed
# Quick Mode Simulation
curl 'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate' \
-H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
-H 'content-type: application/json' \
--data-raw '{"network_id":"1","from":"0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df","to":"0xdef171fe48cf0115b1d80b88dc8eab59176fee57","input":"0xa94e78ef000000000000000000000000000000000000000000000000000000000000002000000000000000000000000068037790a0229e9ce6eaa8a99ea92964106c470300000000000000000000000000000000000000000000010f0cf064dd592000000000000000000000000000000000000000000000000000000000000145dc1b2e00000000000000000000000000000000000000000000000000000001477f4d7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000007800000000000000000000000000000000000000000000000000000000064d281e65c9438a5a99c4bccb1035296d5d2d8d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000320000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002b68037790a0229e9ce6eaa8a99ea92964106c47030001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a730000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000060000000000000000000000001b81d678ffb9c0263b24a97847620c99d213eb14000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000064dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","gas":648318,"block_number":17884583,"value":"0","save":true,"save_if_fails":true,"simulation_type":"quick"}' \
--compressed
# ABI Mode Simulation
curl 'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate' \
-H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
-H 'content-type: application/json' \
--data-raw '{"network_id":"1","from":"0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df","to":"0xdef171fe48cf0115b1d80b88dc8eab59176fee57","input":"0xa94e78ef000000000000000000000000000000000000000000000000000000000000002000000000000000000000000068037790a0229e9ce6eaa8a99ea92964106c470300000000000000000000000000000000000000000000010f0cf064dd592000000000000000000000000000000000000000000000000000000000000145dc1b2e00000000000000000000000000000000000000000000000000000001477f4d7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000007800000000000000000000000000000000000000000000000000000000064d281e65c9438a5a99c4bccb1035296d5d2d8d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000320000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002b68037790a0229e9ce6eaa8a99ea92964106c47030001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a730000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000060000000000000000000000001b81d678ffb9c0263b24a97847620c99d213eb14000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000064dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","gas":648318,"block_number":17884583,"value":"0","save":true,"save_if_fails":true,"simulation_type":"abi"}' \
--compressed
# Estimate Gas Simulation
curl 'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate' \
-H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
-H 'content-type: application/json' \
--data-raw '{"network_id":"1","from":"0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df","to":"0xdef171fe48cf0115b1d80b88dc8eab59176fee57","input":"0xa94e78ef000000000000000000000000000000000000000000000000000000000000002000000000000000000000000068037790a0229e9ce6eaa8a99ea92964106c470300000000000000000000000000000000000000000000010f0cf064dd592000000000000000000000000000000000000000000000000000000000000145dc1b2e00000000000000000000000000000000000000000000000000000001477f4d7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000007800000000000000000000000000000000000000000000000000000000064d281e65c9438a5a99c4bccb1035296d5d2d8d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000320000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002b68037790a0229e9ce6eaa8a99ea92964106c47030001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a730000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000060000000000000000000000001b81d678ffb9c0263b24a97847620c99d213eb14000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000064dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","gas":648318,"block_number":17884583,"value":"0","save":true,"save_if_fails":true,"estimate_gas":true,"simulation_type":"quick"}' \
--compressed
# Failed Transaction Simulation
curl 'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate' \
-H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
-H 'content-type: application/json' \
--data-raw '{"network_id":"1","block_number":18827905,"transaction_index":222,"from":"0xd8da6bf26964af9d7eed9e03e53415d37aa96045","input":"0xa94e78ef0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000eaa63125dd63f10874f99cdbbb18410e7fc79dd300000000000000000000000000000000000000000004f68ca6d8cd91c6000000000000000000000000000000000000000000000000000000000000036e22623300000000000000000000000000000000000000000000000000000003728c0b380000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000076000000000000000000000000000000000000000000000000000000000658357363e8a57981b0747b79f70262f8257408600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000300000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004000000000000000000000000f9234cb08edb93c0d4a4d4c70cc3ffd070e78e07000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000004de5672fefac7f6e3017d9a2f1c14fe048191a24ce14000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000658c3d55000000000000000000000000000000000000000000000000000000000000002bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","to":"0xdef171fe48cf0115b1d80b88dc8eab59176fee57","gas":617885,"gas_price":"87235100681","value":"0","access_list":[],"generate_access_list":true,"save":true,"simulation_type":"quick"}' \
--compressedimport axios from 'axios';
const response = await axios.post(
'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate',
{
'network_id': '1',
'from': '0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df',
'to': '0xdef171fe48cf0115b1d80b88dc8eab59176fee57',
'input': '0xa94e78ef000000000000000000000000000000000000000000000000000000000000002000000000000000000000000068037790a0229e9ce6eaa8a99ea92964106c470300000000000000000000000000000000000000000000010f0cf064dd592000000000000000000000000000000000000000000000000000000000000145dc1b2e00000000000000000000000000000000000000000000000000000001477f4d7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000007800000000000000000000000000000000000000000000000000000000064d281e65c9438a5a99c4bccb1035296d5d2d8d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000320000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002b68037790a0229e9ce6eaa8a99ea92964106c47030001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a730000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000060000000000000000000000001b81d678ffb9c0263b24a97847620c99d213eb14000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000064dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
'gas': 648318,
'block_number': 17884583,
'value': '0',
'save': true,
'save_if_fails': true,
'simulation_type': 'full'
},
{
headers: {
'X-Access-Key': '${TENDERLY_ACCESS_KEY}',
'content-type': 'application/json'
}
}
);import requests
headers = {
'X-Access-Key': '${TENDERLY_ACCESS_KEY}',
'content-type': 'application/json',
}
json_data = {
'network_id': '1',
'from': '0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df',
'to': '0xdef171fe48cf0115b1d80b88dc8eab59176fee57',
'input': '0xa94e78ef000000000000000000000000000000000000000000000000000000000000002000000000000000000000000068037790a0229e9ce6eaa8a99ea92964106c470300000000000000000000000000000000000000000000010f0cf064dd592000000000000000000000000000000000000000000000000000000000000145dc1b2e00000000000000000000000000000000000000000000000000000001477f4d7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000007800000000000000000000000000000000000000000000000000000000064d281e65c9438a5a99c4bccb1035296d5d2d8d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000320000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002b68037790a0229e9ce6eaa8a99ea92964106c47030001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a730000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000060000000000000000000000001b81d678ffb9c0263b24a97847620c99d213eb14000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000064dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
'gas': 648318,
'block_number': 17884583,
'value': '0',
'save': True,
'save_if_fails': True,
'simulation_type': 'full',
}
response = requests.post(
'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate',
headers=headers,
json=json_data,
)package main
import (
"fmt"
"io"
"log"
"net/http"
"strings"
)
func main() {
client := &http.Client{}
var data = strings.NewReader(`{"network_id":"1","from":"0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df","to":"0xdef171fe48cf0115b1d80b88dc8eab59176fee57","input":"0xa94e78ef000000000000000000000000000000000000000000000000000000000000002000000000000000000000000068037790a0229e9ce6eaa8a99ea92964106c470300000000000000000000000000000000000000000000010f0cf064dd592000000000000000000000000000000000000000000000000000000000000145dc1b2e00000000000000000000000000000000000000000000000000000001477f4d7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000007800000000000000000000000000000000000000000000000000000000064d281e65c9438a5a99c4bccb1035296d5d2d8d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000320000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002b68037790a0229e9ce6eaa8a99ea92964106c47030001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a730000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000060000000000000000000000001b81d678ffb9c0263b24a97847620c99d213eb14000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000064dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","gas":648318,"block_number":17884583,"value":"0","save":true,"save_if_fails":true,"simulation_type":"full"}`)
req, err := http.NewRequest("POST", "https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate", data)
if err != nil {
log.Fatal(err)
}
req.Header.Set("X-Access-Key", "${TENDERLY_ACCESS_KEY}")
req.Header.Set("content-type", "application/json")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
bodyText, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText)
}{
"transaction": {
"hash": "0x8bb054967340f08827e1943ad34e2a448357e72ad1adee7397c577a716530a0f",
"block_hash": "",
"block_number": 17884583,
"from": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"gas": 648318,
"gas_price": 0,
"gas_fee_cap": 0,
"gas_tip_cap": 0,
"cumulative_gas_used": 0,
"gas_used": 45065,
"effective_gas_price": 0,
"input": "0xa94e78ef0000000000000000000000000000000000000000000000000000000000000020...",
"nonce": 1094,
"to": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"index": 0,
"value": "0x",
"access_list": null,
"status": false,
"addresses": [
"0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"0xbd7b550d2e7571383d84acf597a00d341e5c406e"
],
"contract_ids": [
"eth:1:0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"eth:1:0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"eth:1:0xbd7b550d2e7571383d84acf597a00d341e5c406e"
],
"network_id": "1",
"timestamp": "2023-08-10T12:48:11Z",
"function_selector": "",
"l1_block_number": 0,
"l1_timestamp": 0,
"deposit_tx": false,
"system_tx": false,
"sig": {
"v": "0x0",
"r": "0x0",
"s": "0x0"
},
"transaction_info": {
"contract_id": "eth:1:0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"block_number": 17884583,
"transaction_id": "0x8bb054967340f08827e1943ad34e2a448357e72ad1adee7397c577a716530a0f",
"contract_address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"method": "fallback",
"parameters": null,
"intrinsic_gas": 32744,
"refund_gas": 0,
"call_trace": {
"hash": "0x8bb054967340f08827e1943ad34e2a448357e72ad1adee7397c577a716530a0f",
"contract_name": "AugustusSwapper",
"function_name": "fallback",
"function_pc": 100,
"function_op": "JUMPDEST",
"function_file_index": 0,
"function_code_start": 47102,
"function_line_number": 1467,
"function_code_length": 5950,
"absolute_position": 28,
"caller_pc": 0,
"caller_op": "CALL",
"call_type": "CALL",
"address": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"from": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"from_balance": "50912118197849012",
"to": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"to_balance": "0",
"value": "0",
"caller": {
"address": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"balance": "50912118197849012"
},
"block_timestamp": "0001-01-01T00:00:00Z",
"gas": 615574,
"gas_used": 12321,
"intrinsic_gas": 32744,
"storage_address": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"input": "0xa94e78ef0000000000000000000000000000000000000000000000000000000000000020...",
"nonce_diff": [
{
"address": "0x3F41a1CFd3C8B8d9c162dE0f42307a0095A6e5DF",
"original": "1094",
"dirty": "1095"
}
],
"output": "0x",
"decoded_output": null,
"error_hex_data": "0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000011446561646c696e65206272656163686564000000000000000000000000000000",
"network_id": "1",
"calls": [
{
"hash": "",
"contract_name": "AugustusSwapper",
"function_name": "getImplementation",
"function_pc": 1627,
"function_op": "JUMPDEST",
"function_file_index": 0,
"function_code_start": 49421,
"function_line_number": 1539,
"function_code_length": 123,
"absolute_position": 59,
"caller_pc": 467,
"caller_op": "JUMP",
"caller_file_index": 0,
"caller_line_number": 1497,
"caller_code_start": 48052,
"caller_code_length": 27,
"call_type": "JUMPDEST",
"address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"from": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"from_balance": null,
"to": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"to_balance": null,
"value": null,
"caller": {
"address": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"balance": "50912118197849012"
},
"block_timestamp": "0001-01-01T00:00:00Z",
"gas": 615338,
"gas_used": 2202,
"storage_address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"input": "0x",
"decoded_input": [
{
"soltype": {
"name": "selector",
"type": "bytes4",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bytes"
}
},
"value": "0xa94e78ef"
}
],
"output": "0x",
"decoded_output": [
{
"soltype": {
"name": "",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
"value": "0xbd7b550d2e7571383d84acf597a00d341e5c406e"
}
],
"network_id": "",
"calls": null
},
{
"hash": "",
"contract_name": "AugustusSwapper",
"function_name": "multiSwap",
"function_pc": 2546,
"function_op": "JUMPDEST",
"function_file_index": 14,
"function_code_start": 1200,
"function_line_number": 43,
"function_code_length": 2514,
"absolute_position": 2044,
"caller_pc": 736,
"caller_op": "DELEGATECALL",
"caller_file_index": 0,
"caller_line_number": 1508,
"caller_code_start": 48425,
"caller_code_length": 37,
"call_type": "DELEGATECALL",
"address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"from": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"from_balance": "0",
"to": "0xbd7b550d2e7571383d84acf597a00d341e5c406e",
"to_balance": "0",
"value": null,
"caller": {
"address": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"balance": "50912118197849012"
},
"block_timestamp": "0001-01-01T00:00:00Z",
"gas": 600460,
"gas_used": 6554,
"refund_gas": 9531,
"storage_address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"input": "0xa94e78ef0000000000000000000000000000000000000000000000000000000000000020...",
"decoded_input": [
{
"soltype": {
"name": "data",
"type": "tuple",
"storage_location": "default",
"components": [
{
"name": "fromToken",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
{
"name": "fromAmount",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "toAmount",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "expectedAmount",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "beneficiary",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
{
"name": "path",
"type": "tuple[]",
"storage_location": "default",
"components": [
{
"name": "to",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
{
"name": "totalNetworkFee",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "adapters",
"type": "tuple[]",
"storage_location": "default",
"components": [
{
"name": "adapter",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
{
"name": "percent",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "networkFee",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "route",
"type": "tuple[]",
"storage_location": "default",
"components": [
{
"name": "index",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "targetExchange",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
{
"name": "percent",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "payload",
"type": "bytes",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bytes"
}
},
{
"name": "networkFee",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
}
],
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "slice"
}
}
],
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "slice"
}
}
],
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "slice"
}
},
{
"name": "partner",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
{
"name": "feePercent",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "permit",
"type": "bytes",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bytes"
}
},
{
"name": "deadline",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "uuid",
"type": "bytes16",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bytes"
}
}
],
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false
},
"value": {
"fromToken": "0x68037790a0229e9ce6eaa8a99ea92964106c4703",
"fromAmount": "5000000000000000000000",
"toAmount": "5467020078",
"expectedAmount": "5494492541",
"beneficiary": "0x0000000000000000000000000000000000000000",
"path": [
{
"to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"totalNetworkFee": "0",
"adapters": [
{
"adapter": "0x9be264469ef954c139da4a45cf76cbcc5e3a6a73",
"percent": "10000",
"networkFee": "0",
"route": [
{
"index": "6",
"targetExchange": "0xe592427a0aece92de3edee1f18e0157c05861564",
"percent": "10000",
"payload": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002b68037790a0229e9ce6eaa8a99ea92964106c47030001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000",
"networkFee": "0"
}
]
}
]
},
{
"to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"totalNetworkFee": "0",
"adapters": [
{
"adapter": "0x9be264469ef954c139da4a45cf76cbcc5e3a6a73",
"percent": "10000",
"networkFee": "0",
"route": [
{
"index": "6",
"targetExchange": "0x1b81d678ffb9c0263b24a97847620c99d213eb14",
"percent": "10000",
"payload": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000064dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000000000000000000000",
"networkFee": "0"
}
]
}
]
}
],
"partner": "0x0000000000000000000000000000000000000000",
"feePercent": "452312848583266388373324160190187140051835877600158453279131187530910679040",
"permit": "0x",
"deadline": "1691517414",
"uuid": "0x5c9438a5a99c4bccb1035296d5d2d8d2"
}
}
],
"output": "0x",
"decoded_output": null,
"error_absolute_position": 2043,
"error": "execution reverted",
"error_op": "REVERT",
"error_file_index": 14,
"error_line_number": 44,
"error_code_start": 1290,
"error_code_length": 62,
"error_reason": "Deadline breached",
"network_id": "",
"calls": [
{
"hash": "",
"contract_name": "AugustusSwapper",
"function_name": "multiSwap",
"function_pc": 0,
"function_op": "",
"absolute_position": 2043,
"caller_pc": 0,
"caller_op": "",
"address": "0xbd7b550d2e7571383d84acf597a00d341e5c406e",
"from": "0xbd7b550d2e7571383d84acf597a00d341e5c406e",
"from_balance": null,
"to": "0xbd7b550d2e7571383d84acf597a00d341e5c406e",
"to_balance": null,
"value": null,
"block_timestamp": "0001-01-01T00:00:00Z",
"gas": 0,
"gas_used": 0,
"input": "0x",
"output": "0x",
"decoded_output": null,
"error": "execution reverted",
"error_op": "REVERT",
"error_file_index": 14,
"error_line_number": 44,
"error_code_start": 1290,
"error_code_length": 62,
"network_id": "",
"calls": null
}
]
},
{
"hash": "",
"contract_name": "AugustusSwapper",
"function_name": "_revertWithData",
"function_pc": 1705,
"function_op": "JUMPDEST",
"function_file_index": 0,
"function_code_start": 52803,
"function_line_number": 1640,
"function_code_length": 120,
"absolute_position": 2092,
"caller_pc": 806,
"caller_op": "JUMP",
"caller_file_index": 0,
"caller_line_number": 1510,
"caller_code_start": 48500,
"caller_code_length": 27,
"call_type": "JUMPDEST",
"address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"from": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"from_balance": null,
"to": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"to_balance": null,
"value": null,
"caller": {
"address": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"balance": "50912118197849012"
},
"block_timestamp": "0001-01-01T00:00:00Z",
"gas": 603269,
"gas_used": 603269,
"storage_address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"input": "0x",
"decoded_input": [
{
"soltype": {
"name": "data",
"type": "bytes",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bytes"
}
},
"value": "0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000011446561646c696e65206272656163686564000000000000000000000000000000"
}
],
"output": "0x",
"decoded_output": null,
"error_absolute_position": 2098,
"error": "execution reverted",
"error_op": "REVERT",
"error_file_index": 0,
"error_line_number": 1641,
"error_code_start": 52881,
"error_code_length": 34,
"network_id": "",
"calls": [
{
"hash": "",
"contract_name": "AugustusSwapper",
"function_name": "_revertWithData",
"function_pc": 0,
"function_op": "",
"absolute_position": 2098,
"caller_pc": 0,
"caller_op": "",
"address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"from": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"from_balance": null,
"to": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"to_balance": null,
"value": null,
"block_timestamp": "0001-01-01T00:00:00Z",
"gas": 0,
"gas_used": 0,
"input": "0x",
"output": "0x",
"decoded_output": null,
"error": "execution reverted",
"error_op": "REVERT",
"error_file_index": 0,
"error_line_number": 1641,
"error_code_start": 52881,
"error_code_length": 34,
"network_id": "",
"calls": null
}
]
}
]
},
"stack_trace": [
{
"file_index": 0,
"contract": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"name": "AugustusSwapper",
"line": 1641,
"error": "execution reverted",
"code": "_revertWithData",
"op": "REVERT",
"length": 34
},
{
"file_index": 0,
"contract": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"name": "AugustusSwapper",
"line": 1510,
"error": null,
"code": "_revertWithData",
"op": "JUMP",
"length": 27
},
{
"file_index": 0,
"contract": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"name": "AugustusSwapper",
"line": 1467,
"error": null,
"code": "fallback",
"op": "JUMPDEST",
"length": 5950
}
],
"logs": null,
"balance_diff": null,
"nonce_diff": [
{
"address": "0x3F41a1CFd3C8B8d9c162dE0f42307a0095A6e5DF",
"original": "1094",
"dirty": "1095"
}
],
"state_diff": null,
"raw_state_diff": null,
"console_logs": null,
"asset_changes": null,
"balance_changes": [],
"created_at": "2023-08-10T12:48:11Z"
},
"error_message": "Deadline breached",
"error_info": {
"error_message": "Deadline breached",
"address": "0xbd7b550d2e7571383d84acf597a00d341e5c406e"
},
"method": "",
"decoded_input": null,
"call_trace": [
{
"call_type": "CALL",
"from": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"to": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"gas": 615574,
"gas_used": 12321,
"address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"error": "value:\"execution reverted\"",
"subtraces": 1,
"input": "0xa94e78ef0000000000000000000000000000000000000000000000000000000000000020...",
"output": "0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000011446561646c696e65206272656163686564000000000000000000000000000000",
"errorMessage": "value:\"Deadline breached\"",
"fromBalance": "0xb4e04d3ff20bb4"
},
{
"call_type": "DELEGATECALL",
"from": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"to": "0xbd7b550d2e7571383d84acf597a00d341e5c406e",
"gas": 600460,
"gas_used": 6554,
"address": "0xbd7b550d2e7571383d84acf597a00d341e5c406e",
"error": "value:\"execution reverted\"",
"trace_address": [
0
],
"input": "0xa94e78ef0000000000000000000000000000000000000000000000000000000000000020...",
"output": "0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000011446561646c696e65206272656163686564000000000000000000000000000000",
"gas_in": 612591,
"gas_cost": 603060,
"errorMessage": "value:\"Deadline breached\""
}
]
},
"simulation": {
"id": "1c08db12-8f6b-4377-95ef-2c0b99298de8",
"project_id": "dfdc391a-a15d-4590-9aef-8691259c7df4",
"owner_id": "7d5e8b1f-8bf8-4eae-a70f-fb7d354b1cc2",
"network_id": "1",
"block_number": 17884583,
"transaction_index": 0,
"from": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"to": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"input": "0xa94e78ef0000000000000000000000000000000000000000000000000000000000000020...",
"gas": 648318,
"gas_price": "0",
"gas_used": 45065,
"value": "0",
"method": "multiSwap",
"status": false,
"access_list": null,
"queue_origin": "",
"block_header": {
"number": "0x110e5a7",
"hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"stateRoot": "0x5aedfee941729c66fab3bc35cc00a8687d4c8f177e800565fa3895fee02a8d12",
"parentHash": "0x9075514cb7db4dc5c7f25b7b53bdee3ea51b3088eb94a5551668f49d5fd7bdc9",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"transactionsRoot": "0x3f3e3bac2d1a65adabe655196f48341105a8c21600b5d1dcd0f95ad6baf91d11",
"receiptsRoot": "0xb129fa08d3abb39c49b4e65f1edf7efc0d3d5ddf6b84ff802b43eb2b29e9b046",
"logsBloom": "0x74717005272adbead19e3886a21a471915102405ca59280ca44b9062f41101c5e441130e920943f04203fb604087c1b12293878b8c5b381213d09c35c12cc09046c0e4af0174382b7952554bf1f820ec0ff34a2c0560597035187563c6e023501ac2c8a2129384ab01a13c0015b43cdd7a0b03c200148d6d57861cb000a810560e11925caa60b13b60f5614117b606c68907e5859bc0903c643127dbc5900e2c831408093b4a209b1e40cec85cf20d07a4919a40b539994611a185ab00280022f39a08d67104014a096fa60a493a80da0f6e8a22412fb0ba6884429e1033a31cd8bce468d10c7d8a82663785a120c4408b2112604a101a5fa8891290302b970d",
"timestamp": "0x64d4dc8b",
"difficulty": "0x0",
"gasLimit": "0x1c9c380",
"gasUsed": "0x9d2881",
"miner": "0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5",
"extraData": "0x6265617665726275696c642e6f7267",
"mixHash": "0xcd3023878e91294b673f69b51e3ed64e814f6caabb795a93caadb34cc39a8ff3",
"nonce": "0x0000000000000000",
"baseFeePerGas": "0x4d0b44e27",
"size": "0x0",
"totalDifficulty": "0x0",
"uncles": null,
"transactions": null
},
"deposit_tx": false,
"system_tx": false,
"error_message": "Deadline breached",
"nonce": 1094,
"addresses": [
"0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"0xbd7b550d2e7571383d84acf597a00d341e5c406e"
],
"contract_ids": [
"eth:1:0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"eth:1:0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"eth:1:0xbd7b550d2e7571383d84acf597a00d341e5c406e"
],
"shared": false,
"created_at": "2023-12-20T14:03:57.3212051Z"
},
"contracts": [
{
"id": "eth:1:0xbd7b550d2e7571383d84acf597a00d341e5c406e",
"contract_id": "eth:1:0xbd7b550d2e7571383d84acf597a00d341e5c406e",
"balance": "",
"network_id": "1",
"public": true,
"verified_by": "etherscan",
"verification_date": "2023-06-13T17:26:37Z",
"address": "0xbd7b550d2e7571383d84acf597a00d341e5c406e",
"contract_name": "MultiPath",
"ens_domain": null,
"type": "contract",
"evm_version": "",
"compiler_version": "v0.7.5+commit.eb77ed08",
"optimizations_used": false,
"optimization_runs": 0,
"libraries": null,
"compiler_settings": {},
"deployed_bytecode": "0x6080604052600436106100c75760003560e01c806381cbd3ea11610074578063...",
"creation_bytecode": "0x6101206040523480156200001257600080fd5b506040516200354b3803806200...",
"data": {
"main_contract": 14,
"contract_info": [
{
"id": 5,
"path": "contracts/IAugustusSwapperV5.sol",
"name": "IAugustusSwapperV5.sol",
"source": "// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\n\ninterface IAugustusSwapperV5 {\n function hasRole(bytes32 role, address account) external view returns (bool);\n}\n"
},
{
"id": 8,
"path": "contracts/adapters/IBuyAdapter.sol",
"name": "IBuyAdapter.sol",
"source": "// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\n\nimport \"../lib/Utils.sol\";\n\ninterface IBuyAdapter {\n /**\n * @dev Certain adapters needs to be initialized.\n * This method will be called from Augustus\n */\n function initialize(bytes calldata data) external;\n\n /**\n * @dev The function which performs the swap on an exchange.\n * @param index Index of the router in the adapter\n * @param fromToken Address of the source token\n * @param toToken Address of the destination token\n * @param maxFromAmount Max amount of source tokens to be swapped\n * @param toAmount Amount of destination tokens to be received\n * @param targetExchange Target exchange address to be called\n * @param payload extra data which needs to be passed to this router\n */\n function buy(\n uint256 index,\n IERC20 fromToken,\n IERC20 toToken,\n uint256 maxFromAmount,\n uint256 toAmount,\n address targetExchange,\n bytes calldata payload\n ) external payable;\n}\n"
},
{
"id": 11,
"path": "contracts/lib/Utils.sol",
"name": "Utils.sol",
"source": "/*solhint-disable avoid-low-level-calls */\n// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\npragma experimental ABIEncoderV2;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"../ITokenTransferProxy.sol\";\n\n// ... remaining source omitted from this example"
},
{
"id": 1,
"path": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
"name": "IERC20.sol",
"source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n\n// ... remaining source omitted from this example"
},
{
"id": 3,
"path": "@openzeppelin/contracts/utils/Address.sol",
"name": "Address.sol",
"source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n\n// ... remaining source omitted from this example"
},
{
"id": 4,
"path": "contracts/AugustusStorage.sol",
"name": "AugustusStorage.sol",
"source": "// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\n\nimport \"./ITokenTransferProxy.sol\";\n\ncontract AugustusStorage {\n struct FeeStructure {\n uint256 partnerShare;\n bool noPositiveSlippage;\n bool positiveSlippageToUser;\n uint16 feePercent;\n string partnerId;\n bytes data;\n }\n\n ITokenTransferProxy internal tokenTransferProxy;\n address payable internal feeWallet;\n\n mapping(address => FeeStructure) internal registeredPartners;\n\n mapping(bytes4 => address) internal selectorVsRouter;\n mapping(bytes32 => bool) internal adapterInitialized;\n mapping(bytes32 => bytes) internal adapterVsData;\n\n mapping(bytes32 => bytes) internal routerData;\n mapping(bytes32 => bool) internal routerInitialized;\n\n bytes32 public constant WHITELISTED_ROLE = keccak256(\"WHITELISTED_ROLE\");\n\n bytes32 public constant ROUTER_ROLE = keccak256(\"ROUTER_ROLE\");\n}\n"
},
{
"id": 7,
"path": "contracts/adapters/IAdapter.sol",
"name": "IAdapter.sol",
"source": "// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\npragma abicoder v2;\n\nimport \"../lib/Utils.sol\";\n\ninterface IAdapter {\n /**\n * @dev Certain adapters needs to be initialized.\n * This method will be called from Augustus\n */\n function initialize(bytes calldata data) external;\n\n /**\n * @dev The function which performs the swap on an exchange.\n * @param fromToken Address of the source token\n * @param toToken Address of the destination token\n * @param fromAmount Amount of source tokens to be swapped\n * @param networkFee NOT USED - Network fee to be used in this router\n * @param route Route to be followed\n */\n function swap(\n IERC20 fromToken,\n IERC20 toToken,\n uint256 fromAmount,\n uint256 networkFee,\n Utils.Route[] calldata route\n ) external payable;\n}\n"
},
{
"id": 0,
"path": "@openzeppelin/contracts/math/SafeMath.sol",
"name": "SafeMath.sol",
"source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n\n// ... remaining source omitted from this example"
},
{
"id": 6,
"path": "contracts/ITokenTransferProxy.sol",
"name": "ITokenTransferProxy.sol",
"source": "// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\n\ninterface ITokenTransferProxy {\n function transferFrom(\n address token,\n address from,\n address to,\n uint256 amount\n ) external;\n}\n"
},
{
"id": 9,
"path": "contracts/fee/FeeModel.sol",
"name": "FeeModel.sol",
"source": "// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\n\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"../AugustusStorage.sol\";\nimport \"../lib/Utils.sol\";\nimport \"./IFeeClaimer.sol\";\n// helpers\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n// ... remaining source omitted from this example"
},
{
"id": 2,
"path": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol",
"name": "SafeERC20.sol",
"source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n\n// ... remaining source omitted from this example"
},
{
"id": 10,
"path": "contracts/fee/IFeeClaimer.sol",
"name": "IFeeClaimer.sol",
"source": "// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\n\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\ninterface IFeeClaimer {\n /**\n * @notice register partner's, affiliate's and PP's fee\n * @dev only callable by AugustusSwapper contract\n\n// ... remaining source omitted from this example"
},
{
"id": 12,
"path": "contracts/lib/balancerv2/IBalancerV2Vault.sol",
"name": "IBalancerV2Vault.sol",
"source": "// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\npragma abicoder v2;\n\nimport \"../Utils.sol\";\n\ninterface IBalancerV2Vault {\n enum SwapKind {\n GIVEN_IN,\n GIVEN_OUT\n }\n\n struct SingleSwap {\n bytes32 poolId;\n SwapKind kind;\n address assetIn;\n address assetOut;\n uint256 amount;\n bytes userData;\n }\n\n struct BatchSwapStep {\n bytes32 poolId;\n uint256 assetInIndex;\n uint256 assetOutIndex;\n uint256 amount;\n bytes userData;\n }\n\n struct FundManagement {\n address sender;\n bool fromInternalBalance;\n address payable recipient;\n bool toInternalBalance;\n }\n\n function swap(\n SingleSwap memory singleSwap,\n FundManagement memory funds,\n uint256 limit,\n uint256 deadline\n ) external payable returns (uint256);\n\n function batchSwap(\n SwapKind kind,\n BatchSwapStep[] memory swaps,\n address[] memory assets,\n FundManagement memory funds,\n int256[] memory limits,\n uint256 deadline\n ) external payable returns (int256[] memory);\n}\n"
},
{
"id": 13,
"path": "contracts/routers/IRouter.sol",
"name": "IRouter.sol",
"source": "// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\n\ninterface IRouter {\n /**\n * @dev Certain routers/exchanges needs to be initialized.\n * This method will be called from Augustus\n */\n function initialize(bytes calldata data) external;\n\n /**\n * @dev Returns unique identifier for the router\n */\n function getKey() external pure returns (bytes32);\n\n event SwappedV3(\n bytes16 uuid,\n address partner,\n uint256 feePercent,\n address initiator,\n address indexed beneficiary,\n address indexed srcToken,\n address indexed destToken,\n uint256 srcAmount,\n uint256 receivedAmount,\n uint256 expectedAmount\n );\n\n event BoughtV3(\n bytes16 uuid,\n address partner,\n uint256 feePercent,\n address initiator,\n address indexed beneficiary,\n address indexed srcToken,\n address indexed destToken,\n uint256 srcAmount,\n uint256 receivedAmount,\n uint256 expectedAmount\n );\n}\n"
},
{
"id": 14,
"path": "contracts/routers/MultiPath.sol",
"name": "MultiPath.sol",
"source": "/*solhint-disable avoid-low-level-calls*/\n// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\npragma abicoder v2;\n\nimport \"./IRouter.sol\";\nimport \"../IAugustusSwapperV5.sol\";\nimport \"../adapters/IAdapter.sol\";\nimport \"../adapters/IBuyAdapter.sol\";\n\n// ... remaining source omitted from this example"
}
],
"abi": [
{
"type": "constructor",
"name": "",
"constant": false,
"anonymous": false,
"stateMutability": "",
"inputs": [
{
"name": "_partnerSharePercent",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "_maxFeePercent",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "_paraswapReferralShare",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "_paraswapSlippageShare",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "_feeClaimer",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
}
],
"outputs": null
},
{
"type": "function",
"name": "paraswapReferralShare",
"constant": false,
"anonymous": false,
"stateMutability": "view",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
}
]
},
{
"type": "function",
"name": "getKey",
"constant": false,
"anonymous": false,
"stateMutability": "pure",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bytes"
}
}
]
}
],
"raw_abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "_partnerSharePercent",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_maxFeePercent",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_paraswapReferralShare",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_paraswapSlippageShare",
"type": "uint256"
},
{
"internalType": "contract IFeeClaimer",
"name": "_feeClaimer",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": {
"$circularRef": "constructor"
}
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes16",
"name": "uuid",
"type": "bytes16"
},
{
"indexed": false,
"internalType": "address",
"name": "partner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "feePercent",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "initiator",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "beneficiary",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "srcToken",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "destToken",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "srcAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "receivedAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "expectedAmount",
"type": "uint256"
}
],
"name": "BoughtV3",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes16",
"name": "uuid",
"type": "bytes16"
},
{
"indexed": false,
"internalType": "address",
"name": "partner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "feePercent",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "initiator",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "beneficiary",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "srcToken",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "destToken",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "srcAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "receivedAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "expectedAmount",
"type": "uint256"
}
],
"name": "SwappedV3",
"type": "event"
}
],
"states": [
{
"name": "adapterInitialized",
"type": "mapping (bytes32 => bool)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000004",
"indexed": false
},
{
"name": "adapterVsData",
"type": "mapping (bytes32 => bytes)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000005",
"indexed": false
},
{
"name": "routerData",
"type": "mapping (bytes32 => bytes)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000006",
"indexed": false
},
{
"name": "routerInitialized",
"type": "mapping (bytes32 => bool)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000007",
"indexed": false
},
{
"name": "tokenTransferProxy",
"type": "address",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
{
"name": "feeWallet",
"type": "address payable",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000001",
"indexed": false,
"simple_type": {
"type": "address payable"
}
},
{
"name": "registeredPartners",
"type": "mapping (address => tuple)",
"storage_location": "memory",
"components": [
{
"name": "partnerShare",
"type": "uint256",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "noPositiveSlippage",
"type": "bool",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000001",
"indexed": false,
"simple_type": {
"type": "bool"
}
},
{
"name": "positiveSlippageToUser",
"type": "bool",
"storage_location": "memory",
"offset": 8,
"index": "0x0000000000000000000000000000000000000000000000000000000000000001",
"indexed": false,
"simple_type": {
"type": "bool"
}
},
{
"name": "feePercent",
"type": "uint16",
"storage_location": "memory",
"offset": 16,
"index": "0x0000000000000000000000000000000000000000000000000000000000000001",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "partnerId",
"type": "string",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000002",
"indexed": false,
"simple_type": {
"type": "string"
}
},
{
"name": "data",
"type": "bytes",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000003",
"indexed": false,
"simple_type": {
"type": "bytes"
}
}
],
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000002",
"indexed": false
},
{
"name": "selectorVsRouter",
"type": "mapping (bytes4 => address)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000003",
"indexed": false
}
]
},
"src_map": {
"0": {
"r": "316:13499:14",
"s": 316,
"l": 13499,
"ln": 14,
"c": 1,
"f": 14,
"j": "-"
},
"2": {
"r": "316:13499:14",
"s": 316,
"l": 13499,
"ln": 14,
"c": 1,
"f": 14,
"j": "-"
}
},
"creation_block": 0,
"creation_tx": "",
"creator_address": "",
"created_at": "2023-06-13T17:26:36Z",
"language": "solidity",
"in_project": false
},
{
"id": "eth:1:0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"contract_id": "eth:1:0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"balance": "",
"network_id": "1",
"public": true,
"verified_by": "etherscan",
"verification_date": "2021-08-18T12:43:57Z",
"address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"contract_name": "AugustusSwapper",
"ens_domain": null,
"type": "contract",
"evm_version": "istanbul",
"compiler_version": "v0.7.5+commit.eb77ed08",
"optimizations_used": true,
"optimization_runs": 1000000,
"libraries": null,
"compiler_settings": {
"optimizer": {
"enabled": true,
"runs": 1000000
},
"evmVersion": "istanbul",
"metadata": {
"useLiteralContent": true
}
},
"deployed_bytecode": "0x60806040526004361061019a5760003560e01c80639010d07c116100e1578063...",
"creation_bytecode": "0x60806040523480156200001157600080fd5b5060405162003395380380620033...",
"data": {
"main_contract": 0,
"contract_info": [
{
"id": 0,
"path": "contracts/flattened/AugustusSwapper.sol",
"name": "AugustusSwapper.sol",
"source": "// File: openzeppelin-solidity/contracts/utils/EnumerableSet.sol\n\n\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n\n// ... remaining source omitted from this example"
}
],
"abi": [
{
"type": {
"$circularRef": "constructor"
},
"name": "",
"constant": false,
"anonymous": false,
"stateMutability": "",
"inputs": [
{
"name": "_feeWallet",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
}
],
"outputs": null
},
{
"type": "function",
"name": "setImplementation",
"constant": false,
"anonymous": false,
"stateMutability": "nonpayable",
"inputs": [
{
"name": "selector",
"type": "bytes4",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bytes"
}
},
{
"name": "implementation",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
}
],
"outputs": []
},
{
"type": "function",
"name": "registerPartner",
"constant": false,
"anonymous": false,
"stateMutability": "nonpayable",
"inputs": [
{
"name": "partner",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
{
"name": "_partnerShare",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "_noPositiveSlippage",
"type": "bool",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bool"
}
},
{
"name": "_positiveSlippageToUser",
"type": "bool",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bool"
}
},
{
"name": "_feePercent",
"type": "uint16",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "partnerId",
"type": "string",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "string"
}
},
{
"name": "_data",
"type": "bytes",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bytes"
}
}
],
"outputs": []
}
],
"raw_abi": [
{
"inputs": [
{
"internalType": "address payable",
"name": "_feeWallet",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": {
"$circularRef": "constructor"
}
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "adapter",
"type": "address"
}
],
"name": "AdapterInitialized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "previousAdminRole",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "newAdminRole",
"type": "bytes32"
}
],
"name": "RoleAdminChanged",
"type": "event"
}
],
"states": [
{
"name": "feeWallet",
"type": "address payable",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000001",
"indexed": false,
"simple_type": {
"type": "address payable"
}
},
{
"name": "adapterVsData",
"type": "mapping (bytes32 => bytes)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000005",
"indexed": false
},
{
"name": "routerData",
"type": "mapping (bytes32 => bytes)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000006",
"indexed": false
},
{
"name": "tokenTransferProxy",
"type": "address",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
{
"name": "registeredPartners",
"type": "mapping (address => tuple)",
"storage_location": "memory",
"components": [
{
"name": "partnerShare",
"type": "uint256",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "noPositiveSlippage",
"type": "bool",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000001",
"indexed": false,
"simple_type": {
"type": "bool"
}
},
{
"name": "positiveSlippageToUser",
"type": "bool",
"storage_location": "memory",
"offset": 8,
"index": "0x0000000000000000000000000000000000000000000000000000000000000001",
"indexed": false,
"simple_type": {
"type": "bool"
}
},
{
"name": "feePercent",
"type": "uint16",
"storage_location": "memory",
"offset": 16,
"index": "0x0000000000000000000000000000000000000000000000000000000000000001",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "partnerId",
"type": "string",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000002",
"indexed": false,
"simple_type": {
"type": "string"
}
},
{
"name": "data",
"type": "bytes",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000003",
"indexed": false,
"simple_type": {
"type": "bytes"
}
}
],
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000002",
"indexed": false
},
{
"name": "selectorVsRouter",
"type": "mapping (bytes4 => address)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000003",
"indexed": false
},
{
"name": "adapterInitialized",
"type": "mapping (bytes32 => bool)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000004",
"indexed": false
},
{
"name": "routerInitialized",
"type": "mapping (bytes32 => bool)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000007",
"indexed": false
},
{
"name": "_roles",
"type": "mapping (bytes32 => tuple)",
"storage_location": "memory",
"components": [
{
"name": "members",
"type": "tuple",
"storage_location": "memory",
"components": [
{
"name": "_inner",
"type": "tuple",
"storage_location": "memory",
"components": [
{
"name": "_values",
"type": "bytes32[]",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "slice",
"nested_type": {
"type": "bytes"
}
}
},
{
"name": "_indexes",
"type": "mapping (bytes32 => uint256)",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000001",
"indexed": false
}
],
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false
}
],
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false
},
{
"name": "adminRole",
"type": "bytes32",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000002",
"indexed": false,
"simple_type": {
"type": "bytes"
}
}
],
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000008",
"indexed": false
}
]
},
"src_map": {
"0": {
"r": "47102:5950:0",
"s": 47102,
"l": 5950,
"ln": 1467,
"c": 1,
"j": "-"
},
"2": {
"r": "47102:5950:0",
"s": 47102,
"l": 5950,
"ln": 1467,
"c": 1,
"j": "-"
}
},
"creation_block": 0,
"creation_tx": "",
"creator_address": "",
"created_at": "2021-08-18T12:43:57Z",
"language": "solidity",
"in_project": false
}
],
"generated_access_list": []
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "bad_request",
"message": "Bad request input parameters"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "unauthorized",
"message": "Unauthorized"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "insufficient_permissions",
"message": "Insufficient permissions"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "resource_not_found",
"message": "The resource you requested could not be found."
}
}{
"error": {
"id": "9a7bbe06-7f6f-4a45-8c78-8d64b9a9d0e1",
"slug": "too_many_requests",
"message": "API Rate limit exceeded."
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "internal_server_error",
"message": "Internal server error"
}
}Simulate transaction
Simulate a single EVM transaction before sending it and get the decoded call trace, emitted events, state changes, asset changes, and gas used.
# Full Mode Simulation
curl 'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate' \
-H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
-H 'content-type: application/json' \
--data-raw '{"network_id":"1","from":"0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df","to":"0xdef171fe48cf0115b1d80b88dc8eab59176fee57","input":"0xa94e78ef000000000000000000000000000000000000000000000000000000000000002000000000000000000000000068037790a0229e9ce6eaa8a99ea92964106c470300000000000000000000000000000000000000000000010f0cf064dd592000000000000000000000000000000000000000000000000000000000000145dc1b2e00000000000000000000000000000000000000000000000000000001477f4d7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000007800000000000000000000000000000000000000000000000000000000064d281e65c9438a5a99c4bccb1035296d5d2d8d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000320000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002b68037790a0229e9ce6eaa8a99ea92964106c47030001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a730000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000060000000000000000000000001b81d678ffb9c0263b24a97847620c99d213eb14000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000064dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","gas":648318,"block_number":17884583,"value":"0","save":true,"save_if_fails":true,"simulation_type":"full"}' \
--compressed
# Quick Mode Simulation
curl 'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate' \
-H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
-H 'content-type: application/json' \
--data-raw '{"network_id":"1","from":"0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df","to":"0xdef171fe48cf0115b1d80b88dc8eab59176fee57","input":"0xa94e78ef000000000000000000000000000000000000000000000000000000000000002000000000000000000000000068037790a0229e9ce6eaa8a99ea92964106c470300000000000000000000000000000000000000000000010f0cf064dd592000000000000000000000000000000000000000000000000000000000000145dc1b2e00000000000000000000000000000000000000000000000000000001477f4d7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000007800000000000000000000000000000000000000000000000000000000064d281e65c9438a5a99c4bccb1035296d5d2d8d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000320000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002b68037790a0229e9ce6eaa8a99ea92964106c47030001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a730000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000060000000000000000000000001b81d678ffb9c0263b24a97847620c99d213eb14000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000064dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","gas":648318,"block_number":17884583,"value":"0","save":true,"save_if_fails":true,"simulation_type":"quick"}' \
--compressed
# ABI Mode Simulation
curl 'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate' \
-H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
-H 'content-type: application/json' \
--data-raw '{"network_id":"1","from":"0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df","to":"0xdef171fe48cf0115b1d80b88dc8eab59176fee57","input":"0xa94e78ef000000000000000000000000000000000000000000000000000000000000002000000000000000000000000068037790a0229e9ce6eaa8a99ea92964106c470300000000000000000000000000000000000000000000010f0cf064dd592000000000000000000000000000000000000000000000000000000000000145dc1b2e00000000000000000000000000000000000000000000000000000001477f4d7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000007800000000000000000000000000000000000000000000000000000000064d281e65c9438a5a99c4bccb1035296d5d2d8d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000320000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002b68037790a0229e9ce6eaa8a99ea92964106c47030001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a730000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000060000000000000000000000001b81d678ffb9c0263b24a97847620c99d213eb14000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000064dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","gas":648318,"block_number":17884583,"value":"0","save":true,"save_if_fails":true,"simulation_type":"abi"}' \
--compressed
# Estimate Gas Simulation
curl 'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate' \
-H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
-H 'content-type: application/json' \
--data-raw '{"network_id":"1","from":"0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df","to":"0xdef171fe48cf0115b1d80b88dc8eab59176fee57","input":"0xa94e78ef000000000000000000000000000000000000000000000000000000000000002000000000000000000000000068037790a0229e9ce6eaa8a99ea92964106c470300000000000000000000000000000000000000000000010f0cf064dd592000000000000000000000000000000000000000000000000000000000000145dc1b2e00000000000000000000000000000000000000000000000000000001477f4d7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000007800000000000000000000000000000000000000000000000000000000064d281e65c9438a5a99c4bccb1035296d5d2d8d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000320000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002b68037790a0229e9ce6eaa8a99ea92964106c47030001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a730000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000060000000000000000000000001b81d678ffb9c0263b24a97847620c99d213eb14000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000064dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","gas":648318,"block_number":17884583,"value":"0","save":true,"save_if_fails":true,"estimate_gas":true,"simulation_type":"quick"}' \
--compressed
# Failed Transaction Simulation
curl 'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate' \
-H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
-H 'content-type: application/json' \
--data-raw '{"network_id":"1","block_number":18827905,"transaction_index":222,"from":"0xd8da6bf26964af9d7eed9e03e53415d37aa96045","input":"0xa94e78ef0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000eaa63125dd63f10874f99cdbbb18410e7fc79dd300000000000000000000000000000000000000000004f68ca6d8cd91c6000000000000000000000000000000000000000000000000000000000000036e22623300000000000000000000000000000000000000000000000000000003728c0b380000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000076000000000000000000000000000000000000000000000000000000000658357363e8a57981b0747b79f70262f8257408600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000300000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004000000000000000000000000f9234cb08edb93c0d4a4d4c70cc3ffd070e78e07000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000004de5672fefac7f6e3017d9a2f1c14fe048191a24ce14000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000658c3d55000000000000000000000000000000000000000000000000000000000000002bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","to":"0xdef171fe48cf0115b1d80b88dc8eab59176fee57","gas":617885,"gas_price":"87235100681","value":"0","access_list":[],"generate_access_list":true,"save":true,"simulation_type":"quick"}' \
--compressedimport axios from 'axios';
const response = await axios.post(
'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate',
{
'network_id': '1',
'from': '0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df',
'to': '0xdef171fe48cf0115b1d80b88dc8eab59176fee57',
'input': '0xa94e78ef000000000000000000000000000000000000000000000000000000000000002000000000000000000000000068037790a0229e9ce6eaa8a99ea92964106c470300000000000000000000000000000000000000000000010f0cf064dd592000000000000000000000000000000000000000000000000000000000000145dc1b2e00000000000000000000000000000000000000000000000000000001477f4d7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000007800000000000000000000000000000000000000000000000000000000064d281e65c9438a5a99c4bccb1035296d5d2d8d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000320000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002b68037790a0229e9ce6eaa8a99ea92964106c47030001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a730000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000060000000000000000000000001b81d678ffb9c0263b24a97847620c99d213eb14000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000064dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
'gas': 648318,
'block_number': 17884583,
'value': '0',
'save': true,
'save_if_fails': true,
'simulation_type': 'full'
},
{
headers: {
'X-Access-Key': '${TENDERLY_ACCESS_KEY}',
'content-type': 'application/json'
}
}
);import requests
headers = {
'X-Access-Key': '${TENDERLY_ACCESS_KEY}',
'content-type': 'application/json',
}
json_data = {
'network_id': '1',
'from': '0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df',
'to': '0xdef171fe48cf0115b1d80b88dc8eab59176fee57',
'input': '0xa94e78ef000000000000000000000000000000000000000000000000000000000000002000000000000000000000000068037790a0229e9ce6eaa8a99ea92964106c470300000000000000000000000000000000000000000000010f0cf064dd592000000000000000000000000000000000000000000000000000000000000145dc1b2e00000000000000000000000000000000000000000000000000000001477f4d7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000007800000000000000000000000000000000000000000000000000000000064d281e65c9438a5a99c4bccb1035296d5d2d8d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000320000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002b68037790a0229e9ce6eaa8a99ea92964106c47030001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a730000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000060000000000000000000000001b81d678ffb9c0263b24a97847620c99d213eb14000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000064dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
'gas': 648318,
'block_number': 17884583,
'value': '0',
'save': True,
'save_if_fails': True,
'simulation_type': 'full',
}
response = requests.post(
'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate',
headers=headers,
json=json_data,
)package main
import (
"fmt"
"io"
"log"
"net/http"
"strings"
)
func main() {
client := &http.Client{}
var data = strings.NewReader(`{"network_id":"1","from":"0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df","to":"0xdef171fe48cf0115b1d80b88dc8eab59176fee57","input":"0xa94e78ef000000000000000000000000000000000000000000000000000000000000002000000000000000000000000068037790a0229e9ce6eaa8a99ea92964106c470300000000000000000000000000000000000000000000010f0cf064dd592000000000000000000000000000000000000000000000000000000000000145dc1b2e00000000000000000000000000000000000000000000000000000001477f4d7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000007800000000000000000000000000000000000000000000000000000000064d281e65c9438a5a99c4bccb1035296d5d2d8d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000320000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002b68037790a0229e9ce6eaa8a99ea92964106c47030001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a730000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000060000000000000000000000001b81d678ffb9c0263b24a97847620c99d213eb14000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000064dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","gas":648318,"block_number":17884583,"value":"0","save":true,"save_if_fails":true,"simulation_type":"full"}`)
req, err := http.NewRequest("POST", "https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate", data)
if err != nil {
log.Fatal(err)
}
req.Header.Set("X-Access-Key", "${TENDERLY_ACCESS_KEY}")
req.Header.Set("content-type", "application/json")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
bodyText, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText)
}{
"transaction": {
"hash": "0x8bb054967340f08827e1943ad34e2a448357e72ad1adee7397c577a716530a0f",
"block_hash": "",
"block_number": 17884583,
"from": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"gas": 648318,
"gas_price": 0,
"gas_fee_cap": 0,
"gas_tip_cap": 0,
"cumulative_gas_used": 0,
"gas_used": 45065,
"effective_gas_price": 0,
"input": "0xa94e78ef0000000000000000000000000000000000000000000000000000000000000020...",
"nonce": 1094,
"to": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"index": 0,
"value": "0x",
"access_list": null,
"status": false,
"addresses": [
"0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"0xbd7b550d2e7571383d84acf597a00d341e5c406e"
],
"contract_ids": [
"eth:1:0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"eth:1:0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"eth:1:0xbd7b550d2e7571383d84acf597a00d341e5c406e"
],
"network_id": "1",
"timestamp": "2023-08-10T12:48:11Z",
"function_selector": "",
"l1_block_number": 0,
"l1_timestamp": 0,
"deposit_tx": false,
"system_tx": false,
"sig": {
"v": "0x0",
"r": "0x0",
"s": "0x0"
},
"transaction_info": {
"contract_id": "eth:1:0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"block_number": 17884583,
"transaction_id": "0x8bb054967340f08827e1943ad34e2a448357e72ad1adee7397c577a716530a0f",
"contract_address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"method": "fallback",
"parameters": null,
"intrinsic_gas": 32744,
"refund_gas": 0,
"call_trace": {
"hash": "0x8bb054967340f08827e1943ad34e2a448357e72ad1adee7397c577a716530a0f",
"contract_name": "AugustusSwapper",
"function_name": "fallback",
"function_pc": 100,
"function_op": "JUMPDEST",
"function_file_index": 0,
"function_code_start": 47102,
"function_line_number": 1467,
"function_code_length": 5950,
"absolute_position": 28,
"caller_pc": 0,
"caller_op": "CALL",
"call_type": "CALL",
"address": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"from": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"from_balance": "50912118197849012",
"to": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"to_balance": "0",
"value": "0",
"caller": {
"address": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"balance": "50912118197849012"
},
"block_timestamp": "0001-01-01T00:00:00Z",
"gas": 615574,
"gas_used": 12321,
"intrinsic_gas": 32744,
"storage_address": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"input": "0xa94e78ef0000000000000000000000000000000000000000000000000000000000000020...",
"nonce_diff": [
{
"address": "0x3F41a1CFd3C8B8d9c162dE0f42307a0095A6e5DF",
"original": "1094",
"dirty": "1095"
}
],
"output": "0x",
"decoded_output": null,
"error_hex_data": "0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000011446561646c696e65206272656163686564000000000000000000000000000000",
"network_id": "1",
"calls": [
{
"hash": "",
"contract_name": "AugustusSwapper",
"function_name": "getImplementation",
"function_pc": 1627,
"function_op": "JUMPDEST",
"function_file_index": 0,
"function_code_start": 49421,
"function_line_number": 1539,
"function_code_length": 123,
"absolute_position": 59,
"caller_pc": 467,
"caller_op": "JUMP",
"caller_file_index": 0,
"caller_line_number": 1497,
"caller_code_start": 48052,
"caller_code_length": 27,
"call_type": "JUMPDEST",
"address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"from": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"from_balance": null,
"to": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"to_balance": null,
"value": null,
"caller": {
"address": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"balance": "50912118197849012"
},
"block_timestamp": "0001-01-01T00:00:00Z",
"gas": 615338,
"gas_used": 2202,
"storage_address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"input": "0x",
"decoded_input": [
{
"soltype": {
"name": "selector",
"type": "bytes4",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bytes"
}
},
"value": "0xa94e78ef"
}
],
"output": "0x",
"decoded_output": [
{
"soltype": {
"name": "",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
"value": "0xbd7b550d2e7571383d84acf597a00d341e5c406e"
}
],
"network_id": "",
"calls": null
},
{
"hash": "",
"contract_name": "AugustusSwapper",
"function_name": "multiSwap",
"function_pc": 2546,
"function_op": "JUMPDEST",
"function_file_index": 14,
"function_code_start": 1200,
"function_line_number": 43,
"function_code_length": 2514,
"absolute_position": 2044,
"caller_pc": 736,
"caller_op": "DELEGATECALL",
"caller_file_index": 0,
"caller_line_number": 1508,
"caller_code_start": 48425,
"caller_code_length": 37,
"call_type": "DELEGATECALL",
"address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"from": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"from_balance": "0",
"to": "0xbd7b550d2e7571383d84acf597a00d341e5c406e",
"to_balance": "0",
"value": null,
"caller": {
"address": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"balance": "50912118197849012"
},
"block_timestamp": "0001-01-01T00:00:00Z",
"gas": 600460,
"gas_used": 6554,
"refund_gas": 9531,
"storage_address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"input": "0xa94e78ef0000000000000000000000000000000000000000000000000000000000000020...",
"decoded_input": [
{
"soltype": {
"name": "data",
"type": "tuple",
"storage_location": "default",
"components": [
{
"name": "fromToken",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
{
"name": "fromAmount",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "toAmount",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "expectedAmount",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "beneficiary",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
{
"name": "path",
"type": "tuple[]",
"storage_location": "default",
"components": [
{
"name": "to",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
{
"name": "totalNetworkFee",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "adapters",
"type": "tuple[]",
"storage_location": "default",
"components": [
{
"name": "adapter",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
{
"name": "percent",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "networkFee",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "route",
"type": "tuple[]",
"storage_location": "default",
"components": [
{
"name": "index",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "targetExchange",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
{
"name": "percent",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "payload",
"type": "bytes",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bytes"
}
},
{
"name": "networkFee",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
}
],
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "slice"
}
}
],
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "slice"
}
}
],
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "slice"
}
},
{
"name": "partner",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
{
"name": "feePercent",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "permit",
"type": "bytes",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bytes"
}
},
{
"name": "deadline",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "uuid",
"type": "bytes16",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bytes"
}
}
],
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false
},
"value": {
"fromToken": "0x68037790a0229e9ce6eaa8a99ea92964106c4703",
"fromAmount": "5000000000000000000000",
"toAmount": "5467020078",
"expectedAmount": "5494492541",
"beneficiary": "0x0000000000000000000000000000000000000000",
"path": [
{
"to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"totalNetworkFee": "0",
"adapters": [
{
"adapter": "0x9be264469ef954c139da4a45cf76cbcc5e3a6a73",
"percent": "10000",
"networkFee": "0",
"route": [
{
"index": "6",
"targetExchange": "0xe592427a0aece92de3edee1f18e0157c05861564",
"percent": "10000",
"payload": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002b68037790a0229e9ce6eaa8a99ea92964106c47030001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000",
"networkFee": "0"
}
]
}
]
},
{
"to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"totalNetworkFee": "0",
"adapters": [
{
"adapter": "0x9be264469ef954c139da4a45cf76cbcc5e3a6a73",
"percent": "10000",
"networkFee": "0",
"route": [
{
"index": "6",
"targetExchange": "0x1b81d678ffb9c0263b24a97847620c99d213eb14",
"percent": "10000",
"payload": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000064dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000000000000000000000",
"networkFee": "0"
}
]
}
]
}
],
"partner": "0x0000000000000000000000000000000000000000",
"feePercent": "452312848583266388373324160190187140051835877600158453279131187530910679040",
"permit": "0x",
"deadline": "1691517414",
"uuid": "0x5c9438a5a99c4bccb1035296d5d2d8d2"
}
}
],
"output": "0x",
"decoded_output": null,
"error_absolute_position": 2043,
"error": "execution reverted",
"error_op": "REVERT",
"error_file_index": 14,
"error_line_number": 44,
"error_code_start": 1290,
"error_code_length": 62,
"error_reason": "Deadline breached",
"network_id": "",
"calls": [
{
"hash": "",
"contract_name": "AugustusSwapper",
"function_name": "multiSwap",
"function_pc": 0,
"function_op": "",
"absolute_position": 2043,
"caller_pc": 0,
"caller_op": "",
"address": "0xbd7b550d2e7571383d84acf597a00d341e5c406e",
"from": "0xbd7b550d2e7571383d84acf597a00d341e5c406e",
"from_balance": null,
"to": "0xbd7b550d2e7571383d84acf597a00d341e5c406e",
"to_balance": null,
"value": null,
"block_timestamp": "0001-01-01T00:00:00Z",
"gas": 0,
"gas_used": 0,
"input": "0x",
"output": "0x",
"decoded_output": null,
"error": "execution reverted",
"error_op": "REVERT",
"error_file_index": 14,
"error_line_number": 44,
"error_code_start": 1290,
"error_code_length": 62,
"network_id": "",
"calls": null
}
]
},
{
"hash": "",
"contract_name": "AugustusSwapper",
"function_name": "_revertWithData",
"function_pc": 1705,
"function_op": "JUMPDEST",
"function_file_index": 0,
"function_code_start": 52803,
"function_line_number": 1640,
"function_code_length": 120,
"absolute_position": 2092,
"caller_pc": 806,
"caller_op": "JUMP",
"caller_file_index": 0,
"caller_line_number": 1510,
"caller_code_start": 48500,
"caller_code_length": 27,
"call_type": "JUMPDEST",
"address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"from": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"from_balance": null,
"to": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"to_balance": null,
"value": null,
"caller": {
"address": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"balance": "50912118197849012"
},
"block_timestamp": "0001-01-01T00:00:00Z",
"gas": 603269,
"gas_used": 603269,
"storage_address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"input": "0x",
"decoded_input": [
{
"soltype": {
"name": "data",
"type": "bytes",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bytes"
}
},
"value": "0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000011446561646c696e65206272656163686564000000000000000000000000000000"
}
],
"output": "0x",
"decoded_output": null,
"error_absolute_position": 2098,
"error": "execution reverted",
"error_op": "REVERT",
"error_file_index": 0,
"error_line_number": 1641,
"error_code_start": 52881,
"error_code_length": 34,
"network_id": "",
"calls": [
{
"hash": "",
"contract_name": "AugustusSwapper",
"function_name": "_revertWithData",
"function_pc": 0,
"function_op": "",
"absolute_position": 2098,
"caller_pc": 0,
"caller_op": "",
"address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"from": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"from_balance": null,
"to": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"to_balance": null,
"value": null,
"block_timestamp": "0001-01-01T00:00:00Z",
"gas": 0,
"gas_used": 0,
"input": "0x",
"output": "0x",
"decoded_output": null,
"error": "execution reverted",
"error_op": "REVERT",
"error_file_index": 0,
"error_line_number": 1641,
"error_code_start": 52881,
"error_code_length": 34,
"network_id": "",
"calls": null
}
]
}
]
},
"stack_trace": [
{
"file_index": 0,
"contract": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"name": "AugustusSwapper",
"line": 1641,
"error": "execution reverted",
"code": "_revertWithData",
"op": "REVERT",
"length": 34
},
{
"file_index": 0,
"contract": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"name": "AugustusSwapper",
"line": 1510,
"error": null,
"code": "_revertWithData",
"op": "JUMP",
"length": 27
},
{
"file_index": 0,
"contract": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"name": "AugustusSwapper",
"line": 1467,
"error": null,
"code": "fallback",
"op": "JUMPDEST",
"length": 5950
}
],
"logs": null,
"balance_diff": null,
"nonce_diff": [
{
"address": "0x3F41a1CFd3C8B8d9c162dE0f42307a0095A6e5DF",
"original": "1094",
"dirty": "1095"
}
],
"state_diff": null,
"raw_state_diff": null,
"console_logs": null,
"asset_changes": null,
"balance_changes": [],
"created_at": "2023-08-10T12:48:11Z"
},
"error_message": "Deadline breached",
"error_info": {
"error_message": "Deadline breached",
"address": "0xbd7b550d2e7571383d84acf597a00d341e5c406e"
},
"method": "",
"decoded_input": null,
"call_trace": [
{
"call_type": "CALL",
"from": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"to": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"gas": 615574,
"gas_used": 12321,
"address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"error": "value:\"execution reverted\"",
"subtraces": 1,
"input": "0xa94e78ef0000000000000000000000000000000000000000000000000000000000000020...",
"output": "0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000011446561646c696e65206272656163686564000000000000000000000000000000",
"errorMessage": "value:\"Deadline breached\"",
"fromBalance": "0xb4e04d3ff20bb4"
},
{
"call_type": "DELEGATECALL",
"from": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"to": "0xbd7b550d2e7571383d84acf597a00d341e5c406e",
"gas": 600460,
"gas_used": 6554,
"address": "0xbd7b550d2e7571383d84acf597a00d341e5c406e",
"error": "value:\"execution reverted\"",
"trace_address": [
0
],
"input": "0xa94e78ef0000000000000000000000000000000000000000000000000000000000000020...",
"output": "0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000011446561646c696e65206272656163686564000000000000000000000000000000",
"gas_in": 612591,
"gas_cost": 603060,
"errorMessage": "value:\"Deadline breached\""
}
]
},
"simulation": {
"id": "1c08db12-8f6b-4377-95ef-2c0b99298de8",
"project_id": "dfdc391a-a15d-4590-9aef-8691259c7df4",
"owner_id": "7d5e8b1f-8bf8-4eae-a70f-fb7d354b1cc2",
"network_id": "1",
"block_number": 17884583,
"transaction_index": 0,
"from": "0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"to": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"input": "0xa94e78ef0000000000000000000000000000000000000000000000000000000000000020...",
"gas": 648318,
"gas_price": "0",
"gas_used": 45065,
"value": "0",
"method": "multiSwap",
"status": false,
"access_list": null,
"queue_origin": "",
"block_header": {
"number": "0x110e5a7",
"hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"stateRoot": "0x5aedfee941729c66fab3bc35cc00a8687d4c8f177e800565fa3895fee02a8d12",
"parentHash": "0x9075514cb7db4dc5c7f25b7b53bdee3ea51b3088eb94a5551668f49d5fd7bdc9",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"transactionsRoot": "0x3f3e3bac2d1a65adabe655196f48341105a8c21600b5d1dcd0f95ad6baf91d11",
"receiptsRoot": "0xb129fa08d3abb39c49b4e65f1edf7efc0d3d5ddf6b84ff802b43eb2b29e9b046",
"logsBloom": "0x74717005272adbead19e3886a21a471915102405ca59280ca44b9062f41101c5e441130e920943f04203fb604087c1b12293878b8c5b381213d09c35c12cc09046c0e4af0174382b7952554bf1f820ec0ff34a2c0560597035187563c6e023501ac2c8a2129384ab01a13c0015b43cdd7a0b03c200148d6d57861cb000a810560e11925caa60b13b60f5614117b606c68907e5859bc0903c643127dbc5900e2c831408093b4a209b1e40cec85cf20d07a4919a40b539994611a185ab00280022f39a08d67104014a096fa60a493a80da0f6e8a22412fb0ba6884429e1033a31cd8bce468d10c7d8a82663785a120c4408b2112604a101a5fa8891290302b970d",
"timestamp": "0x64d4dc8b",
"difficulty": "0x0",
"gasLimit": "0x1c9c380",
"gasUsed": "0x9d2881",
"miner": "0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5",
"extraData": "0x6265617665726275696c642e6f7267",
"mixHash": "0xcd3023878e91294b673f69b51e3ed64e814f6caabb795a93caadb34cc39a8ff3",
"nonce": "0x0000000000000000",
"baseFeePerGas": "0x4d0b44e27",
"size": "0x0",
"totalDifficulty": "0x0",
"uncles": null,
"transactions": null
},
"deposit_tx": false,
"system_tx": false,
"error_message": "Deadline breached",
"nonce": 1094,
"addresses": [
"0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"0xbd7b550d2e7571383d84acf597a00d341e5c406e"
],
"contract_ids": [
"eth:1:0x3f41a1cfd3c8b8d9c162de0f42307a0095a6e5df",
"eth:1:0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"eth:1:0xbd7b550d2e7571383d84acf597a00d341e5c406e"
],
"shared": false,
"created_at": "2023-12-20T14:03:57.3212051Z"
},
"contracts": [
{
"id": "eth:1:0xbd7b550d2e7571383d84acf597a00d341e5c406e",
"contract_id": "eth:1:0xbd7b550d2e7571383d84acf597a00d341e5c406e",
"balance": "",
"network_id": "1",
"public": true,
"verified_by": "etherscan",
"verification_date": "2023-06-13T17:26:37Z",
"address": "0xbd7b550d2e7571383d84acf597a00d341e5c406e",
"contract_name": "MultiPath",
"ens_domain": null,
"type": "contract",
"evm_version": "",
"compiler_version": "v0.7.5+commit.eb77ed08",
"optimizations_used": false,
"optimization_runs": 0,
"libraries": null,
"compiler_settings": {},
"deployed_bytecode": "0x6080604052600436106100c75760003560e01c806381cbd3ea11610074578063...",
"creation_bytecode": "0x6101206040523480156200001257600080fd5b506040516200354b3803806200...",
"data": {
"main_contract": 14,
"contract_info": [
{
"id": 5,
"path": "contracts/IAugustusSwapperV5.sol",
"name": "IAugustusSwapperV5.sol",
"source": "// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\n\ninterface IAugustusSwapperV5 {\n function hasRole(bytes32 role, address account) external view returns (bool);\n}\n"
},
{
"id": 8,
"path": "contracts/adapters/IBuyAdapter.sol",
"name": "IBuyAdapter.sol",
"source": "// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\n\nimport \"../lib/Utils.sol\";\n\ninterface IBuyAdapter {\n /**\n * @dev Certain adapters needs to be initialized.\n * This method will be called from Augustus\n */\n function initialize(bytes calldata data) external;\n\n /**\n * @dev The function which performs the swap on an exchange.\n * @param index Index of the router in the adapter\n * @param fromToken Address of the source token\n * @param toToken Address of the destination token\n * @param maxFromAmount Max amount of source tokens to be swapped\n * @param toAmount Amount of destination tokens to be received\n * @param targetExchange Target exchange address to be called\n * @param payload extra data which needs to be passed to this router\n */\n function buy(\n uint256 index,\n IERC20 fromToken,\n IERC20 toToken,\n uint256 maxFromAmount,\n uint256 toAmount,\n address targetExchange,\n bytes calldata payload\n ) external payable;\n}\n"
},
{
"id": 11,
"path": "contracts/lib/Utils.sol",
"name": "Utils.sol",
"source": "/*solhint-disable avoid-low-level-calls */\n// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\npragma experimental ABIEncoderV2;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"../ITokenTransferProxy.sol\";\n\n// ... remaining source omitted from this example"
},
{
"id": 1,
"path": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
"name": "IERC20.sol",
"source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n\n// ... remaining source omitted from this example"
},
{
"id": 3,
"path": "@openzeppelin/contracts/utils/Address.sol",
"name": "Address.sol",
"source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n\n// ... remaining source omitted from this example"
},
{
"id": 4,
"path": "contracts/AugustusStorage.sol",
"name": "AugustusStorage.sol",
"source": "// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\n\nimport \"./ITokenTransferProxy.sol\";\n\ncontract AugustusStorage {\n struct FeeStructure {\n uint256 partnerShare;\n bool noPositiveSlippage;\n bool positiveSlippageToUser;\n uint16 feePercent;\n string partnerId;\n bytes data;\n }\n\n ITokenTransferProxy internal tokenTransferProxy;\n address payable internal feeWallet;\n\n mapping(address => FeeStructure) internal registeredPartners;\n\n mapping(bytes4 => address) internal selectorVsRouter;\n mapping(bytes32 => bool) internal adapterInitialized;\n mapping(bytes32 => bytes) internal adapterVsData;\n\n mapping(bytes32 => bytes) internal routerData;\n mapping(bytes32 => bool) internal routerInitialized;\n\n bytes32 public constant WHITELISTED_ROLE = keccak256(\"WHITELISTED_ROLE\");\n\n bytes32 public constant ROUTER_ROLE = keccak256(\"ROUTER_ROLE\");\n}\n"
},
{
"id": 7,
"path": "contracts/adapters/IAdapter.sol",
"name": "IAdapter.sol",
"source": "// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\npragma abicoder v2;\n\nimport \"../lib/Utils.sol\";\n\ninterface IAdapter {\n /**\n * @dev Certain adapters needs to be initialized.\n * This method will be called from Augustus\n */\n function initialize(bytes calldata data) external;\n\n /**\n * @dev The function which performs the swap on an exchange.\n * @param fromToken Address of the source token\n * @param toToken Address of the destination token\n * @param fromAmount Amount of source tokens to be swapped\n * @param networkFee NOT USED - Network fee to be used in this router\n * @param route Route to be followed\n */\n function swap(\n IERC20 fromToken,\n IERC20 toToken,\n uint256 fromAmount,\n uint256 networkFee,\n Utils.Route[] calldata route\n ) external payable;\n}\n"
},
{
"id": 0,
"path": "@openzeppelin/contracts/math/SafeMath.sol",
"name": "SafeMath.sol",
"source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n\n// ... remaining source omitted from this example"
},
{
"id": 6,
"path": "contracts/ITokenTransferProxy.sol",
"name": "ITokenTransferProxy.sol",
"source": "// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\n\ninterface ITokenTransferProxy {\n function transferFrom(\n address token,\n address from,\n address to,\n uint256 amount\n ) external;\n}\n"
},
{
"id": 9,
"path": "contracts/fee/FeeModel.sol",
"name": "FeeModel.sol",
"source": "// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\n\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"../AugustusStorage.sol\";\nimport \"../lib/Utils.sol\";\nimport \"./IFeeClaimer.sol\";\n// helpers\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n// ... remaining source omitted from this example"
},
{
"id": 2,
"path": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol",
"name": "SafeERC20.sol",
"source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n\n// ... remaining source omitted from this example"
},
{
"id": 10,
"path": "contracts/fee/IFeeClaimer.sol",
"name": "IFeeClaimer.sol",
"source": "// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\n\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\ninterface IFeeClaimer {\n /**\n * @notice register partner's, affiliate's and PP's fee\n * @dev only callable by AugustusSwapper contract\n\n// ... remaining source omitted from this example"
},
{
"id": 12,
"path": "contracts/lib/balancerv2/IBalancerV2Vault.sol",
"name": "IBalancerV2Vault.sol",
"source": "// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\npragma abicoder v2;\n\nimport \"../Utils.sol\";\n\ninterface IBalancerV2Vault {\n enum SwapKind {\n GIVEN_IN,\n GIVEN_OUT\n }\n\n struct SingleSwap {\n bytes32 poolId;\n SwapKind kind;\n address assetIn;\n address assetOut;\n uint256 amount;\n bytes userData;\n }\n\n struct BatchSwapStep {\n bytes32 poolId;\n uint256 assetInIndex;\n uint256 assetOutIndex;\n uint256 amount;\n bytes userData;\n }\n\n struct FundManagement {\n address sender;\n bool fromInternalBalance;\n address payable recipient;\n bool toInternalBalance;\n }\n\n function swap(\n SingleSwap memory singleSwap,\n FundManagement memory funds,\n uint256 limit,\n uint256 deadline\n ) external payable returns (uint256);\n\n function batchSwap(\n SwapKind kind,\n BatchSwapStep[] memory swaps,\n address[] memory assets,\n FundManagement memory funds,\n int256[] memory limits,\n uint256 deadline\n ) external payable returns (int256[] memory);\n}\n"
},
{
"id": 13,
"path": "contracts/routers/IRouter.sol",
"name": "IRouter.sol",
"source": "// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\n\ninterface IRouter {\n /**\n * @dev Certain routers/exchanges needs to be initialized.\n * This method will be called from Augustus\n */\n function initialize(bytes calldata data) external;\n\n /**\n * @dev Returns unique identifier for the router\n */\n function getKey() external pure returns (bytes32);\n\n event SwappedV3(\n bytes16 uuid,\n address partner,\n uint256 feePercent,\n address initiator,\n address indexed beneficiary,\n address indexed srcToken,\n address indexed destToken,\n uint256 srcAmount,\n uint256 receivedAmount,\n uint256 expectedAmount\n );\n\n event BoughtV3(\n bytes16 uuid,\n address partner,\n uint256 feePercent,\n address initiator,\n address indexed beneficiary,\n address indexed srcToken,\n address indexed destToken,\n uint256 srcAmount,\n uint256 receivedAmount,\n uint256 expectedAmount\n );\n}\n"
},
{
"id": 14,
"path": "contracts/routers/MultiPath.sol",
"name": "MultiPath.sol",
"source": "/*solhint-disable avoid-low-level-calls*/\n// SPDX-License-Identifier: ISC\n\npragma solidity 0.7.5;\npragma abicoder v2;\n\nimport \"./IRouter.sol\";\nimport \"../IAugustusSwapperV5.sol\";\nimport \"../adapters/IAdapter.sol\";\nimport \"../adapters/IBuyAdapter.sol\";\n\n// ... remaining source omitted from this example"
}
],
"abi": [
{
"type": "constructor",
"name": "",
"constant": false,
"anonymous": false,
"stateMutability": "",
"inputs": [
{
"name": "_partnerSharePercent",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "_maxFeePercent",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "_paraswapReferralShare",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "_paraswapSlippageShare",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "_feeClaimer",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
}
],
"outputs": null
},
{
"type": "function",
"name": "paraswapReferralShare",
"constant": false,
"anonymous": false,
"stateMutability": "view",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
}
]
},
{
"type": "function",
"name": "getKey",
"constant": false,
"anonymous": false,
"stateMutability": "pure",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bytes"
}
}
]
}
],
"raw_abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "_partnerSharePercent",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_maxFeePercent",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_paraswapReferralShare",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_paraswapSlippageShare",
"type": "uint256"
},
{
"internalType": "contract IFeeClaimer",
"name": "_feeClaimer",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": {
"$circularRef": "constructor"
}
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes16",
"name": "uuid",
"type": "bytes16"
},
{
"indexed": false,
"internalType": "address",
"name": "partner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "feePercent",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "initiator",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "beneficiary",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "srcToken",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "destToken",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "srcAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "receivedAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "expectedAmount",
"type": "uint256"
}
],
"name": "BoughtV3",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes16",
"name": "uuid",
"type": "bytes16"
},
{
"indexed": false,
"internalType": "address",
"name": "partner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "feePercent",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "initiator",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "beneficiary",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "srcToken",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "destToken",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "srcAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "receivedAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "expectedAmount",
"type": "uint256"
}
],
"name": "SwappedV3",
"type": "event"
}
],
"states": [
{
"name": "adapterInitialized",
"type": "mapping (bytes32 => bool)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000004",
"indexed": false
},
{
"name": "adapterVsData",
"type": "mapping (bytes32 => bytes)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000005",
"indexed": false
},
{
"name": "routerData",
"type": "mapping (bytes32 => bytes)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000006",
"indexed": false
},
{
"name": "routerInitialized",
"type": "mapping (bytes32 => bool)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000007",
"indexed": false
},
{
"name": "tokenTransferProxy",
"type": "address",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
{
"name": "feeWallet",
"type": "address payable",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000001",
"indexed": false,
"simple_type": {
"type": "address payable"
}
},
{
"name": "registeredPartners",
"type": "mapping (address => tuple)",
"storage_location": "memory",
"components": [
{
"name": "partnerShare",
"type": "uint256",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "noPositiveSlippage",
"type": "bool",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000001",
"indexed": false,
"simple_type": {
"type": "bool"
}
},
{
"name": "positiveSlippageToUser",
"type": "bool",
"storage_location": "memory",
"offset": 8,
"index": "0x0000000000000000000000000000000000000000000000000000000000000001",
"indexed": false,
"simple_type": {
"type": "bool"
}
},
{
"name": "feePercent",
"type": "uint16",
"storage_location": "memory",
"offset": 16,
"index": "0x0000000000000000000000000000000000000000000000000000000000000001",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "partnerId",
"type": "string",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000002",
"indexed": false,
"simple_type": {
"type": "string"
}
},
{
"name": "data",
"type": "bytes",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000003",
"indexed": false,
"simple_type": {
"type": "bytes"
}
}
],
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000002",
"indexed": false
},
{
"name": "selectorVsRouter",
"type": "mapping (bytes4 => address)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000003",
"indexed": false
}
]
},
"src_map": {
"0": {
"r": "316:13499:14",
"s": 316,
"l": 13499,
"ln": 14,
"c": 1,
"f": 14,
"j": "-"
},
"2": {
"r": "316:13499:14",
"s": 316,
"l": 13499,
"ln": 14,
"c": 1,
"f": 14,
"j": "-"
}
},
"creation_block": 0,
"creation_tx": "",
"creator_address": "",
"created_at": "2023-06-13T17:26:36Z",
"language": "solidity",
"in_project": false
},
{
"id": "eth:1:0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"contract_id": "eth:1:0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"balance": "",
"network_id": "1",
"public": true,
"verified_by": "etherscan",
"verification_date": "2021-08-18T12:43:57Z",
"address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"contract_name": "AugustusSwapper",
"ens_domain": null,
"type": "contract",
"evm_version": "istanbul",
"compiler_version": "v0.7.5+commit.eb77ed08",
"optimizations_used": true,
"optimization_runs": 1000000,
"libraries": null,
"compiler_settings": {
"optimizer": {
"enabled": true,
"runs": 1000000
},
"evmVersion": "istanbul",
"metadata": {
"useLiteralContent": true
}
},
"deployed_bytecode": "0x60806040526004361061019a5760003560e01c80639010d07c116100e1578063...",
"creation_bytecode": "0x60806040523480156200001157600080fd5b5060405162003395380380620033...",
"data": {
"main_contract": 0,
"contract_info": [
{
"id": 0,
"path": "contracts/flattened/AugustusSwapper.sol",
"name": "AugustusSwapper.sol",
"source": "// File: openzeppelin-solidity/contracts/utils/EnumerableSet.sol\n\n\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n\n// ... remaining source omitted from this example"
}
],
"abi": [
{
"type": {
"$circularRef": "constructor"
},
"name": "",
"constant": false,
"anonymous": false,
"stateMutability": "",
"inputs": [
{
"name": "_feeWallet",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
}
],
"outputs": null
},
{
"type": "function",
"name": "setImplementation",
"constant": false,
"anonymous": false,
"stateMutability": "nonpayable",
"inputs": [
{
"name": "selector",
"type": "bytes4",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bytes"
}
},
{
"name": "implementation",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
}
],
"outputs": []
},
{
"type": "function",
"name": "registerPartner",
"constant": false,
"anonymous": false,
"stateMutability": "nonpayable",
"inputs": [
{
"name": "partner",
"type": "address",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
{
"name": "_partnerShare",
"type": "uint256",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "_noPositiveSlippage",
"type": "bool",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bool"
}
},
{
"name": "_positiveSlippageToUser",
"type": "bool",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bool"
}
},
{
"name": "_feePercent",
"type": "uint16",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "partnerId",
"type": "string",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "string"
}
},
{
"name": "_data",
"type": "bytes",
"storage_location": "default",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "bytes"
}
}
],
"outputs": []
}
],
"raw_abi": [
{
"inputs": [
{
"internalType": "address payable",
"name": "_feeWallet",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": {
"$circularRef": "constructor"
}
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "adapter",
"type": "address"
}
],
"name": "AdapterInitialized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "previousAdminRole",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "newAdminRole",
"type": "bytes32"
}
],
"name": "RoleAdminChanged",
"type": "event"
}
],
"states": [
{
"name": "feeWallet",
"type": "address payable",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000001",
"indexed": false,
"simple_type": {
"type": "address payable"
}
},
{
"name": "adapterVsData",
"type": "mapping (bytes32 => bytes)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000005",
"indexed": false
},
{
"name": "routerData",
"type": "mapping (bytes32 => bytes)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000006",
"indexed": false
},
{
"name": "tokenTransferProxy",
"type": "address",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "address"
}
},
{
"name": "registeredPartners",
"type": "mapping (address => tuple)",
"storage_location": "memory",
"components": [
{
"name": "partnerShare",
"type": "uint256",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "noPositiveSlippage",
"type": "bool",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000001",
"indexed": false,
"simple_type": {
"type": "bool"
}
},
{
"name": "positiveSlippageToUser",
"type": "bool",
"storage_location": "memory",
"offset": 8,
"index": "0x0000000000000000000000000000000000000000000000000000000000000001",
"indexed": false,
"simple_type": {
"type": "bool"
}
},
{
"name": "feePercent",
"type": "uint16",
"storage_location": "memory",
"offset": 16,
"index": "0x0000000000000000000000000000000000000000000000000000000000000001",
"indexed": false,
"simple_type": {
"type": "uint"
}
},
{
"name": "partnerId",
"type": "string",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000002",
"indexed": false,
"simple_type": {
"type": "string"
}
},
{
"name": "data",
"type": "bytes",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000003",
"indexed": false,
"simple_type": {
"type": "bytes"
}
}
],
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000002",
"indexed": false
},
{
"name": "selectorVsRouter",
"type": "mapping (bytes4 => address)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000003",
"indexed": false
},
{
"name": "adapterInitialized",
"type": "mapping (bytes32 => bool)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000004",
"indexed": false
},
{
"name": "routerInitialized",
"type": "mapping (bytes32 => bool)",
"storage_location": "storage",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000007",
"indexed": false
},
{
"name": "_roles",
"type": "mapping (bytes32 => tuple)",
"storage_location": "memory",
"components": [
{
"name": "members",
"type": "tuple",
"storage_location": "memory",
"components": [
{
"name": "_inner",
"type": "tuple",
"storage_location": "memory",
"components": [
{
"name": "_values",
"type": "bytes32[]",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false,
"simple_type": {
"type": "slice",
"nested_type": {
"type": "bytes"
}
}
},
{
"name": "_indexes",
"type": "mapping (bytes32 => uint256)",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000001",
"indexed": false
}
],
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false
}
],
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000000",
"indexed": false
},
{
"name": "adminRole",
"type": "bytes32",
"storage_location": "memory",
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000002",
"indexed": false,
"simple_type": {
"type": "bytes"
}
}
],
"offset": 0,
"index": "0x0000000000000000000000000000000000000000000000000000000000000008",
"indexed": false
}
]
},
"src_map": {
"0": {
"r": "47102:5950:0",
"s": 47102,
"l": 5950,
"ln": 1467,
"c": 1,
"j": "-"
},
"2": {
"r": "47102:5950:0",
"s": 47102,
"l": 5950,
"ln": 1467,
"c": 1,
"j": "-"
}
},
"creation_block": 0,
"creation_tx": "",
"creator_address": "",
"created_at": "2021-08-18T12:43:57Z",
"language": "solidity",
"in_project": false
}
],
"generated_access_list": []
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "bad_request",
"message": "Bad request input parameters"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "unauthorized",
"message": "Unauthorized"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "insufficient_permissions",
"message": "Insufficient permissions"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "resource_not_found",
"message": "The resource you requested could not be found."
}
}{
"error": {
"id": "9a7bbe06-7f6f-4a45-8c78-8d64b9a9d0e1",
"slug": "too_many_requests",
"message": "API Rate limit exceeded."
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "internal_server_error",
"message": "Internal server error"
}
}Authorizations
An API key is a token that a client provides when making API calls. Send it as the X-Access-Key request header on any endpoint:
curl '<API_ENDPOINT>' \ -H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \ ...
Learn how to generate API access tokens at Tenderly Docs.
Path Parameters
Body
Simulate transaction payload
Encoded contract method call data.
"0xa94e78ef000000000000000000000000000000000000000000000000000000000000002000000000000000000000000068037790a0229e9ce6eaa8a99ea92964106c470300000000000000000000000000000000000000000000010f0cf064dd592000000000000000000000000000000000000000000000000000000000000145dc1b2e00000000000000000000000000000000000000000000000000000001477f4d7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000007800000000000000000000000000000000000000000000000000000000064d281e65c9438a5a99c4bccb1035296d5d2d8d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000320000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a73000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002b68037790a0229e9ce6eaa8a99ea92964106c47030001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000009be264469ef954c139da4a45cf76cbcc5e3a6a730000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000060000000000000000000000001b81d678ffb9c0263b24a97847620c99d213eb14000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000064db6806000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000064dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
Position within block_number at which the transaction executes. 0 (default) runs it at
the start of the block, before any of the block's transactions; N runs it after the block's
transactions 0 to N-1; the block's transaction count runs it after all of them (the
block's post-state). Requires an explicit block_number. A value above the transaction
count is rejected.
0
Overrides for specific block header.
{ "number": "0x110ace7", "hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "stateRoot": "0xef53217576746e2df5a5acb6993b629e548592008c22e5eb0c543ab0e597102f", "parentHash": "0x0cf8a2db87cf124e1c8fceffd12c325e07fb51736c7dce9d0f945913616cb40a", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "transactionsRoot": "0xb29cef267cf8e4b1a629f2aaeff8e3b4faf79195efcb63a08e4823070ee85f21", "receiptsRoot": "0x9290b9bda89e8bc6173f17fab6b94ef7ffb1d33770e5d0fc9e21039ef936c777", "logsBloom": "0x40330cb14709a3aa3021ae29e85c20249ba3bc0c08bf9c7422cf48124a121120853709b6c20d1261603531d2b8b6810feeb920399c23eb1d8601f14e157921f9ac4b55994f4c3e686a0242ae56ea70ed84fb0b04d6ea1eed11e356cd85609fc3bf310367723a6c1b08453ceecc22d8df13f30504822865610bca1197895e7156a9bfd2756614028c1f5cf5e87bd6a43795c61841abc4d01c6475eae29ad813520b0223401451e9a3fe836ad63e967557cc99030243ad151927d4255e93b7391ed6d29882497108c2044092a24cc68291279b70a7f404ba1139210d5e1c25b40beaf2f48cc341d4c38787169830215105c1f014db5b98ccee22a94d3ba0663c1a", "timestamp": "0x64d22deb", "difficulty": "0x0", "gasLimit": "0x1c9c380", "gasUsed": "0x1c9b51a", "baseFeePerGas": "0x3d5200956", "miner": "0xcda9d71bdfae59b89cee131ed3079f8ac4c77062", "extraData": "0xd883010c00846765746888676f312e32302e34856c696e7578", "mixHash": "0x9096c8da5df4b9bb771f91a81c3bd954d2a9c39c1bf05502877d057b1f76fb04", "nonce": "0x0000000000000000", "size": "0x0", "totalDifficulty": "0x0", "transactions": null, "uncles": null }
Overrides for a given contract. In this mapping, the key is the contract address, and the value is an object that contains overrides of nonce, code, balance, or state.
Show child attributes
Show child attributes
{ "0xdac17f958d2ee523a2206206994597c13d831ec7": { "storage": { "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000c6cde7c39eb2f0f0095f41570af89efc2c1ea828" } } }
Response
A successful response.
- Full Simulation Response
- Quick Simulation Response
- ABI Simulation Response
- Failed Transaction Simulation Response
- Simulate Transaction Response with Asset Changes (ERC20 Swap)
- Simulate Transaction Response with Asset Changes (NFT Transfer)
Simulation response containing the simulated transaction, simulation metadata, involved contracts, and generated access list.
Contains data related to the simulated transaction, including its hash, block number,
origin and destination addresses, gas details, input data, nonce, status, timestamp,
and involved contract addresses. The nested transaction_info object holds detailed
execution data such as the call trace, emitted logs, state diffs, and asset changes.
Show child attributes
Show child attributes
List of contract accounts involved in the simulation. Each entry contains the contract's ID, network ID, address, name, verification status, associated standards (ERC20, ERC721, etc.), token data, compiler version, deployed bytecode, and source code (if verified).
Show child attributes
Show child attributes