Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: set up mainnet E2E testing environment #101

Merged
merged 2 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions canister_ids.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"e2e_motoko": {
"ic": "rcfjk-jiaaa-aaaap-abuoq-cai"
},
"e2e_rust": {
"ic": "rlgcw-7aaaa-aaaap-abupa-cai"
},
"evm_rpc": {
"ic": "a6d44-nyaaa-aaaap-abp7q-cai"
},
Expand Down
4 changes: 3 additions & 1 deletion e2e/motoko/Main.mo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Debug "mo:base/Debug";
import Text "mo:base/Text";
import Blob "mo:base/Blob";

actor class Main() {
shared ({ caller = installer }) actor class Main() {
let mainnet = Evm.Rpc(
#Canister EvmRpcCanister,
#Service {
Expand All @@ -16,6 +16,8 @@ actor class Main() {
);

public shared ({ caller }) func test() : async () {
assert caller == installer;

let source = #Service {
hostname = "cloudflare-eth.com";
chainId = ?(1 : Nat64); // Ethereum mainnet
Expand Down
2 changes: 2 additions & 0 deletions e2e/rust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ fn main() {}
#[update]
#[candid_method(update)]
pub async fn test() {
assert!(ic_cdk::api::is_controller(&ic_cdk::caller()));

// Define request parameters
let params = (
&Source::Service {
Expand Down