-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nuking redundant implementation of PublicGlobalVariables
- Loading branch information
Showing
1 changed file
with
2 additions
and
31 deletions.
There are no files selected for viewing
33 changes: 2 additions & 31 deletions
33
yarn-project/aztec-nr/aztec/src/context/globals/public_global_variables.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |