Skip to content

Conversation

@theiari
Copy link
Contributor

@theiari theiari commented Oct 21, 2025

Description of change

Implement "Account with Spending limit" example for abstract accounts.

Links to any relevant issues

fixes #8651

How the change has been tested

  • Basic tests (linting, compilation, formatting, unit/integration tests)
  • Patch-specific tests (correctness, functionality coverage)
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

@vercel
Copy link

vercel bot commented Oct 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

6 Skipped Deployments
Project Deployment Review Updated (UTC)
apps-backend Ignored Ignored Preview Jan 15, 2026 11:29am
apps-ui-kit Ignored Ignored Preview Jan 15, 2026 11:29am
iota-evm-bridge Ignored Ignored Preview Jan 15, 2026 11:29am
iota-multisig-toolkit Ignored Ignored Preview Jan 15, 2026 11:29am
rebased-explorer Ignored Ignored Preview Jan 15, 2026 11:29am
wallet-dashboard Ignored Ignored Preview Jan 15, 2026 11:29am

@theiari theiari self-assigned this Oct 21, 2025
@theiari theiari added sc-platform Issues related to the Smart Contract Platform group. vm-language Issues related to the VM & Language Team labels Oct 21, 2025
@theiari theiari linked an issue Oct 21, 2025 that may be closed by this pull request
Copy link
Contributor

@TheMrAI TheMrAI left a comment

Choose a reason for hiding this comment

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

Haven't checked the tests yet, just skimmed the rest.

@theiari theiari marked this pull request as ready for review October 21, 2025 11:46
@theiari theiari requested a review from a team as a code owner October 21, 2025 11:46

public fun authenticate<T>(
account: &SpendLimit,
coins: &vector<Coin<T>>,
Copy link
Member

Choose a reason for hiding this comment

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

I don't get how this authenticate function prevents me from spending from the account. Some coins are passed here as auth inputs, but who to say that there are no more coins as PTB inputs that the authenticated transactions can spend?

On another note, spending limit without a time frame is rather useless, no? If I can spend $100 at a time, but I can repeat it as many times as I can then it's pretty easy to overspend :trollface:

If the intention is to have an account where you can only spend $X/period, it's pretty tought to implement without write access in the auth function.

@theiari theiari marked this pull request as draft October 31, 2025 11:39
@miker83z miker83z requested review from Dkwcs and valeriyr and removed request for a team December 2, 2025 12:25
@theiari theiari removed the sc-platform Issues related to the Smart Contract Platform group. label Dec 9, 2025
@theiari theiari changed the base branch from vm-lang/aa-auth/8116-feature-branch to vm-lang/aa-auth/8805-beta-feature-branch December 11, 2025 10:50
@miker83z miker83z force-pushed the vm-lang/aa-auth/8805-beta-feature-branch branch from 1ed444b to ad3bcf7 Compare December 11, 2025 12:10
@theiari theiari force-pushed the vm-lang/aa-auth/8651-implement-account-with-spending-limit-using-account-abstraction branch 2 times, most recently from 92f7cee to c7c6101 Compare December 12, 2025 13:23
@theiari theiari force-pushed the vm-lang/aa-auth/8651-implement-account-with-spending-limit-using-account-abstraction branch from f083f09 to ce24754 Compare December 16, 2025 12:41
@theiari theiari marked this pull request as ready for review December 16, 2025 12:43
@theiari theiari force-pushed the vm-lang/aa-auth/8651-implement-account-with-spending-limit-using-account-abstraction branch from ce24754 to 0bb3460 Compare December 16, 2025 12:59
}

public fun authenticate(
account: &mut SpendLimit,
Copy link
Contributor

Choose a reason for hiding this comment

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

Right, this must be account: &SpendLimit. Check comment in authenticate_with_amount

Base automatically changed from vm-lang/cherry-pick-aa-examples to vm-lang/aa-auth/8805-beta-feature-branch January 12, 2026 14:29
@miker83z miker83z force-pushed the vm-lang/aa-auth/8651-implement-account-with-spending-limit-using-account-abstraction branch from 088a7bc to 7c23b76 Compare January 13, 2026 18:26
@miker83z miker83z force-pushed the vm-lang/aa-auth/8651-implement-account-with-spending-limit-using-account-abstraction branch from e2b0af4 to e36de78 Compare January 13, 2026 18:49
Copy link
Contributor

@Dkwcs Dkwcs left a comment

Choose a reason for hiding this comment

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

LGTM, left few comments

@miker83z miker83z merged commit 04114eb into vm-lang/aa-auth/8805-beta-feature-branch Jan 15, 2026
35 checks passed
@miker83z miker83z deleted the vm-lang/aa-auth/8651-implement-account-with-spending-limit-using-account-abstraction branch January 15, 2026 12:36
miker83z added a commit that referenced this pull request Jan 19, 2026
…ple (#8959)

# Description of change

Implement "Account with Spending limit" example for abstract accounts.

## Links to any relevant issues

fixes #8651

## How the change has been tested

- [x] Basic tests (linting, compilation, formatting, unit/integration
tests)
- [ ] Patch-specific tests (correctness, functionality coverage)
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] I have checked that new and existing unit tests pass locally with
my changes

---------

Co-authored-by: miker83z <mirko.zichichi@iota.org>
miker83z added a commit that referenced this pull request Jan 26, 2026
…ple (#8959)

# Description of change

Implement "Account with Spending limit" example for abstract accounts.

## Links to any relevant issues

fixes #8651

## How the change has been tested

- [x] Basic tests (linting, compilation, formatting, unit/integration
tests)
- [ ] Patch-specific tests (correctness, functionality coverage)
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] I have checked that new and existing unit tests pass locally with
my changes

---------

Co-authored-by: miker83z <mirko.zichichi@iota.org>
miker83z added a commit that referenced this pull request Jan 26, 2026
…ple (#8959)

# Description of change

Implement "Account with Spending limit" example for abstract accounts.

## Links to any relevant issues

fixes #8651

## How the change has been tested

- [x] Basic tests (linting, compilation, formatting, unit/integration
tests)
- [ ] Patch-specific tests (correctness, functionality coverage)
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] I have checked that new and existing unit tests pass locally with
my changes

---------

Co-authored-by: miker83z <mirko.zichichi@iota.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vm-language Issues related to the VM & Language Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement "Account With Spending Limit" using account abstraction

5 participants