Skip to content

Commit

Permalink
nuking redundant implementation of PublicGlobalVariables
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Feb 7, 2024
1 parent 511c18e commit cbe83c8
Showing 1 changed file with 2 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,31 +1,2 @@
use dep::protocol_types::{
address::{
AztecAddress,
EthAddress,
},
traits::Serialize,
};

// docs:start:public-global-variables
struct PublicGlobalVariables {
chain_id: Field,
version: Field,
block_number: Field,
timestamp: Field,
coinbase: EthAddress,
fee_recipient: AztecAddress,
}
// docs:end:public-global-variables

impl Serialize<6> for PublicGlobalVariables {
fn serialize(self) -> [Field; 6] {
[
self.chain_id,
self.version,
self.block_number,
self.timestamp,
self.coinbase.to_field(),
self.fee_recipient.to_field(),
]
}
}
// protocl global vars are equal to the private ones so we just re-export them here under a different name
use dep::protocol_types::abis::global_variables::GlobalVariables as PublicGlobalVariables;

0 comments on commit cbe83c8

Please sign in to comment.