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

Docs: authwit how to with both aztecnr and ts #247

Closed
catmcgee opened this issue Apr 24, 2024 · 2 comments
Closed

Docs: authwit how to with both aztecnr and ts #247

catmcgee opened this issue Apr 24, 2024 · 2 comments
Assignees

Comments

@catmcgee
Copy link
Collaborator

No description provided.

@catmcgee catmcgee self-assigned this Apr 24, 2024
@critesjosh critesjosh assigned jzaki and unassigned catmcgee Apr 30, 2024
@critesjosh
Copy link
Collaborator

Adding some info about public authwits from a relevant discord discussion

const action = asset.withWallet(wallets[1]).methods.transfer_public(accounts[0].address, accounts[1].address, amount, nonce);

await wallets[0].setPublicAuthWit({ caller: accounts[1].address, action }, true).send().wait();

asset - the token you are authorizing spending of
wallets[1] - the wallet that will be sending the transaction to the network
accounts[0].address - the address that the tokens are coming from
accounts[1].address - the address that you are sending the tokens to
caller - the address that will be making the call, this will be the uniswap contract address in your case i believe

from this test

@catmcgee catmcgee assigned catmcgee and unassigned jzaki May 6, 2024
@catmcgee
Copy link
Collaborator Author

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

No branches or pull requests

3 participants