-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sentry #43
Add sentry #43
Conversation
Did you mean: sentry? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actions/utils.ts
Outdated
const transaction = Sentry.startTransaction({ | ||
op: "test", | ||
name: "My First Test Transaction", | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this be removed before merging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes 100%
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nits
@@ -127,15 +131,49 @@ async function getTradeableOrderWithSignature( | |||
conditionalOrder: ConditionalOrder, | |||
contract: ComposableCoW | |||
) { | |||
const proof = conditionalOrder.proof ? conditionalOrder.proof.path : []; | |||
const offchainInput = "0x"; | |||
contract.getTradeableOrderWithSignature; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure of this line?
const { to, data } = | ||
await contract.populateTransaction.getTradeableOrderWithSignature( | ||
owner, | ||
conditionalOrder.params, | ||
offchainInput, | ||
proof | ||
); | ||
|
||
// await contract.provider | ||
// .estimateGas({ | ||
// to: contract.address, | ||
// data, | ||
// }) | ||
// .then((r) => { | ||
// console.log("[getTradeableOrderWithSignature:estimateGas] Success", r); | ||
// }) | ||
// .catch((e) => { | ||
// console.error( | ||
// '[getTradeableOrderWithSignature:estimateGas] Error during "getTradeableOrderWithSignature" call: ', | ||
// e | ||
// ); | ||
// }); | ||
|
||
console.log("[getTradeableOrderWithSignature] Simulate", { | ||
to, | ||
data, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the objective is to get the calldata
so that it can be tested / simulated elsewhere, may I suggest using encodeFunctionData
to produce the calldata
that you desire for the simulation?
Actually, on second glance, populateTransaction
does seem better. Is there any reason for keeping the estimateGas
commented code though as this would return the same errors as just doing the callStatic
, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, sorry, this was a test I did debug the issue yesterday. I should have removed it. Im doing a follow-up with some cleanup and a small refactor and I will kill this
} from "@sentry/node"; | ||
import { CaptureConsole as CaptureConsoleIntegration } from "@sentry/integrations"; | ||
|
||
// const Sentry = require("@sentry/node"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// const Sentry = require("@sentry/node"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will delete in a follow up PR (small refactor)
// await contract.provider | ||
// .estimateGas({ | ||
// to: contract.address, | ||
// data, | ||
// }) | ||
// .then((r) => { | ||
// console.log("[getTradeableOrderWithSignature:estimateGas] Success", r); | ||
// }) | ||
// .catch((e) => { | ||
// console.error( | ||
// '[getTradeableOrderWithSignature:estimateGas] Error during "getTradeableOrderWithSignature" call: ', | ||
// e | ||
// ); | ||
// }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// await contract.provider | |
// .estimateGas({ | |
// to: contract.address, | |
// data, | |
// }) | |
// .then((r) => { | |
// console.log("[getTradeableOrderWithSignature:estimateGas] Success", r); | |
// }) | |
// .catch((e) => { | |
// console.error( | |
// '[getTradeableOrderWithSignature:estimateGas] Error during "getTradeableOrderWithSignature" call: ', | |
// e | |
// ); | |
// }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will delete in a follow up PR. This was useful for some test, but i can remove it now
The comments above not addressed in this PR is coming in a follow up today |
Summary
Tenderly Actions logs can't be trusted 100%, they currently have an issue which make us have some blind spots on what is happening.
for this reason i integrated the WatchTower with tenderly, so we can debug better cases we encounter in production:
Sentry project: https://cowprotocol.sentry.io/projects/watch-tower-tenderly/?project=4505714328928256
To Test