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: make SDK compatible with mainnet contracts #464

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

MegaRedHand
Copy link
Contributor

@MegaRedHand MegaRedHand commented Jan 23, 2025

What Changed?

This PR makes the AllocationManager initialization optional in the bindings builder. This should make the SDK compatible with the current version of the contracts in mainnet.

Reviewer Checklist

  • Code is well-documented
  • Code adheres to Go naming conventions
  • Code deprecates any old functionality before removing it

@MegaRedHand MegaRedHand self-assigned this Jan 23, 2025
@MegaRedHand MegaRedHand marked this pull request as ready for review January 29, 2025 15:03
@MegaRedHand MegaRedHand marked this pull request as draft January 29, 2025 15:57
// Makes a contract call to retrieve an address, but returning a zero address if the call reverts.
func getAddressOrZero(getAddress func(*bind.CallOpts) (gethcommon.Address, error)) (gethcommon.Address, error) {
address, err := getAddress(&bind.CallOpts{})
if errors.Is(err, gethvm.ErrExecutionReverted) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a jsonError, and even though it results in the same error message, we can't match on it 😭

@MegaRedHand MegaRedHand marked this pull request as ready for review January 29, 2025 16:52
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.

1 participant