Skip to main content

PublicContext

Fields

FieldType
inputsPublicContextInputs

Methods

new

PublicContext::new(inputs);

Parameters

NameType
inputsPublicContextInputs

emit_unencrypted_log

PublicContext::emit_unencrypted_log(_self, log);

Parameters

NameType
_self&mut Self
logT

note_hash_exists

PublicContext::note_hash_exists(_self, note_hash, leaf_index);

Parameters

NameType
_selfSelf
note_hashField
leaf_indexField

l1_to_l2_msg_exists

PublicContext::l1_to_l2_msg_exists(_self, msg_hash, msg_leaf_index);

Parameters

NameType
_selfSelf
msg_hashField
msg_leaf_indexField

nullifier_exists

PublicContext::nullifier_exists(_self, unsiloed_nullifier, address);

Parameters

NameType
_selfSelf
unsiloed_nullifierField
addressAztecAddress

consume_l1_to_l2_message

PublicContext::consume_l1_to_l2_message(&mut self, content, secret, sender, leaf_index);

Parameters

NameType
&mut self
contentField
secretField
senderEthAddress
leaf_indexField

message_portal

PublicContext::message_portal(_self, recipient, content);

Parameters

NameType
_self&mut Self
recipientEthAddress
contentField

call_public_function

PublicContext::call_public_function(_self, contract_address, function_selector, args, gas_opts);

Parameters

NameType
_self&mut Self
contract_addressAztecAddress
function_selectorFunctionSelector
args[Field]
gas_optsGasOpts

static_call_public_function

PublicContext::static_call_public_function(_self, contract_address, function_selector, args, gas_opts);

Parameters

NameType
_self&mut Self
contract_addressAztecAddress
function_selectorFunctionSelector
args[Field]
gas_optsGasOpts

delegate_call_public_function

PublicContext::delegate_call_public_function(_self, _contract_address, _function_selector, _args);

Parameters

NameType
_self&mut Self
_contract_addressAztecAddress
_function_selectorFunctionSelector
_args[Field]

push_note_hash

PublicContext::push_note_hash(_self, note_hash);

Parameters

NameType
_self&mut Self
note_hashField

push_nullifier

PublicContext::push_nullifier(_self, nullifier, _nullified_commitment);

Parameters

NameType
_self&mut Self
nullifierField
_nullified_commitmentField

this_address

PublicContext::this_address(_self);

Parameters

NameType
_selfSelf

storage_address

PublicContext::storage_address(_self);

Parameters

NameType
_selfSelf

msg_sender

PublicContext::msg_sender(_self);

Parameters

NameType
_selfSelf

selector

PublicContext::selector(_self);

Parameters

NameType
_selfSelf

get_args_hash

PublicContext::get_args_hash(self);

Parameters

NameType
self

transaction_fee

PublicContext::transaction_fee(_self);

Parameters

NameType
_selfSelf

chain_id

PublicContext::chain_id(_self);

Parameters

NameType
_selfSelf

version

PublicContext::version(_self);

Parameters

NameType
_selfSelf

block_number

PublicContext::block_number(_self);

Parameters

NameType
_selfSelf

timestamp

PublicContext::timestamp(_self);

Parameters

NameType
_selfSelf

fee_per_l2_gas

PublicContext::fee_per_l2_gas(_self);

Parameters

NameType
_selfSelf

fee_per_da_gas

PublicContext::fee_per_da_gas(_self);

Parameters

NameType
_selfSelf

l2_gas_left

PublicContext::l2_gas_left(_self);

Parameters

NameType
_selfSelf

da_gas_left

PublicContext::da_gas_left(_self);

Parameters

NameType
_selfSelf

raw_storage_read

PublicContext::raw_storage_read(_self, storage_slot);

Parameters

NameType
_selfSelf
storage_slotField

storage_read

PublicContext::storage_read(self, storage_slot);

Parameters

NameType
self
storage_slotField

raw_storage_write

PublicContext::raw_storage_write(_self, storage_slot, values);

Parameters

NameType
_selfSelf
storage_slotField
values[Field; N]

storage_write

PublicContext::storage_write(self, storage_slot, value);

Parameters

NameType
self
storage_slotField
valueT

Standalone Functions

gas_for_call

gas_for_call(user_gas);

Helper functions

Parameters

NameType
user_gasGasOpts

address

address();

Takes no parameters.

sender

sender();

Takes no parameters.

portal

portal();

Takes no parameters.

function_selector

function_selector();

Takes no parameters.

emit_note_hash

emit_note_hash(note_hash);

Parameters

NameType
note_hashField

emit_nullifier

emit_nullifier(nullifier);

Parameters

NameType
nullifierField

send_l2_to_l1_msg

send_l2_to_l1_msg(recipient, content);

Parameters

NameType
recipientEthAddress
contentField

call

call(gas, address, args, function_selector);

Parameters

NameType
gas[Field; 2]
addressAztecAddress
args[Field]
function_selectorField

call_static

call_static(gas, address, args, function_selector);

Parameters

NameType
gas[Field; 2]
addressAztecAddress
args[Field]
function_selectorField

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.

function_selector_opcode

function_selector_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.

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.

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

NameType
note_hashField
leaf_indexField

emit_note_hash_opcode

emit_note_hash_opcode(note_hash);

Parameters

NameType
note_hashField

nullifier_exists_opcode

nullifier_exists_opcode(nullifier, address);

Parameters

NameType
nullifierField
addressField

emit_nullifier_opcode

emit_nullifier_opcode(nullifier);

Parameters

NameType
nullifierField

emit_unencrypted_log_opcode

emit_unencrypted_log_opcode(message);

Parameters

NameType
message[Field]

l1_to_l2_msg_exists_opcode

l1_to_l2_msg_exists_opcode(msg_hash, msg_leaf_index);

Parameters

NameType
msg_hashField
msg_leaf_indexField

send_l2_to_l1_msg_opcode

send_l2_to_l1_msg_opcode(recipient, content);

Parameters

NameType
recipientEthAddress
contentField

call_opcode

call_opcode(gas, // gas allocation, da_gas]
address, args, // TODO(5110);

Parameters

NameType
gas[Field; 2]
// gas allocation[l2_gas
da_gas]
addressAztecAddress
args[Field]
// TODO(5110

call_static_opcode

call_static_opcode(gas, // gas allocation, da_gas]
address, args, // TODO(5110);

Parameters

NameType
gas[Field; 2]
// gas allocation[l2_gas
da_gas]
addressAztecAddress
args[Field]
// TODO(5110

storage_read_opcode

storage_read_opcode(storage_slot, length);

Parameters

NameType
storage_slotField
lengthField

storage_write_opcode

storage_write_opcode(storage_slot, values);

Parameters

NameType
storage_slotField
values[Field; N]

assert_empty

assert_empty(returns);

Parameters

NameType
returnsFunctionReturns<0>

raw

raw(self);

Parameters

NameType
self

deserialize_into

deserialize_into(self);

Parameters

NameType
self