Skip to content

Commit

Permalink
Merge branch 'main' into feat/sign
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker authored Oct 9, 2024
2 parents db6f35a + ad3bda0 commit 4e29109
Show file tree
Hide file tree
Showing 34 changed files with 514 additions and 239 deletions.
32 changes: 31 additions & 1 deletion .github/workflows/update-snapshots.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Update E2E Snapshots

on:
push:
branches:
- main
workflow_dispatch:

jobs:
Expand All @@ -19,7 +22,7 @@ jobs:
needs: oisy-backend-wasm
steps:
- name: Fail if branch is main
if: ${{ github.ref == 'refs/heads/main' }}
if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' }}
run: |
echo "This workflow should not be triggered with workflow_dispatch on main"
exit 1
Expand All @@ -43,3 +46,30 @@ jobs:
add: e2e
default_author: github_actions
message: "🤖 update E2E snapshots"

- name: Stage Changes
if: github.ref == 'refs/heads/main'
run: git add .

- name: Check for Changes
if: github.ref == 'refs/heads/main'
run: |
if ! git diff --cached --quiet; then
echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
MODIFIED_FILES=$(git diff --cached --name-only)
echo "MODIFIED_FILES<<EOF" >> $GITHUB_ENV
echo "$MODIFIED_FILES" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
fi
- name: Create Pull Request (if changes and on main)
if: github.ref == 'refs/heads/main' && env.CHANGES_DETECTED == 'true'
uses: ./.github/actions/create-pr
with:
token: ${{ secrets.GIX_CREATE_PR_PAT }}
branch: bot-e2e-update-snapshots
title: 'chore(e2e): Update Playwright E2E Snapshots'
body: |
The following E2E snapshots have been updated:
```
${{ env.MODIFIED_FILES }}
8 changes: 5 additions & 3 deletions canister_ids.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
"staging": "t7tos-nyaaa-aaaad-aadkq-cai"
},
"backend": {
"ic": "doked-biaaa-aaaar-qag2a-cai",
"beta": "doked-biaaa-aaaar-qag2a-cai",
"ic": "doked-biaaa-aaaar-qag2a-cai",
"staging": "d3nvo-aaaaa-aaaar-qagzq-cai"
},
"frontend": {
"ic": "cha4i-riaaa-aaaan-qeccq-cai",
"beta": "v7iq7-yiaaa-aaaan-qmrtq-cai",
"ic": "cha4i-riaaa-aaaan-qeccq-cai",
"staging": "tewsx-xaaaa-aaaad-aadia-cai",
"test_fe_1": "6qzfn-gyaaa-aaaar-qaisa-cai",
"test_fe_2": "6xydz-laaaa-aaaar-qaisq-cai"
"test_fe_2": "6xydz-laaaa-aaaar-qaisq-cai",
"test_fe_3": "dxvmu-wiaaa-aaaah-aqzaa-cai",
"test_fe_4": "gwqec-uqaaa-aaaak-qlnza-cai"
}
}
40 changes: 39 additions & 1 deletion dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"beta": "grghe-syaaa-aaaar-qabyq-cai",
"test_fe_1": "tdxud-2yaaa-aaaad-aadiq-cai",
"test_fe_2": "tdxud-2yaaa-aaaad-aadiq-cai",
"test_fe_3": "tdxud-2yaaa-aaaad-aadiq-cai",
"test_fe_4": "tdxud-2yaaa-aaaad-aadiq-cai",
"staging": "tdxud-2yaaa-aaaad-aadiq-cai"
}
}
Expand All @@ -28,7 +30,9 @@
"remote": {
"id": {
"test_fe_1": "d3nvo-aaaaa-aaaar-qagzq-cai",
"test_fe_2": "d3nvo-aaaaa-aaaar-qagzq-cai"
"test_fe_2": "d3nvo-aaaaa-aaaar-qagzq-cai",
"test_fe_3": "d3nvo-aaaaa-aaaar-qagzq-cai",
"test_fe_4": "d3nvo-aaaaa-aaaar-qagzq-cai"
}
}
},
Expand Down Expand Up @@ -63,6 +67,8 @@
"id": {
"test_fe_1": "rdmx6-jaaaa-aaaaa-aaadq-cai",
"test_fe_2": "rdmx6-jaaaa-aaaaa-aaadq-cai",
"test_fe_3": "rdmx6-jaaaa-aaaaa-aaadq-cai",
"test_fe_4": "rdmx6-jaaaa-aaaaa-aaadq-cai",
"staging": "rdmx6-jaaaa-aaaaa-aaadq-cai",
"beta": "rdmx6-jaaaa-aaaaa-aaadq-cai",
"ic": "rdmx6-jaaaa-aaaaa-aaadq-cai"
Expand All @@ -79,6 +85,8 @@
"id": {
"test_fe_1": "um5iw-rqaaa-aaaaq-qaaba-cai",
"test_fe_2": "um5iw-rqaaa-aaaaq-qaaba-cai",
"test_fe_3": "um5iw-rqaaa-aaaaq-qaaba-cai",
"test_fe_4": "um5iw-rqaaa-aaaaq-qaaba-cai",
"staging": "um5iw-rqaaa-aaaaq-qaaba-cai",
"beta": "um5iw-rqaaa-aaaaq-qaaba-cai",
"ic": "um5iw-rqaaa-aaaaq-qaaba-cai"
Expand All @@ -95,6 +103,8 @@
"id": {
"test_fe_1": "2vxsx-fae",
"test_fe_2": "2vxsx-fae",
"test_fe_3": "2vxsx-fae",
"test_fe_4": "2vxsx-fae",
"staging": "2vxsx-fae",
"beta": "2vxsx-fae",
"ic": "2vxsx-fae"
Expand All @@ -110,6 +120,8 @@
"id": {
"test_fe_1": "qbw6f-caaaa-aaaah-qdcwa-cai",
"test_fe_2": "qbw6f-caaaa-aaaah-qdcwa-cai",
"test_fe_3": "qbw6f-caaaa-aaaah-qdcwa-cai",
"test_fe_4": "qbw6f-caaaa-aaaah-qdcwa-cai",
"staging": "qbw6f-caaaa-aaaah-qdcwa-cai",
"beta": "qgxyr-pyaaa-aaaah-qdcwq-cai",
"ic": "qgxyr-pyaaa-aaaah-qdcwq-cai"
Expand All @@ -124,6 +136,8 @@
"id": {
"test_fe_1": "ryjl3-tyaaa-aaaaa-aaaba-cai",
"test_fe_2": "ryjl3-tyaaa-aaaaa-aaaba-cai",
"test_fe_3": "ryjl3-tyaaa-aaaaa-aaaba-cai",
"test_fe_4": "ryjl3-tyaaa-aaaaa-aaaba-cai",
"staging": "ryjl3-tyaaa-aaaaa-aaaba-cai",
"beta": "ryjl3-tyaaa-aaaaa-aaaba-cai",
"ic": "ryjl3-tyaaa-aaaaa-aaaba-cai"
Expand All @@ -138,6 +152,8 @@
"id": {
"test_fe_1": "qhbym-qaaaa-aaaaa-aaafq-cai",
"test_fe_2": "qhbym-qaaaa-aaaaa-aaafq-cai",
"test_fe_3": "qhbym-qaaaa-aaaaa-aaafq-cai",
"test_fe_4": "qhbym-qaaaa-aaaaa-aaafq-cai",
"staging": "qhbym-qaaaa-aaaaa-aaafq-cai",
"beta": "qhbym-qaaaa-aaaaa-aaafq-cai",
"ic": "qhbym-qaaaa-aaaaa-aaafq-cai"
Expand All @@ -153,6 +169,8 @@
"ic": "mqygn-kiaaa-aaaar-qaadq-cai",
"test_fe_1": "ml52i-qqaaa-aaaar-qaaba-cai",
"test_fe_2": "ml52i-qqaaa-aaaar-qaaba-cai",
"test_fe_3": "ml52i-qqaaa-aaaar-qaaba-cai",
"test_fe_4": "ml52i-qqaaa-aaaar-qaaba-cai",
"staging": "ml52i-qqaaa-aaaar-qaaba-cai"
}
}
Expand All @@ -166,6 +184,8 @@
"ic": "mxzaz-hqaaa-aaaar-qaada-cai",
"test_fe_1": "mc6ru-gyaaa-aaaar-qaaaq-cai",
"test_fe_2": "mc6ru-gyaaa-aaaar-qaaaq-cai",
"test_fe_3": "mc6ru-gyaaa-aaaar-qaaaq-cai",
"test_fe_4": "mc6ru-gyaaa-aaaar-qaaaq-cai",
"staging": "mc6ru-gyaaa-aaaar-qaaaq-cai"
}
}
Expand All @@ -179,6 +199,8 @@
"ic": "n5wcd-faaaa-aaaar-qaaea-cai",
"test_fe_1": "mm444-5iaaa-aaaar-qaabq-cai",
"test_fe_2": "mm444-5iaaa-aaaar-qaabq-cai",
"test_fe_3": "mm444-5iaaa-aaaar-qaabq-cai",
"test_fe_4": "mm444-5iaaa-aaaar-qaabq-cai",
"staging": "mm444-5iaaa-aaaar-qaabq-cai"
}
}
Expand All @@ -192,6 +214,8 @@
"ic": "pjihx-aaaaa-aaaar-qaaka-cai",
"test_fe_1": "pvm5g-xaaaa-aaaar-qaaia-cai",
"test_fe_2": "pvm5g-xaaaa-aaaar-qaaia-cai",
"test_fe_3": "pvm5g-xaaaa-aaaar-qaaia-cai",
"test_fe_4": "pvm5g-xaaaa-aaaar-qaaia-cai",
"staging": "pvm5g-xaaaa-aaaar-qaaia-cai"
}
}
Expand All @@ -205,6 +229,8 @@
"ic": "sv3dd-oaaaa-aaaar-qacoa-cai",
"test_fe_1": "jzenf-aiaaa-aaaar-qaa7q-cai",
"test_fe_2": "jzenf-aiaaa-aaaar-qaa7q-cai",
"test_fe_3": "jzenf-aiaaa-aaaar-qaa7q-cai",
"test_fe_4": "jzenf-aiaaa-aaaar-qaa7q-cai",
"staging": "jzenf-aiaaa-aaaar-qaa7q-cai"
}
}
Expand All @@ -218,6 +244,8 @@
"ic": "ss2fx-dyaaa-aaaar-qacoq-cai",
"test_fe_1": "apia6-jaaaa-aaaar-qabma-cai",
"test_fe_2": "apia6-jaaaa-aaaar-qabma-cai",
"test_fe_3": "apia6-jaaaa-aaaar-qabma-cai",
"test_fe_4": "apia6-jaaaa-aaaar-qabma-cai",
"staging": "apia6-jaaaa-aaaar-qabma-cai"
}
}
Expand All @@ -231,6 +259,8 @@
"ic": "s3zol-vqaaa-aaaar-qacpa-cai",
"test_fe_1": "sh5u2-cqaaa-aaaar-qacna-cai",
"test_fe_2": "sh5u2-cqaaa-aaaar-qacna-cai",
"test_fe_3": "sh5u2-cqaaa-aaaar-qacna-cai",
"test_fe_4": "sh5u2-cqaaa-aaaar-qacna-cai",
"staging": "sh5u2-cqaaa-aaaar-qacna-cai"
}
}
Expand Down Expand Up @@ -266,6 +296,14 @@
"providers": ["https://icp0.io"],
"type": "persistent"
},
"test_fe_3": {
"providers": ["https://icp0.io"],
"type": "persistent"
},
"test_fe_4": {
"providers": ["https://icp0.io"],
"type": "persistent"
},
"staging": {
"providers": ["https://icp0.io"],
"type": "persistent"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scripts/build.signer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ print_help() {

DFX_NETWORK="${DFX_NETWORK:-local}"

SIGNER_RELEASE="v0.2.2"
SIGNER_RELEASE="v0.2.3"
SIGNER_RELEASE_URL="https://github.com/dfinity/chain-fusion-signer/releases/download/${SIGNER_RELEASE}"
CANDID_URL="${SIGNER_RELEASE_URL}/signer.did"
WASM_URL="${SIGNER_RELEASE_URL}/signer.wasm.gz"
Expand Down
51 changes: 40 additions & 11 deletions src/declarations/signer/signer.did
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ type Arg = variant { Upgrade; Init : InitArg };
type BitcoinAddressType = variant { P2WPKH };
type BitcoinNetwork = variant { mainnet; regtest; testnet };
type BtcTxOutput = record { destination_address : text; sent_satoshis : nat64 };
type BuildP2wpkhTxError = variant {
NotEnoughFunds : record { available : nat64; required : nat64 };
WrongBitcoinNetwork;
NotP2WPKHSourceAddress;
InvalidDestinationAddress : GetAddressResponse;
InvalidSourceAddress : GetAddressResponse;
};
type CallerPaysIcrc2Tokens = record { ledger : principal };
type CanisterStatusResultV2 = record {
controller : principal;
Expand Down Expand Up @@ -36,10 +43,26 @@ type EcdsaPublicKeyArgument = record {
derivation_path : vec blob;
};
type EcdsaPublicKeyResponse = record { public_key : blob; chain_code : blob };
type GenericSigningError = variant {
type EthAddressError = variant {
SigningError : record { RejectionCode_1; text };
PaymentError : PaymentError;
};
type EthAddressRequest = record { "principal" : opt principal };
type EthAddressResponse = record { address : text };
type EthPersonalSignRequest = record { message : text };
type EthPersonalSignResponse = record { signature : text };
type EthSignPrehashRequest = record { message : text };
type EthSignPrehashResponse = record { signature : text };
type EthSignTransactionRequest = record {
to : text;
gas : nat;
value : nat;
max_priority_fee_per_gas : nat;
data : opt text;
max_fee_per_gas : nat;
chain_id : nat;
nonce : nat;
};
type GetAddressError = variant {
InternalError : record { msg : text };
PaymentError : PaymentError;
Expand Down Expand Up @@ -109,16 +132,19 @@ type RejectionCode_1 = variant {
type Result = variant { Ok : GetAddressResponse; Err : GetAddressError };
type Result_1 = variant { Ok : GetBalanceResponse; Err : GetAddressError };
type Result_2 = variant { Ok : SendBtcResponse; Err : SendBtcError };
type Result_3 = variant { Ok : text; Err : GenericSigningError };
type Result_4 = variant {
type Result_3 = variant { Ok : EthAddressResponse; Err : EthAddressError };
type Result_4 = variant { Ok : EthPersonalSignResponse; Err : EthAddressError };
type Result_5 = variant { Ok : EthSignPrehashResponse; Err : EthAddressError };
type Result_6 = variant {
Ok : record { EcdsaPublicKeyResponse };
Err : GenericSigningError;
Err : EthAddressError;
};
type Result_5 = variant {
type Result_7 = variant {
Ok : record { SignWithEcdsaResponse };
Err : GenericSigningError;
Err : EthAddressError;
};
type SendBtcError = variant {
BuildP2wpkhError : BuildP2wpkhTxError;
InternalError : record { msg : text };
PaymentError : PaymentError;
};
Expand Down Expand Up @@ -181,17 +207,20 @@ service : (Arg) -> {
btc_caller_send : (SendBtcRequest, opt PaymentType) -> (Result_2);
caller_eth_address : () -> (text);
config : () -> (Config) query;
eth_address : (EthAddressRequest, opt PaymentType) -> (Result_3);
eth_address_of : (principal) -> (text);
eth_address_of_caller : (opt PaymentType) -> (Result_3);
eth_address_of_principal : (principal, opt PaymentType) -> (Result_3);
eth_personal_sign : (text, opt PaymentType) -> (Result_3);
eth_sign_transaction : (SignRequest, opt PaymentType) -> (Result_3);
eth_personal_sign : (EthPersonalSignRequest, opt PaymentType) -> (Result_4);
eth_sign_prehash : (EthSignPrehashRequest, opt PaymentType) -> (Result_5);
eth_sign_transaction : (EthSignTransactionRequest, opt PaymentType) -> (
Result_5,
);
generic_caller_ecdsa_public_key : (
EcdsaPublicKeyArgument,
opt PaymentType,
) -> (Result_4);
) -> (Result_6);
generic_sign_with_ecdsa : (opt PaymentType, SignWithEcdsaArgument) -> (
Result_5,
Result_7,
);
get_canister_status : () -> (CanisterStatusResultV2);
http_request : (HttpRequest) -> (HttpResponse) query;
Expand Down
Loading

0 comments on commit 4e29109

Please sign in to comment.