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 call utxo in UTXO Ledger #1420

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

Neylix
Copy link
Member

@Neylix Neylix commented Feb 6, 2024

Description

Add the contract call UTXO on UTXO Ledger.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Unit test

Created a contract allowing to send a call to the contract but not creating a transaction to see the call in the genesis inputs on the explorer (using ?debug flag)

@version 1
condition triggered_by: transaction, on: vote(), as: []
actions triggered_by: transaction, on: vote() do
  # uco_movements are not filled during contract call validation
  # but they exists during contract execution
  if Map.size(transaction.uco_movements) == 0 do
    Contract.set_content("ok")
  else
    # raise an error
    1/0
  end
end

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@samuelmanzanera samuelmanzanera merged commit 27217a1 into archethic-foundation:AEIP-21 Feb 8, 2024
1 check passed
@Neylix Neylix deleted the Add-call-utxo branch February 8, 2024 13:42
Neylix added a commit that referenced this pull request Feb 12, 2024
* Import ArchethicCase

* Add contract call utxo in UTXO Ledger
Neylix added a commit that referenced this pull request Feb 21, 2024
* Import ArchethicCase

* Add contract call utxo in UTXO Ledger
Neylix added a commit that referenced this pull request Feb 21, 2024
* Import ArchethicCase

* Add contract call utxo in UTXO Ledger
Neylix added a commit that referenced this pull request Mar 6, 2024
* Import ArchethicCase

* Add contract call utxo in UTXO Ledger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants