Skip to content

Feat/cip67 cip68 #2

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

Merged

Conversation

Cat-Treat
Copy link

Updating to current, resolving merge conflicts

cffls and others added 30 commits January 14, 2024 09:05
The API seems to expect the whole transaction object, not just CBOR bytes

Co-authored-by: Matthias Benkort <[email protected]>
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.2 to 7.4.4.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@7.4.2...7.4.4)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [frozendict](https://github.com/Marco-Sulla/python-frozendict) from 2.3.8 to 2.4.0.
- [Release notes](https://github.com/Marco-Sulla/python-frozendict/releases)
- [Commits](Marco-Sulla/python-frozendict@v2.3.8...v2.4.0)

---
updated-dependencies:
- dependency-name: frozendict
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) from 3.3.1 to 3.5.0.
- [Release notes](https://github.com/pytest-dev/pytest-xdist/releases)
- [Changelog](https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst)
- [Commits](pytest-dev/pytest-xdist@v3.3.1...v3.5.0)

---
updated-dependencies:
- dependency-name: pytest-xdist
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add to_json for RawPlutusData

* Add from_json for RawPlutusData

* Add test for serialization and deserialization of generic datums in
PlutusData

* Ensure that non-CborTag primitives are correctly handled as well

* Fix bug in conversion
* feat: add cardano-cli chain context

* fix: allow instances of str to submit_tx_cbor

* fix: cast to int for asset amount and check for None in get_min_utxo

* test: add test for cardano-cli chain context

* Black formatting

* Fix some QA issues

* refactor: use `--out-file /dev/stdout` to get utxo data as json

* fix: remove unused offline/online mode code

* fix: remove unused fraction parser method

* fix: add docker configuration to use cardano-cli in a Docker container and network args method to use custom networks

* test: add integration tests for cardano-cli

* test: fix cardano-node container name

* Add more integration tests for cardano cli context

---------

Co-authored-by: Hareem Adderley <[email protected]>
Co-authored-by: Niels Mündler <[email protected]>
Co-authored-by: Jerry <[email protected]>
* Fix the printing of RawPlutusData

* Restore the automatic repr function
…nd (Python-Cardano#303)

* Add tests for plutus script fetching and inline datums

* Add test case for datum hash

* Add epoch test case

* Formatting

* Fix typing

* Be more lenient in assigning datum hash

This is consistent with ogmios

* Generalize the types inside RawPlutusData

* Add support for RawCBOR primitivization

* Fix limit primitive type to not use a Union type
* Accept empty values for restoration

* Fix black formatting

* Improve test reliability
)

* Add support for withdrawal scripts

* Add proper redeemer index computation for withdrawals

* Fix handling of reward tag results in transaction builder
Ogmios 5 and blockfrost both refer to script redeemers that use the
withdrawal redeemer as "withdrawal:{index}". The only place where the
name of the redeemer tag is used is for evaluating the execution steps
in the transaction builder. Therefore I recommend renaming the redeemer
tag to the name used by other cardano tooling.

Note that in Ogmios 6, this name changes to "withdraw"
* Use Fraction for protocol parameters

* Fix testcase
* feat: add cardano-cli chain context

* fix: allow instances of str to submit_tx_cbor

* fix: cast to int for asset amount and check for None in get_min_utxo

* test: add test for cardano-cli chain context

* Black formatting

* Fix some QA issues

* refactor: use `--out-file /dev/stdout` to get utxo data as json

* fix: remove unused offline/online mode code

* fix: remove unused fraction parser method

* fix: add docker configuration to use cardano-cli in a Docker container and network args method to use custom networks

* test: add integration tests for cardano-cli

* test: fix cardano-node container name

* feat: add initial functionality for pool certificates

* test: add some tests for pool certificates

* refactor: use built in fractions module

* fix: output PoolRegistration as flat list

* fix: clean up some code

* test: add tests for pool params

* Add more integration tests for cardano cli context

* feat: add stake pool key pairs

* fix: resolve mypy and black linting issues

* feat: add witness count override for fee estimation
add initial stake pool registration flag and deposit
add pool vkey hashes if certificate exists

* chore: add integration test temporary folders to ignore

* test: add test for pool certificate related code

* Simplify Certificate deserialization

* Fix failing test cases for python<3.10

Syntax "Optional[type1 | type2]" is not supported in version <= 3.9

* Simplify relay parsing

* Remove unused import

---------

Co-authored-by: Hareem Adderley <[email protected]>
Co-authored-by: Niels Mündler <[email protected]>
Co-authored-by: Jerry <[email protected]>
* Allow subtracting assets if not existing before

Negative values were allowed before as well so it is only consequential
to allow subtracting from 0

* Fix testcases
* Raise an error when trying to supply a datum when inline datums are
present

* Add a test to check the inline datum issue

* Allow datum when datum hash was attached to the target utxo

* Fix linter

* Always keep datum_hash in TransactionOutput if the datum isn't inline

---------

Co-authored-by: Jerry <[email protected]>
* Test for correctness of the supplied script

This is to avoid users accidentally adding script inputs with the wrong
script and then get cryptic errors from ogmios.

* Fix qa and add test cases for missing/incorrect scripts

* Add test case for entirely missing script

* Remove redundant check

* Improve error message
* Add transaction builder example with metadata

* Add transaction builder example with metadata

* Add CIP-20 metadata example

* Reformat file
* Fix coinselection

* Fix skipping coin if coin is 0
tacmota and others added 28 commits December 9, 2024 16:06
* generalize plutus scripts

Refactor plutus scripts to reduce amount of works of adding new plutus versions.

* Upload without token if created from a fork

* further improvements

---------

Co-authored-by: Jerry <[email protected]>
* Add unit tests to transaction.py

* fix qa

* remove redundant lines
* Bump up node version and simplify scripts

* remove lines
* add more tests for serialization

* minor fix

* fix failed test cases in python 3.10

* Remove impossible test cases

---------

Co-authored-by: Jerry <[email protected]>
* Skip collateral return if it is too small

* Minor fix
* add more examples scripts

* exclude tempfiles

* delete tempfiles

* remove external file and generate local pdf

* Fix format

---------

Co-authored-by: Michiel <michiel.bellengmail.com>
Co-authored-by: Jerry <[email protected]>
* Add OrderedSet as a serialization type

* Minor fixes

* All tests passing

* Fix qa

* Fix failed tests in ^3.11
* add certificates

* Add Drep cert

* small test bugs fixed

---------

Co-authored-by: Jerry <[email protected]>
* Add account reward summary

* Fix certificates

* Increase epoch length

* cert test bugs fix

---------

Co-authored-by: tacmota <[email protected]>
* Add governance related classes

Also simplified some existing certificate classes by introducing a new base class CodedSerializable.

* Docstring fields

* Format fix

* Update docs

* Refactor and tests

* More goverance related classes

* Remove empty file

* Fix delegation test
* Update blockfrost.py

cast script_type to int for the method PlutusScript.from_version

* Update blockfrost.py

capitalisation mistake startswith in _gets_script

* Fix format

---------

Co-authored-by: Jerry <[email protected]>
* fix: use OrderedSet or List for pool_owners

* Fix format

---------

Co-authored-by: Hareem Adderley <[email protected]>
Co-authored-by: Jerry <[email protected]>
…on-Cardano#431)

* Added IndefiniteDecoder for round trip plutusdata serialization

* Fixed qa issues

* Force non-binary installation of cbor2

* Ensure pure cbor2 in CI

* Added IndefiniteList to ArrayCBORSerializable primitives

* Pass QA checks

---------

Co-authored-by: Jerry <[email protected]>
Since plutus v3, sorting cost models based on the lexicographical of keys would result in wrong script data hash. We can assume the cost model from the chain context could be directly used without any sorting.
@theeldermillenial theeldermillenial merged commit 092b5f6 into theeldermillenial:feat/cip67-cip68 Apr 15, 2025
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.