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

Add Permit and Permit2 signature docs #498

Merged
merged 12 commits into from
Dec 4, 2024
Merged

Conversation

brunoguerios
Copy link
Member

Closes #369

@brunoguerios brunoguerios added the documentation Improvements or additions to documentation label Nov 22, 2024
@brunoguerios brunoguerios self-assigned this Nov 22, 2024
README.md Outdated Show resolved Hide resolved
@brunoguerios brunoguerios marked this pull request as ready for review November 27, 2024 15:02
Copy link
Member

Choose a reason for hiding this comment

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

Attempt to run this script seems to result in the following error:

[ b-sdk ] $ pnpm example ./examples/addLiquidity/addLiquidityUnbalanced.ts

> @balancer/sdk@0.32.2 example /home/matthu/Desktop/Balancer/b-sdk
> npx tsx ./examples/lib/executeExample.ts "./examples/addLiquidity/addLiquidityUnbalanced.ts"

checking rpcUrl 8945 {}
🛠️  Starting anvil { port: 8945, forkBlockNumber: 7010800n }
/home/matthu/Desktop/Balancer/b-sdk/src/data/providers/balancer-api/modules/pool-state/index.ts:54
            ...data.poolGetPool,
                    ^


TypeError: Cannot read properties of null (reading 'poolGetPool')
    at Pools.fetchPoolState (/home/matthu/Desktop/Balancer/b-sdk/src/data/providers/balancer-api/modules/pool-state/index.ts:54:21)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async addLiquidityExample (/home/matthu/Desktop/Balancer/b-sdk/examples/addLiquidity/addLiquidityUnbalanced.ts:82:23)
    at async runAgainstFork (/home/matthu/Desktop/Balancer/b-sdk/examples/addLiquidity/addLiquidityUnbalanced.ts:47:18)
    at async executeExample (/home/matthu/Desktop/Balancer/b-sdk/examples/lib/executeExample.ts:6:5)

Node.js v20.17.0
 ELIFECYCLE  Command failed with exit code 1
 ```

Copy link
Member

@MattPereira MattPereira Dec 3, 2024

Choose a reason for hiding this comment

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

Tried moving the forkBlockNumber but still fails with same poolGetPool error

Copy link
Member

@MattPereira MattPereira Dec 3, 2024

Choose a reason for hiding this comment

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

Recreated the query and looks like the response from API is coming up dry

image
image

Copy link
Member

Choose a reason for hiding this comment

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

Maybe the API is on deploy11 but the pool is from deploy10?

Heres a tenderly simulation at deploy11 vault explorer that shows pool is not registered

Copy link
Member

@MattPereira MattPereira Dec 3, 2024

Choose a reason for hiding this comment

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

Looks like this PR is on deploy 10 and API is on deploy 11

Examples run fine after merging main into this PR and updating with a deploy 11 pool address

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for checking that!
You're right - sorry - I had this open before updating to deploy11.
I'll update the PR over here.

Copy link
Member Author

Choose a reason for hiding this comment

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

done ✅

@brunoguerios brunoguerios merged commit c4481c6 into main Dec 4, 2024
4 checks passed
@brunoguerios brunoguerios deleted the permit-permit2-docs branch December 4, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Permit Signatures - Document relevant info
2 participants