Docs: Move poseidon outside of create (#510)

This commit is contained in:
Denis Davidyuk 2024-08-12 11:02:56 +04:00 committed by GitHub
parent 46a307432f
commit 16308a7840
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -614,14 +614,6 @@ charging the calling contract. Note that this won't be visible in `Call.value`
in the `init` call of the new contract. It will be included in
`Contract.balance`, however.
#### poseidon
```
Crypto.poseidon(x1 : int, x2 : int) : int
```
Hash two integers (in the scalar field of BLS12-381) to another integer (in the scalar
field of BLS12-281). This is a ZK/SNARK-friendly hash function.
The type `'c` must be instantiated with a contract.
@ -748,6 +740,15 @@ Chain.network\_id : string
The network id of the chain.
#### poseidon
```
Crypto.poseidon(x1 : int, x2 : int) : int
```
Hash two integers (in the scalar field of BLS12-381) to another integer (in the scalar
field of BLS12-281). This is a ZK/SNARK-friendly hash function.
##### spend
```
Chain.spend(to : address, amount : int) : unit