Skip to content
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

feat: implement bondescalationmodule rpc calls #43

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

jahabeebs
Copy link
Collaborator

🤖 Linear

Closes GRT-142

Description

  • Implements pledgeForDispute, pledgeAgainstDispute, settleDispute (settleBondEscalation)
  • Adds the custom contract errors in code comments (to be refactored into a map in an error handling PR)

@jahabeebs jahabeebs self-assigned this Sep 16, 2024
Copy link

linear bot commented Sep 16, 2024

Copy link
Collaborator

@0xyaco 0xyaco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! We need to change some addresses and ABIs though 😬

return;
try {
const { request: simulatedRequest } = await this.readClient.simulateContract({
address: this.oracleContract.address,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These methods are in the BondEscalationModule, not the Oracle module (tip, check the linked sources within the Linear issue to see that contract)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why we are not getting type errors here given that oracleAbi does not have any "pledgeForDispute" functions

Copy link
Collaborator

@0xnigir1 0xnigir1 Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

according to Viem, the most common issue is missing the as const assertion in the abi

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately the const assertions don't seem to be working in this way--could it be the abis are so large that it disabled intellisense?

return;
try {
const { request: simulatedRequest } = await this.readClient.simulateContract({
address: this.oracleContract.address,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to change the ABI too

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 515 to 516
address: this.oracleContract.address,
abi: oracleAbi,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jahabeebs jahabeebs force-pushed the feat/grt-142-bond-escalation-rpc-calls branch from f4a2378 to d1e2637 Compare September 17, 2024 20:02
@jahabeebs jahabeebs requested a review from 0xyaco September 17, 2024 20:05
Copy link
Collaborator

@0xyaco 0xyaco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 🌔

eboRequestCreatorAbi,
epochManagerAbi,
oracleAbi,
} from "../../src/abis/index.js";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Niceeee

Copy link
Collaborator

@0xnigir1 0xnigir1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 🚀

@jahabeebs jahabeebs merged commit 61ec14c into dev Sep 17, 2024
5 checks passed
@jahabeebs jahabeebs deleted the feat/grt-142-bond-escalation-rpc-calls branch September 17, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants