@@ -538,38 +538,38 @@ fn handle_foreign_call(
538538 inputs : & [ ValueOrArray ] ,
539539) {
540540 match function {
541- "avmOpcodeCall " => handle_external_call ( avm_instrs, destinations, inputs, AvmOpcode :: CALL ) ,
542- "avmOpcodeStaticCall " => {
541+ "aztec_avm_call " => handle_external_call ( avm_instrs, destinations, inputs, AvmOpcode :: CALL ) ,
542+ "aztec_avm_staticCall " => {
543543 handle_external_call ( avm_instrs, destinations, inputs, AvmOpcode :: STATICCALL ) ;
544544 }
545- "avmOpcodeEmitPublicLog " => {
545+ "aztec_avm_emitPublicLog " => {
546546 handle_emit_public_log ( avm_instrs, destinations, inputs) ;
547547 }
548- "avmOpcodeNoteHashExists " => handle_note_hash_exists ( avm_instrs, destinations, inputs) ,
549- "avmOpcodeEmitNoteHash " | "avmOpcodeEmitNullifier " => handle_emit_note_hash_or_nullifier (
550- function == "avmOpcodeEmitNullifier " ,
548+ "aztec_avm_noteHashExists " => handle_note_hash_exists ( avm_instrs, destinations, inputs) ,
549+ "aztec_avm_emitNoteHash " | "aztec_avm_emitNullifier " => handle_emit_note_hash_or_nullifier (
550+ function == "aztec_avm_emitNullifier " ,
551551 avm_instrs,
552552 destinations,
553553 inputs,
554554 ) ,
555- "avmOpcodeNullifierExists " => handle_nullifier_exists ( avm_instrs, destinations, inputs) ,
556- "avmOpcodeL1ToL2MsgExists " => handle_l1_to_l2_msg_exists ( avm_instrs, destinations, inputs) ,
557- "avmOpcodeSendL2ToL1Msg " => handle_send_l2_to_l1_msg ( avm_instrs, destinations, inputs) ,
558- "avmOpcodeCalldataCopy " => handle_calldata_copy ( avm_instrs, destinations, inputs) ,
559- "avmOpcodeSuccessCopy " => handle_success_copy ( avm_instrs, destinations, inputs) ,
560- "avmOpcodeReturndataSize " => handle_returndata_size ( avm_instrs, destinations, inputs) ,
561- "avmOpcodeReturndataCopy " => handle_returndata_copy ( avm_instrs, destinations, inputs) ,
562- "avmOpcodeReturn " => handle_return ( avm_instrs, destinations, inputs) ,
563- "avmOpcodeRevert " => handle_revert ( avm_instrs, destinations, inputs) ,
564- "avmOpcodeStorageRead " => handle_storage_read ( avm_instrs, destinations, inputs) ,
565- "avmOpcodeStorageWrite " => handle_storage_write ( avm_instrs, destinations, inputs) ,
566- "utilityLog " => handle_debug_log ( avm_instrs, destinations, inputs) ,
555+ "aztec_avm_nullifierExists " => handle_nullifier_exists ( avm_instrs, destinations, inputs) ,
556+ "aztec_avm_l1ToL2MsgExists " => handle_l1_to_l2_msg_exists ( avm_instrs, destinations, inputs) ,
557+ "aztec_avm_sendL2ToL1Msg " => handle_send_l2_to_l1_msg ( avm_instrs, destinations, inputs) ,
558+ "aztec_avm_calldataCopy " => handle_calldata_copy ( avm_instrs, destinations, inputs) ,
559+ "aztec_avm_successCopy " => handle_success_copy ( avm_instrs, destinations, inputs) ,
560+ "aztec_avm_returndataSize " => handle_returndata_size ( avm_instrs, destinations, inputs) ,
561+ "aztec_avm_returndataCopy " => handle_returndata_copy ( avm_instrs, destinations, inputs) ,
562+ "aztec_avm_return " => handle_return ( avm_instrs, destinations, inputs) ,
563+ "aztec_avm_revert " => handle_revert ( avm_instrs, destinations, inputs) ,
564+ "aztec_avm_storageRead " => handle_storage_read ( avm_instrs, destinations, inputs) ,
565+ "aztec_avm_storageWrite " => handle_storage_write ( avm_instrs, destinations, inputs) ,
566+ "aztec_utl_log " => handle_debug_log ( avm_instrs, destinations, inputs) ,
567567 // Getters.
568568 _ if inputs. is_empty ( ) && destinations. len ( ) == 1 => {
569569 handle_getter_instruction ( avm_instrs, function, destinations, inputs) ;
570570 }
571571 // Get contract instance variations.
572- _ if function. starts_with ( "avmOpcodeGetContractInstance " ) => {
572+ _ if function. starts_with ( "aztec_avm_getContractInstance " ) => {
573573 handle_get_contract_instance ( avm_instrs, function, destinations, inputs) ;
574574 }
575575 // Anything else.
@@ -580,7 +580,7 @@ fn handle_foreign_call(
580580/// Handle an AVM CALL
581581/// (an external 'call' brillig foreign call was encountered)
582582/// Adds the new instruction to the avm instructions list.
583- // #[oracle(avmOpcodeCall )]
583+ // #[oracle(aztec_avm_call )]
584584// unconstrained fn call_opcode<let N: u32>(
585585// l2_gas_allocation: u32,
586586// da_gas_allocation: u32,
@@ -947,18 +947,18 @@ fn handle_getter_instruction(
947947 } ;
948948
949949 let var_idx = match function {
950- "avmOpcodeAddress " => EnvironmentVariable :: ADDRESS ,
951- "avmOpcodeSender " => EnvironmentVariable :: SENDER ,
952- "avmOpcodeMinFeePerL2Gas " => EnvironmentVariable :: MINFEEPERL2GAS ,
953- "avmOpcodeMinFeePerDaGas " => EnvironmentVariable :: MINFEEPERDAGAS ,
954- "avmOpcodeTransactionFee " => EnvironmentVariable :: TRANSACTIONFEE ,
955- "avmOpcodeChainId " => EnvironmentVariable :: CHAINID ,
956- "avmOpcodeVersion " => EnvironmentVariable :: VERSION ,
957- "avmOpcodeBlockNumber " => EnvironmentVariable :: BLOCKNUMBER ,
958- "avmOpcodeTimestamp " => EnvironmentVariable :: TIMESTAMP ,
959- "avmOpcodeL2GasLeft " => EnvironmentVariable :: L2GASLEFT ,
960- "avmOpcodeDaGasLeft " => EnvironmentVariable :: DAGASLEFT ,
961- "avmOpcodeIsStaticCall " => EnvironmentVariable :: ISSTATICCALL ,
950+ "aztec_avm_address " => EnvironmentVariable :: ADDRESS ,
951+ "aztec_avm_sender " => EnvironmentVariable :: SENDER ,
952+ "aztec_avm_minFeePerL2Gas " => EnvironmentVariable :: MINFEEPERL2GAS ,
953+ "aztec_avm_minFeePerDaGas " => EnvironmentVariable :: MINFEEPERDAGAS ,
954+ "aztec_avm_transactionFee " => EnvironmentVariable :: TRANSACTIONFEE ,
955+ "aztec_avm_chainId " => EnvironmentVariable :: CHAINID ,
956+ "aztec_avm_version " => EnvironmentVariable :: VERSION ,
957+ "aztec_avm_blockNumber " => EnvironmentVariable :: BLOCKNUMBER ,
958+ "aztec_avm_timestamp " => EnvironmentVariable :: TIMESTAMP ,
959+ "aztec_avm_l2GasLeft " => EnvironmentVariable :: L2GASLEFT ,
960+ "aztec_avm_daGasLeft " => EnvironmentVariable :: DAGASLEFT ,
961+ "aztec_avm_isStaticCall " => EnvironmentVariable :: ISSTATICCALL ,
962962 _ => panic ! ( "Transpiler doesn't know how to process getter {:?}" , function) ,
963963 } ;
964964
@@ -1348,7 +1348,7 @@ fn handle_debug_log(
13481348) {
13491349 // We need to handle two flavors here:
13501350 //
1351- // #[oracle(utilityLog )]
1351+ // #[oracle(aztec_utl_log )]
13521352 // unconstrained fn log_oracle<let M: u32, let N: u32>(
13531353 // log_level: u8,
13541354 // msg: str<M>,
@@ -1358,7 +1358,7 @@ fn handle_debug_log(
13581358 //
13591359 // and
13601360 //
1361- //#[oracle(utilityLog )]
1361+ //#[oracle(aztec_utl_log )]
13621362 // unconstrained fn log_slice_oracle<let M: u32>(log_level: u8, msg: str<M>, args: [Field]) {}
13631363 //
13641364 // Luckily, these two flavors have both 4 arguments, since noir inserts a length field for slices before the slice.
@@ -1420,7 +1420,7 @@ fn handle_debug_log(
14201420 } ) ;
14211421}
14221422
1423- // #[oracle(avmOpcodeCalldataCopy )]
1423+ // #[oracle(aztec_avm_calldataCopy )]
14241424// unconstrained fn calldata_copy_opcode<let N: u32>(cdoffset: Field) -> [Field; N] {}
14251425fn handle_calldata_copy (
14261426 avm_instrs : & mut Vec < AvmInstruction > ,
@@ -1463,7 +1463,7 @@ fn handle_calldata_copy(
14631463 } ) ;
14641464}
14651465
1466- // #[oracle(avmOpcodeReturndataSize )]
1466+ // #[oracle(aztec_avm_returndataSize )]
14671467// unconstrained fn returndata_size_opcode() -> u32 {}
14681468fn handle_returndata_size (
14691469 avm_instrs : & mut Vec < AvmInstruction > ,
@@ -1488,7 +1488,7 @@ fn handle_returndata_size(
14881488 } ) ;
14891489}
14901490
1491- // #[oracle(avmOpcodeReturndataCopy )]
1491+ // #[oracle(aztec_avm_returndataCopy )]
14921492// unconstrained fn returndata_copy_opcode(rdoffset: u32, copy_size: u32) -> [Field] {}
14931493fn handle_returndata_copy (
14941494 avm_instrs : & mut Vec < AvmInstruction > ,
@@ -1546,7 +1546,7 @@ fn handle_returndata_copy(
15461546 ] ) ;
15471547}
15481548
1549- // #[oracle(avmOpcodeReturn )]
1549+ // #[oracle(aztec_avm_return )]
15501550// unconstrained fn return_opcode<let N: u32>(returndata: [Field; N]) {}
15511551fn handle_return (
15521552 avm_instrs : & mut Vec < AvmInstruction > ,
@@ -1565,7 +1565,7 @@ fn handle_return(
15651565 generate_return_instruction ( avm_instrs, & return_data_offset, & return_data_size) ;
15661566}
15671567
1568- // #[oracle(avmOpcodeRevert )]
1568+ // #[oracle(aztec_avm_revert )]
15691569// unconstrained fn revert_opcode(revertdata: [Field]) {}
15701570fn handle_revert (
15711571 avm_instrs : & mut Vec < AvmInstruction > ,
@@ -1640,9 +1640,9 @@ fn handle_get_contract_instance(
16401640 assert_eq ! ( destinations. len( ) , 1 ) ;
16411641
16421642 let member_idx = match function {
1643- "avmOpcodeGetContractInstanceDeployer " => ContractInstanceMember :: DEPLOYER ,
1644- "avmOpcodeGetContractInstanceClassId " => ContractInstanceMember :: CLASS_ID ,
1645- "avmOpcodeGetContractInstanceInitializationHash " => ContractInstanceMember :: INIT_HASH ,
1643+ "aztec_avm_getContractInstanceDeployer " => ContractInstanceMember :: DEPLOYER ,
1644+ "aztec_avm_getContractInstanceClassId " => ContractInstanceMember :: CLASS_ID ,
1645+ "aztec_avm_getContractInstanceInitializationHash " => ContractInstanceMember :: INIT_HASH ,
16461646 _ => panic ! ( "Transpiler doesn't know how to process function {:?}" , function) ,
16471647 } ;
16481648
@@ -1767,7 +1767,7 @@ fn tag_from_bit_size(bit_size: BitSize) -> AvmTypeTag {
17671767 }
17681768}
17691769
1770- /// #[oracle(avmOpcodeSuccessCopy )]
1770+ /// #[oracle(aztec_avm_successCopy )]
17711771/// unconstrained fn success_copy_opcode() -> bool {}
17721772fn handle_success_copy (
17731773 avm_instrs : & mut Vec < AvmInstruction > ,
0 commit comments