[Ceres]: Add bitwise ops, Address.to_bytes and Crypto.poseidon

This commit is contained in:
Hans Svensson
2021-10-29 13:34:40 +02:00
committed by Hans Svensson
parent 5c3b42aff1
commit f60f9122ba
16 changed files with 128 additions and 236 deletions
+14
View File
@@ -0,0 +1,14 @@
contract C =
entrypoint test() =
let a : int = 23
let b : int = 52
let c = a bor b
let d = c bxor b
let e = d band b
let f = bnot a
let g = f << 2
let h = g >> 2
let i = Int.mulmod(a, b, h)
let j = Crypto.poseidon(i, a)
let k : bytes(32) = Address.to_bytes(Call.origin)
(a bor b band c bxor a << bnot b >> a, k)