-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
313 additions
and
31 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
use aurora_workspace_types::input::SetEthConnectorInput; | ||
use aurora_workspace_types::Raw; | ||
use near_sdk::{borsh, near_bindgen}; | ||
use near_sdk::{json_types::U128, serde_json}; | ||
|
||
use crate::{MockEvmContract, MockEvmContractExt}; | ||
|
||
#[near_bindgen] | ||
impl MockEvmContract { | ||
pub fn new_eth_connector(&mut self, #[serializer(borsh)] input: SetEthConnectorInput) { | ||
self.eth_connector = Some(input); | ||
} | ||
|
||
pub fn ft_resolve_transfer(&mut self, #[serializer(borsh)] _input: Raw) -> String { | ||
serde_json::to_string(&U128::from(0)).expect("Failed to serialize message") | ||
} | ||
|
||
pub fn set_eth_connector_contract_data(&mut self, #[serializer(borsh)] _input: Raw) {} | ||
|
||
pub fn set_paused_flags(&mut self, #[serializer(borsh)] _input: Raw) {} | ||
|
||
// Callbacks: | ||
|
||
#[result_serializer(borsh)] | ||
pub fn finish_deposit(&self, #[serializer(borsh)] _input: Raw) -> u8 { | ||
0 | ||
} | ||
|
||
#[result_serializer(borsh)] | ||
pub fn factory_update_address_version(&mut self, #[serializer(borsh)] _input: Raw) -> u8 { | ||
0 | ||
} | ||
|
||
#[result_serializer(borsh)] | ||
pub fn refund_on_error(&mut self, #[serializer(borsh)] _input: Raw) -> u8 { | ||
0 | ||
} | ||
} |
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
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
Oops, something went wrong.