Files
app-ethereum/tests/ragger/test_clone.py
Charles-Edouard de la Vergne d4b6e5ca35 Port 'send_etc.test' from 'zemu' to 'ragger'
- Port test config from 'zemu'
- Copy snapshots from 'zemu'
- Adapt conftest.py to support library mode
- Add a new test step in the workflow
2024-04-11 18:07:51 +02:00

33 lines
881 B
Python

from web3 import Web3
from ragger.backend import BackendInterface
from ragger.firmware import Firmware
from ragger.navigator import Navigator
from test_sign import common
# Values used across all tests
ADDR = bytes.fromhex("5a321744667052affa8386ed49e00ef223cbffc3")
BIP32_PATH = "m/44'/1001'/0'/0/0"
NONCE = 68
GAS_PRICE = 13
GAS_LIMIT = 21000
VALUE = 0.31415
# Transfer on Clone app
def test_clone_thundercore(firmware: Firmware,
backend: BackendInterface,
navigator: Navigator,
test_name: str):
tx_params: dict = {
"nonce": NONCE,
"gasPrice": Web3.to_wei(GAS_PRICE, 'gwei'),
"gas": GAS_LIMIT,
"to": ADDR,
"value": Web3.to_wei(VALUE, "ether"),
"chainId": 108
}
common(firmware, backend, navigator, tx_params, test_name, BIP32_PATH)