Skip to content

Commit

Permalink
dev: change to_bytes to try_into_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsh Bajpai authored and Harsh Bajpai committed Nov 24, 2023
1 parent a569e43 commit 0469e33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/contracts/src/eoa.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ mod ExternallyOwnedAccount {
assert(calls.len() == 1, 'calls length is not 1');

let call = calls.at(0);
let calldata = call.calldata.span().to_bytes();
let calldata = call.calldata.span().try_into_bytes();

let EthereumTransaction{nonce,
gas_price,
Expand Down
2 changes: 1 addition & 1 deletion crates/utils/src/helpers.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ impl ResultExImpl<T, E, +Drop<T>, +Drop<E>> of ResultExTrait<T, E> {

#[generate_trait]
impl Felt252SpanExImpl of Felt252SpanExTrait {
fn to_bytes(self: Span<felt252>) -> Array<u8> {
fn try_into_bytes(self: Span<felt252>) -> Array<u8> {
let mut i = 0;
let mut bytes: Array<u8> = Default::default();

Expand Down

0 comments on commit 0469e33

Please sign in to comment.