PublicContext
Fields
Field | Type |
---|---|
inputs | PublicContextInputs |
Methods
new
PublicContext::new(inputs);
Parameters
Name | Type |
---|---|
inputs | PublicContextInputs |
storage_address
PublicContext::storage_address(self);
Parameters
Name | Type |
---|---|
self |
fee_per_l2_gas
PublicContext::fee_per_l2_gas(self);
Parameters
Name | Type |
---|---|
self |
fee_per_da_gas
PublicContext::fee_per_da_gas(self);
Parameters
Name | Type |
---|---|
self |
emit_unencrypted_log
PublicContext::emit_unencrypted_log(&mut self, log);
Parameters
Name | Type |
---|---|
&mut self | |
log | T |
note_hash_exists
PublicContext::note_hash_exists(self, note_hash, leaf_index);
Parameters
Name | Type |
---|---|
self | |
note_hash | Field |
leaf_index | Field |
l1_to_l2_msg_exists
PublicContext::l1_to_l2_msg_exists(self, msg_hash, msg_leaf_index);
Parameters
Name | Type |
---|---|
self | |
msg_hash | Field |
msg_leaf_index | Field |
block_number
PublicContext::block_number(self);
Parameters
Name | Type |
---|---|
self |
timestamp
PublicContext::timestamp(self);
Parameters
Name | Type |
---|---|
self |
transaction_fee
PublicContext::transaction_fee(self);
Parameters
Name | Type |
---|---|
self |
nullifier_exists
PublicContext::nullifier_exists(self, unsiloed_nullifier, address);
Parameters
Name | Type |
---|---|
self | |
unsiloed_nullifier | Field |
address | AztecAddress |
consume_l1_to_l2_message
PublicContext::consume_l1_to_l2_message(&mut self, content, secret, sender, leaf_index);
Parameters
Name | Type |
---|---|
&mut self | |
content | Field |
secret | Field |
sender | EthAddress |
leaf_index | Field |
message_portal
PublicContext::message_portal(&mut self, recipient, content);
Parameters
Name | Type |
---|---|
&mut self | |
recipient | EthAddress |
content | Field |
call_public_function
PublicContext::call_public_function(self, contract_address, temporary_function_selector, args, gas_opts);
Parameters
Name | Type |
---|---|
self | &mut Self |
contract_address | AztecAddress |
temporary_function_selector | FunctionSelector |
args | [Field] |
gas_opts | GasOpts |
static_call_public_function
PublicContext::static_call_public_function(self, contract_address, temporary_function_selector, args, gas_opts);
Parameters
Name | Type |
---|---|
self | &mut Self |
contract_address | AztecAddress |
temporary_function_selector | FunctionSelector |
args | [Field] |
gas_opts | GasOpts |
delegate_call_public_function
PublicContext::delegate_call_public_function(self, contract_address, function_selector, args);
Parameters
Name | Type |
---|---|
self | &mut Self |
contract_address | AztecAddress |
function_selector | FunctionSelector |
args | [Field] |
push_new_note_hash
PublicContext::push_new_note_hash(&mut self, note_hash);
Parameters
Name | Type |
---|---|
&mut self | |
note_hash | Field |
push_new_nullifier
PublicContext::push_new_nullifier(&mut self, nullifier, _nullified_commitment);
Parameters
Name | Type |
---|---|
&mut self | |
nullifier | Field |
_nullified_commitment | Field |
msg_sender
PublicContext::msg_sender(self);
Parameters
Name | Type |
---|---|
self |
this_address
PublicContext::this_address(self);
Parameters
Name | Type |
---|---|
self |
chain_id
PublicContext::chain_id(self);
Parameters
Name | Type |
---|---|
self |
version
PublicContext::version(self);
Parameters
Name | Type |
---|---|
self |
selector
PublicContext::selector(self);
Parameters
Name | Type |
---|---|
self |
get_args_hash
PublicContext::get_args_hash(self);
Parameters
Name | Type |
---|---|
self |
l2_gas_left
PublicContext::l2_gas_left(self);
Parameters
Name | Type |
---|---|
self |
da_gas_left
PublicContext::da_gas_left(self);
Parameters
Name | Type |
---|---|
self |
Standalone Functions
gas_for_call
gas_for_call(user_gas);
Helper functions
Parameters
Name | Type |
---|---|
user_gas | GasOpts |
address
address();
Takes no parameters.
sender
sender();
Takes no parameters.
portal
portal();
Takes no parameters.
emit_note_hash
emit_note_hash(note_hash);
Parameters
Name | Type |
---|---|
note_hash | Field |
emit_nullifier
emit_nullifier(nullifier);
Parameters
Name | Type |
---|---|
nullifier | Field |
send_l2_to_l1_msg
send_l2_to_l1_msg(recipient, content);
Parameters
Name | Type |
---|---|
recipient | EthAddress |
content | Field |
call
call(gas, address, args, function_selector);
Parameters
Name | Type |
---|---|
gas | [Field; 2] |
address | AztecAddress |
args | [Field] |
function_selector | Field |
call_static
call_static(gas, address, args, function_selector);
Parameters
Name | Type |
---|---|
gas | [Field; 2] |
address | AztecAddress |
args | [Field] |
function_selector | Field |
empty
empty();
Takes no parameters.
address_opcode
address_opcode();
Takes no parameters.
storage_address_opcode
storage_address_opcode();
Takes no parameters.
sender_opcode
sender_opcode();
Takes no parameters.
portal_opcode
portal_opcode();
Takes no parameters.
fee_per_l2_gas_opcode
fee_per_l2_gas_opcode();
Takes no parameters.
fee_per_da_gas_opcode
fee_per_da_gas_opcode();
Takes no parameters.
transaction_fee_opcode
transaction_fee_opcode();
Takes no parameters.
chain_id_opcode
chain_id_opcode();
Takes no parameters.
version_opcode
version_opcode();
Takes no parameters.
block_number_opcode
block_number_opcode();
Takes no parameters.
timestamp_opcode
timestamp_opcode();
Takes no parameters.
l2_gas_left_opcode
l2_gas_left_opcode();
Takes no parameters.
da_gas_left_opcode
da_gas_left_opcode();
Takes no parameters.
note_hash_exists_opcode
note_hash_exists_opcode(note_hash, leaf_index);
Parameters
Name | Type |
---|---|
note_hash | Field |
leaf_index | Field |
emit_note_hash_opcode
emit_note_hash_opcode(note_hash);
Parameters
Name | Type |
---|---|
note_hash | Field |
nullifier_exists_opcode
nullifier_exists_opcode(nullifier, address);
Parameters
Name | Type |
---|---|
nullifier | Field |
address | Field |
emit_nullifier_opcode
emit_nullifier_opcode(nullifier);
Parameters
Name | Type |
---|---|
nullifier | Field |
emit_unencrypted_log_opcode
emit_unencrypted_log_opcode(message);
Parameters
Name | Type |
---|---|
message | [Field] |
l1_to_l2_msg_exists_opcode
l1_to_l2_msg_exists_opcode(msg_hash, msg_leaf_index);
Parameters
Name | Type |
---|---|
msg_hash | Field |
msg_leaf_index | Field |
send_l2_to_l1_msg_opcode
send_l2_to_l1_msg_opcode(recipient, content);
Parameters
Name | Type |
---|---|
recipient | EthAddress |
content | Field |
call_opcode
call_opcode(gas, // gas allocation, da_gas]
address, args, // TODO(5110);
Parameters
Name | Type |
---|---|
gas | [Field; 2] |
// gas allocation | [l2_gas |
da_gas] | |
address | AztecAddress |
args | [Field] |
// TODO(5110 |
call_static_opcode
call_static_opcode(gas, // gas allocation, da_gas]
address, args, // TODO(5110);
Parameters
Name | Type |
---|---|
gas | [Field; 2] |
// gas allocation | [l2_gas |
da_gas] | |
address | AztecAddress |
args | [Field] |
// TODO(5110 |
assert_empty
assert_empty(returns);
Parameters
Name | Type |
---|---|
returns | FunctionReturns<0> |
raw
raw(self);
Parameters
Name | Type |
---|---|
self |
deserialize_into
deserialize_into(self);
Parameters
Name | Type |
---|---|
self |