Docs: Move poseidon
outside of create
(#510)
This commit is contained in:
parent
46a307432f
commit
16308a7840
@ -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
|
in the `init` call of the new contract. It will be included in
|
||||||
`Contract.balance`, however.
|
`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.
|
The type `'c` must be instantiated with a contract.
|
||||||
|
|
||||||
|
|
||||||
@ -748,6 +740,15 @@ Chain.network\_id : string
|
|||||||
The network id of the chain.
|
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
|
##### spend
|
||||||
```
|
```
|
||||||
Chain.spend(to : address, amount : int) : unit
|
Chain.spend(to : address, amount : int) : unit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user