Opshin

Latest version: v0.21.1

Safety actively analyzes 622918 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 5

0.21.1

<!-- Release notes generated using configuration in .github/release.yml at 0.21.1 -->

What's Changed
🐛 Bug fixes
* Fix optimization levels not being applied properly, resulting in exceedingly large contracts. 9da7eb0353b30a31816d97b9f66604787ad9a323
🏕 Features
* Add documentation on the OpShin Bug Bounty program by nielstron in https://github.com/OpShin/opshin/pull/364
* Improve logging and warnings nielstron from 340


**Full Changelog**: https://github.com/OpShin/opshin/compare/0.21.0...0.21.1

0.21.0

<!-- Release notes generated using configuration in .github/release.yml at 0.21.0 -->

What's Changed

Most notably, OpShin does now support passing in optimization settings from -O0 (no optimizations, just debugging) to -O3 (aggressive optimization, does not preserve semantics wrt. traces, i.e. removes logging and error reporting in certain places).

🐛 Bug fixes
* Fix actually invalid generated negative constr id code by nielstron in https://github.com/OpShin/opshin/pull/361

🏕 Features
* Support return statement without value by nielstron in https://github.com/OpShin/opshin/pull/339
* Improve linting output and display of warnings by nielstron in https://github.com/OpShin/opshin/pull/340
* Add a proper configuration object to OpShin by nielstron in https://github.com/OpShin/opshin/pull/341
* Add missing inequality operations by nielstron in https://github.com/OpShin/opshin/pull/357
* Use AnyList instead of FindList by nielstron in https://github.com/OpShin/opshin/pull/362


**Full Changelog**: https://github.com/OpShin/opshin/compare/0.20.0...0.21.0

0.20.0

<!-- Release notes generated using configuration in .github/release.yml at 0.20.0 -->

This is the first version compatible with pycardano 0.10.0

What's Changed
🏕 Features
* Fix compiler bug that allows compiling access to class attributes by nielstron in https://github.com/OpShin/opshin/pull/329
* Add support for pycardano 0.10.0 by nielstron in https://github.com/OpShin/opshin/pull/334
👒 Dependencies
* Bump JRubics/poetry-publish from 1.16 to 2.0 by dependabot in https://github.com/OpShin/opshin/pull/331


**Full Changelog**: https://github.com/OpShin/opshin/compare/0.19.1...0.20.0

0.19.1

<!-- Release notes generated using configuration in .github/release.yml at 0.19.1 -->

What's Changed
🏕 Features
* Feat/allow empty lists by nielstron in https://github.com/OpShin/opshin/pull/305
* Add support for dictionary comprehensions by nielstron in https://github.com/OpShin/opshin/pull/309
* Allow eq comparisons between AnyType, AnyType and RecordTypes by nielstron in https://github.com/OpShin/opshin/pull/311
* Implement list index by nielstron in https://github.com/OpShin/opshin/pull/324
* Allow empty dictionaries to be instantiated with proper type annotation by nielstron in https://github.com/OpShin/opshin/pull/323
* Make unary operations dynamic and implement more thereof by nielstron in https://github.com/OpShin/opshin/pull/325
* Fix/merging functions with type capturing by nielstron in https://github.com/OpShin/opshin/pull/328

🐛 Bug fixes
There was a bug in the type system that would match union type in function parameters in the wrong direction. I.e. if a function expects Union[A, B], the type system would accept a parameter of type Union[A, B, C] but not of type Union[A]. This has now been fixed.

Moreover there was a bug regarding the creation of functions in branches and merging their type definitions which would allow incorrectly typed bound variables inside the functions. I.e. both functions foo in an if/else branch bind the variable x also defined in the same branch. However one x is defined as A and one as B. Hence one foo function would expect A and one would expect B, whereas the type after merging was Union[A, B] and would allow assigning an incorrect value to x.

Finally a bug regarding the re-assignment of polymorphic functions was fixed. If a function decided to re-assign polymorphic functions such as print, the invocation of this function would fail during runtime.

All of the above bugs can only lead to funds being locked in Smart Contracts (due to the contract failing) and not invalid release of funds.

👒 Dependencies
* Bump pytest from 7.4.4 to 8.0.0 by dependabot in https://github.com/OpShin/opshin/pull/319
* Bump hypothesis from 6.92.2 to 6.97.4 by dependabot in https://github.com/OpShin/opshin/pull/327


**Full Changelog**: https://github.com/OpShin/opshin/compare/0.19.0...0.19.1

0.19.0

<!-- Release notes generated using configuration in .github/release.yml at 0.19.0 -->

Moving to this minor version is greatly recommended, since contract sizes and costs are likely to experience 70% decrease or more due to 297

What's Changed
🏕 Features
* Extend assert sum example and ensure determinism among union types by nielstron in https://github.com/OpShin/opshin/pull/285
* Copy in right places to avoid reference capturing by nielstron in https://github.com/OpShin/opshin/pull/293
* Make binary operations more accessible by nielstron in https://github.com/OpShin/opshin/pull/294
* Add support for builtin list slicing by nielstron in https://github.com/OpShin/opshin/pull/295
* Improve error messages for union type and make merging stronger by nielstron in https://github.com/OpShin/opshin/pull/296
* Remove the need for an explicit statemonad by nielstron in https://github.com/OpShin/opshin/pull/297
* Add proper tests for return statements by nielstron in https://github.com/OpShin/opshin/pull/302
* Use constant nth field access where possible by nielstron in https://github.com/OpShin/opshin/pull/304
* New minor version by nielstron in https://github.com/OpShin/opshin/pull/303

🐛 Bug Fixes
* Disallow retyping of variables to incompatible types by nielstron in https://github.com/OpShin/opshin/pull/298
* This patches a slip-through in the typechecker where a function could capture variables of invalid type.

💔 Breaking Changes

Retyping of variables is now allowed anymore (categorically) since 298 . Assertions on a variable type will still factually change the type but can only narrow down the type (thus compatible with the previously declared type) and are hence still allowed.

👒 Dependencies
* Bump black from 23.10.1 to 23.11.0 by dependabot in https://github.com/OpShin/opshin/pull/286


**Full Changelog**: https://github.com/OpShin/opshin/compare/0.18.1...0.19.0

0.18.1

<!-- Release notes generated using configuration in .github/release.yml at 0.18.1 -->

What's Changed
🏕 Features
* Properly enforce forbidden overwrites by nielstron in https://github.com/OpShin/opshin/pull/281
* Fix nondeterministic compilation by nielstron in https://github.com/OpShin/opshin/pull/283 (discovered by ross-spencer in https://github.com/OpShin/opshin/issues/282)


**Full Changelog**: https://github.com/OpShin/opshin/compare/0.18.0...0.18.1

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.