Skip to main content

Build and run a block

Here's a simple example of building and running a test block:

operation foo(x: integer) { ... }
operation bar(s: text) { ... }


val tx1 = rell.test.tx()
.op(foo(123)) // operation call returns rell.test.op
.op(bar('ABC')) // now the transaction has two operations
.sign(rell.test.keypairs.bob) // signing with the "Bob" test keypair

val tx2 = rell.test.tx()
.sign(rell.test.keypairs.alice) // tx2 is signed with both "Bob" and "Alice" keypairs

.run() // execute the block consisting of two transactions: tx1 and tx2