nop
Add a nop test operation call to this transaction builder.
The zero-argument rell.test.tx.nop()
is effectively an alias of rell.test.tx.nop(x: integer)
where a unique integer argument x
is passed each time, serving the purpose of distinguishing transactions that are identical except for the presence of a nop
call.
Example:
Illegal
rell.test.tx().op(my_op).run();
rell.test.tx().op(my_op).run(); // Not allowed; all transactions must be unique!
Legal
// Ok, the transactions are distinct since each nop automatically uses a different nonce.
rell.test.tx().op(my_op).nop().run();
rell.test.tx().op(my_op).nop().run();
Since
0.10.4
See also
Add a nop test operation call to this transaction builder.
Serves the purpose of distinguishing transactions that are identical except for the presence of a nop
call.
my_tx_builder.nop(x)
is equivalent to my_tx_builder.op(rell.test.nop(x))
, where rell.test.nop(x)
is equivalent to rell.test.op('nop', x.to_gtv())
, which is a test operation call to the predefined operation:
operation nop(v: gtv) {}
Example:
Illegal
rell.test.tx().op(my_op).nop(0).run();
rell.test.tx().op(my_op).nop(0).run(); // Not allowed; all transactions must be unique!
Legal
rell.test.tx().op(my_op).nop(0).run();
rell.test.tx().op(my_op).nop(1).run(); // Ok, since the transactions are distinct.
Since
0.10.4
Parameters
the nonce
See also
Add a nop test operation call to this transaction builder.
Serves the purpose of distinguishing transactions that are identical except for the presence of a nop
call.
my_tx_builder.nop(x)
is equivalent to my_tx_builder.op(rell.test.nop(x))
, where rell.test.nop(x)
is equivalent to rell.test.op('nop', x.to_gtv())
, which is a test operation call to the predefined operation:
operation nop(v: gtv) {}
Example:
Illegal
rell.test.tx().op(my_op).nop("a").run();
rell.test.tx().op(my_op).nop("a").run(); // Not allowed; all transactions must be unique!
Legal
rell.test.tx().op(my_op).nop("a").run();
rell.test.tx().op(my_op).nop("z").run(); // Ok, since the transactions are distinct.
Since
0.10.4
Parameters
the nonce
See also
Add a nop test operation call to this transaction builder.
Serves the purpose of distinguishing transactions that are identical except for the presence of a nop
call.
my_tx_builder.nop(x)
is equivalent to my_tx_builder.op(rell.test.nop(x))
, where rell.test.nop(x)
is equivalent to rell.test.op('nop', x.to_gtv())
, which is a test operation call to the predefined operation:
operation nop(v: gtv) {}
Example:
Illegal
rell.test.tx().op(my_op).nop(x'00').run();
rell.test.tx().op(my_op).nop(x'00').run(); // Not allowed; all transactions must be unique!
Legal
rell.test.tx().op(my_op).nop(x'00').run();
rell.test.tx().op(my_op).nop(x'01').run(); // Ok, since the transactions are distinct.
Since
0.10.4
Parameters
the nonce