1- pub use common:: {Erc20Note , Erc20NoteConsumptionInputs };
1+ pub use common::erc20_note:: {Erc20Note , Erc20NoteConsumptionInputs };
22
33pub mod Token {
44 pub fn mint (
@@ -7,17 +7,17 @@ pub mod Token {
77 amount : common::TokenAmount ,
88 randomness : Field ,
99 ) {
10- common ::Erc20Note { owner : to , amount , randomness }.emit (context );
10+ crate ::Erc20Note { owner : to , amount , randomness }.emit (context );
1111 }
1212
1313 pub fn burn (
1414 context : &mut common::Context ,
1515 from_secret_key : Field ,
16- from_note_inputs : common ::Erc20NoteConsumptionInputs ,
16+ from_note_inputs : crate ::Erc20NoteConsumptionInputs ,
1717 amount : common::TokenAmount ,
1818 change_randomness : Field ,
1919 ) {
20- common ::Erc20Note ::sub_and_emit_change (
20+ crate ::Erc20Note ::sub_and_emit_change (
2121 context ,
2222 [from_note_inputs ],
2323 amount ,
@@ -29,7 +29,7 @@ pub mod Token {
2929 pub fn join <let N : u32 >(
3030 context : &mut common::Context ,
3131 from_secret_key : Field ,
32- notes : [common ::Erc20NoteConsumptionInputs ; N ],
32+ notes : [crate ::Erc20NoteConsumptionInputs ; N ],
3333 to : common::WaAddress ,
3434 join_randomness : Field ,
3535 ) {
@@ -42,27 +42,27 @@ pub mod Token {
4242 joined_amount += notes [i ].note .amount ;
4343 }
4444
45- common ::Erc20Note { owner : to , amount : joined_amount , randomness : join_randomness }.emit (
45+ crate ::Erc20Note { owner : to , amount : joined_amount , randomness : join_randomness }.emit (
4646 context ,
4747 );
4848 }
4949
5050 pub fn transfer (
5151 context : &mut common::Context ,
5252 from_secret_key : Field ,
53- from_note_inputs : common ::Erc20NoteConsumptionInputs ,
53+ from_note_inputs : crate ::Erc20NoteConsumptionInputs ,
5454 to : common::WaAddress ,
5555 amount : common::TokenAmount ,
5656 to_randomness : Field ,
5757 change_randomness : Field ,
5858 ) {
59- common ::Erc20Note ::sub_and_emit_change (
59+ crate ::Erc20Note ::sub_and_emit_change (
6060 context ,
6161 [from_note_inputs ],
6262 amount ,
6363 change_randomness ,
6464 from_secret_key ,
6565 );
66- common ::Erc20Note { owner : to , amount , randomness : to_randomness }.emit (context );
66+ crate ::Erc20Note { owner : to , amount , randomness : to_randomness }.emit (context );
6767 }
6868}
0 commit comments