Skip to content

@receipts:tx.from

Sender of a transaction, addressed by hash.

On-chain (@receipts:tx.from!): Reads the origin of the transaction being written (the ORIGIN opcode), and takes no arguments.

⚗️ Experimental — available at next.evmcrispr.com.

Returns: address

@receipts:tx.from(hash chain?)
NameTypeDescription
hashbytes32Transaction hash
[chain]chainChain to look on (default: current chain)
# Read the sender of a transaction
set $sender @receipts:tx.from(0x16df2e878e23ff261844fc9252f6c8bfcd4cb69f9f80895c6a2f01032b228e13)

With ! and no arguments the read happens on-chain at execution time: the origin (ORIGIN opcode) of the transaction being written, which is exactly the from field its receipt will seal. Gate a batch on who is executing it:

load receipts
assert @tx.from! == @me "someone else is executing this batch"