Skip to content

Commit

Permalink
Bummp to version 0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptoPascal31 committed Nov 20, 2022
1 parent 88daa57 commit 74ee460
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Introduction
This library aims to provide some "high level" functions for writing Pact smart contracts.

The library contains currently more than 70 convenience functions split into 4 modules
The library contains currently more than 80 convenience functions split into 4 modules

## Documentation
[Read the docs](https://pact-util-lib.readthedocs.io/)
Expand Down
28 changes: 26 additions & 2 deletions docs/source/deployed.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
Deployed contracts
==================


Version 0.3
~~~~~~~~~~~

**Added more documentation.**

Added functions:
* ``util-math.lcm``
* ``util-math.gcd``
* ``util-strings.slice``
* ``util-random.shuffle``
* ``util-random.random-choice``
* ``util-strings.contains-chars``

Deployed on:
* Testnet Chains 0-19
* Mainnet Chains 0-19

Modules hashes:
* **free.util-lists:** wm7RwXGdL1urmwU7is9wjbrw_bkW39wV_BuIng_ri14
* **free.util-strings:** w3lESU0hy0tTA-68-eqnSgOf2CNw5nPlgvFtOd6d24w
* **free.util-math:** KTVZOavXdQImWgjO0m1g0Knng94-u3V9mwYe3eNSQZM
* **free.util-random:** d8bf266kYzTY5j96M1p6PHchar38vmQU7nBDICZDBQk

Version 0.2
~~~~~~~~~~~

Expand All @@ -25,7 +49,7 @@ Deployed on:
* Testnet Chains 0-19
* Mainnet Chains 0-19

Modules hashs:
Modules hashes:
* **free.util-lists:** 8nAzIk5zp5BpaKzU_s7s9PHShJ_Py8WBA3ZQ9-waEr4
* **free.util-strings:** uzdfpvaEJDRfZc2SIYkjF331SaKE81CCK701q1RzkAQ
* **free.util-math:** 2LREGZ9Yj_rOMlphLVa0OSK_m7NBqpuoUjIbfj2z7_U
Expand All @@ -40,7 +64,7 @@ Deployed on:
* Testnet Chains 0-19
* Mainnet Chains 0-19

Modules hashs:
Modules hashes:
* **free.util-lists:** 5TByiF6OZmPLlDpiF_6h6qPf5Nr9p4dI15mKdWbpAEA
* **free.util-strings:** aOi0JgN3s59XJHYF3uofVF269nbVxVtesYZIJT-TJa4
* **free.util-math:** 8lc-vIcIuEaquiirHGc8gqg8q_u3OhhJ0HyhW_3QYTE
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Pact Utilities library documentation

This library aims to provide some "high level" functions for writing Pact smart contracts.

The library contains currently more than 70 convenience functions split into 4 modules.
The library contains currently more than 80 convenience functions split into 4 modules.

After using and experimenting Pact since several months, I found out that:
* Some functions were missing: (eg ``(str-to-decimal)``, ...)
Expand Down
2 changes: 1 addition & 1 deletion pact/contracts/util-lists.pact
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
\ Documentation: https://pact-util-lib.readthedocs.io \
\ Github: https://github.com/CryptoPascal31/pact-util-lib "

(defconst VERSION:string "0.2")
(defconst VERSION:string "0.3")

(defcap GOV()
(enforce-keyset "free.util-lib"))
Expand Down
6 changes: 3 additions & 3 deletions pact/contracts/util-math.pact
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
\ Documentation: https://pact-util-lib.readthedocs.io \
\ Github: https://github.com/CryptoPascal31/pact-util-lib "

(defconst VERSION:string "0.2")
(defconst VERSION:string "0.3")

(defcap GOV()
(enforce-keyset "free.util-lib"))
Expand Down Expand Up @@ -160,7 +160,7 @@

(defun gcd:integer (a:integer b:integer)
"Returns the greatest common divisor of 2 integers"
; We use the eculidean iterative algortihm (optimized by modulo)
; We use the euclidean iterative algorithm (optimized by modulo)
; According to several sources and my own tests, the maximum complexity of the euclidean algorithm is
; log/Phy ( min(a,b)). For safety, at then end, we check (enforce) at that the algorithm has ended (ie b=0)/
; But that enforcement should never fail.
Expand All @@ -181,7 +181,7 @@
)

(defun lcm:integer (a:integer b:integer)
"Returns the least commoon multiple of 2 integers"
"Returns the least common multiple of 2 integers"
(enforce (and (!= a 0) (!= b 0)) "Arguments can't be 0")
(/ (abs (* a b)) (gcd a b))
)
Expand Down
2 changes: 1 addition & 1 deletion pact/contracts/util-random.pact
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"This module provides pseudo-random numbers/string generation \
\ Documentation: https://pact-util-lib.readthedocs.io \
\ Github: https://github.com/CryptoPascal31/pact-util-lib "
(defconst VERSION:string "0.2")
(defconst VERSION:string "0.3")

(bless "RBfxKPExaz5q6i64FLA_k7UVM9MaOO0UDJulfPFZBRA")

Expand Down
2 changes: 1 addition & 1 deletion pact/contracts/util-strings.pact
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
\ Documentation: https://pact-util-lib.readthedocs.io \
\ Github: https://github.com/CryptoPascal31/pact-util-lib "

(defconst VERSION:string "0.2")
(defconst VERSION:string "0.3")
(defcap GOV()
(enforce-keyset "free.util-lib"))

Expand Down

0 comments on commit 74ee460

Please sign in to comment.