parent
e1f696b4dd
commit
ebcf3e2db2
@ -0,0 +1,128 @@
|
||||
{
|
||||
"setup": {
|
||||
"mnemonic": "alcohol woman abuse must during monitor noble actual mixed trade anger aisle",
|
||||
"passphrase": ""
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
"name": "stake_holesky",
|
||||
"parameters": {
|
||||
"comment": "Stake transaction - Holesky testnet",
|
||||
"data": "3a29dbae0000000000000000000000000000000000000000000000000000000000000001",
|
||||
"path": "m/44'/60'/0'/0/0",
|
||||
"to_address": "0xAFA848357154a6a624686b348303EF9a13F63264",
|
||||
"chain_id": 1,
|
||||
"nonce": "0x0",
|
||||
"gas_price": "0x14",
|
||||
"gas_limit": "0x14",
|
||||
"tx_type": null,
|
||||
"value": "0x16345785D8A0000"
|
||||
},
|
||||
"result": {
|
||||
"sig_v": 37,
|
||||
"sig_r": "1a43606f1a3e9a61c4986cc9b324dd74f84557942cddf2e4ffccea82c2c54824",
|
||||
"sig_s": "63e8595bfa1e383a1fea7205bff5afcf3b3d3513b45a2f792396f2f4251f4c55"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "stake_main",
|
||||
"parameters": {
|
||||
"comment": "Stake transaction - Mainnet",
|
||||
"data": "3a29dbae0000000000000000000000000000000000000000000000000000000000000001",
|
||||
"path": "m/44'/60'/0'/0/0",
|
||||
"to_address": "0xD523794C879D9eC028960a231F866758e405bE34",
|
||||
"chain_id": 1,
|
||||
"nonce": "0x0",
|
||||
"gas_price": "0x14",
|
||||
"gas_limit": "0x14",
|
||||
"tx_type": null,
|
||||
"value": "0x16345785D8A0000"
|
||||
},
|
||||
"result": {
|
||||
"sig_v": 37,
|
||||
"sig_r": "104ae56ff2ec396a86191fa94b6e79af20efcc28e5d16b39d90fe05c990a2ce6",
|
||||
"sig_s": "504fd80e50890df83a9b004d0ba97db11b93354327e717df5c0874036f616d47"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "unstake_holesky",
|
||||
"parameters": {
|
||||
"comment": "Unstake transaction - Holesky testnet",
|
||||
"data": "76ec871c000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
|
||||
"path": "m/44'/60'/0'/0/0",
|
||||
"to_address": "0xAFA848357154a6a624686b348303EF9a13F63264",
|
||||
"chain_id": 1,
|
||||
"nonce": "0x0",
|
||||
"gas_price": "0x14",
|
||||
"gas_limit": "0x14",
|
||||
"tx_type": null,
|
||||
"value": "0x0"
|
||||
},
|
||||
"result": {
|
||||
"sig_v": 38,
|
||||
"sig_r": "f6553486737da2ceb42067047d0e8dd0add8e82f49b524cf657215e1d2487d16",
|
||||
"sig_s": "21336e4c53537bcdf06a71ed6cbefc3374461476d8da6e988e6cf4957b6a8bb1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "unstake_main",
|
||||
"parameters": {
|
||||
"comment": "Unstake transaction - Mainnet",
|
||||
"data": "76ec871c000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
|
||||
"path": "m/44'/60'/0'/0/0",
|
||||
"to_address": "0xD523794C879D9eC028960a231F866758e405bE34",
|
||||
"chain_id": 1,
|
||||
"nonce": "0x0",
|
||||
"gas_price": "0x14",
|
||||
"gas_limit": "0x14",
|
||||
"tx_type": null,
|
||||
"value": "0x0"
|
||||
},
|
||||
"result": {
|
||||
"sig_v": 38,
|
||||
"sig_r": "09077008477f40468928a94c45bfdb0b0ff473473401cd918740af4c98734bea",
|
||||
"sig_s": "3cad467c41810a2d8901020a803d6836d1d5a39d8198eaba3eec121a48997b18"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "claim_holesky",
|
||||
"parameters": {
|
||||
"comment": "Claim transaction - Holesky testnet",
|
||||
"data": "33986ffa",
|
||||
"path": "m/44'/60'/0'/0/0",
|
||||
"to_address": "0x624087DD1904ab122A32878Ce9e933C7071F53B9",
|
||||
"chain_id": 1,
|
||||
"nonce": "0x0",
|
||||
"gas_price": "0x14",
|
||||
"gas_limit": "0x14",
|
||||
"tx_type": null,
|
||||
"value": "0x0"
|
||||
},
|
||||
"result": {
|
||||
"sig_v": 37,
|
||||
"sig_r": "4a77a5f7437c4744c8dc4e48f968a6fedccd86db0ee15ce6a832e71b17f11a9a",
|
||||
"sig_s": "75e8efc0ecf1484ce745bbcd19899fbc458677869f3008be5ddb9c8ad8766d40"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "claim_mainnet",
|
||||
"parameters": {
|
||||
"comment": "Claim transaction - Mainnet",
|
||||
"data": "33986ffa",
|
||||
"path": "m/44'/60'/0'/0/0",
|
||||
"to_address": "0x7a7f0b3c23C23a31cFcb0c44709be70d4D545c6e",
|
||||
"chain_id": 1,
|
||||
"nonce": "0x0",
|
||||
"gas_price": "0x14",
|
||||
"gas_limit": "0x14",
|
||||
"tx_type": null,
|
||||
"value": "0x0"
|
||||
},
|
||||
"result": {
|
||||
"sig_v": 37,
|
||||
"sig_r": "c477417e2471d94c089d082fe1570fa8ba114e6572211c4b539244e2d40457d1",
|
||||
"sig_s": "0bb029ed5dbe76016f74263c0a8709bcbd89affac62504196a1cf546d7c723a3"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
{
|
||||
"setup": {
|
||||
"mnemonic": "alcohol woman abuse must during monitor noble actual mixed trade anger aisle",
|
||||
"passphrase": ""
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
"name": "stake_bad_inputs_1",
|
||||
"parameters": {
|
||||
"comment": "Stake transaction - Holesky testnet. Wrong source argument (should be 1).",
|
||||
"data": "3a29dbae0000000000000000000000000000000000000000000000000000000000000002",
|
||||
"path": "m/44'/60'/0'/0/0",
|
||||
"to_address": "0xAFA848357154a6a624686b348303EF9a13F63264",
|
||||
"chain_id": 1,
|
||||
"nonce": "0x0",
|
||||
"gas_price": "0x14",
|
||||
"gas_limit": "0x14",
|
||||
"tx_type": null,
|
||||
"value": "0x16345785D8A0000"
|
||||
},
|
||||
"result": {
|
||||
"sig_v": 0,
|
||||
"sig_r": "0x0",
|
||||
"sig_s": "0x0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "stake_bad_inputs_2",
|
||||
"parameters": {
|
||||
"comment": "Stake transaction - Mainnet. Missing arguments.",
|
||||
"data": "3a29dbae",
|
||||
"path": "m/44'/60'/0'/0/0",
|
||||
"to_address": "0xD523794C879D9eC028960a231F866758e405bE34",
|
||||
"chain_id": 1,
|
||||
"nonce": "0x0",
|
||||
"gas_price": "0x14",
|
||||
"gas_limit": "0x14",
|
||||
"tx_type": null,
|
||||
"value": "0x16345785D8A0000"
|
||||
},
|
||||
"result": {
|
||||
"sig_v": 0,
|
||||
"sig_r": "0x0",
|
||||
"sig_s": "0x0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "unstake_bad_inputs_1",
|
||||
"parameters": {
|
||||
"comment": "Unstake transaction - Holesky testnet. Wrong source argument (should be 1).",
|
||||
"data": "76ec871c000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002",
|
||||
"path": "m/44'/60'/0'/0/0",
|
||||
"to_address": "0xAFA848357154a6a624686b348303EF9a13F63264",
|
||||
"chain_id": 1,
|
||||
"nonce": "0x0",
|
||||
"gas_price": "0x14",
|
||||
"gas_limit": "0x14",
|
||||
"tx_type": null,
|
||||
"value": "0x0"
|
||||
},
|
||||
"result": {
|
||||
"sig_v": 0,
|
||||
"sig_r": "0x0",
|
||||
"sig_s": "0x0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "unstake_bad_inputs_2",
|
||||
"parameters": {
|
||||
"comment": "Unstake transaction - Holesky testnet. Misaligned arguments.",
|
||||
"data": "76ec871c000000000000000000",
|
||||
"path": "m/44'/60'/0'/0/0",
|
||||
"to_address": "0xAFA848357154a6a624686b348303EF9a13F63264",
|
||||
"chain_id": 1,
|
||||
"nonce": "0x0",
|
||||
"gas_price": "0x14",
|
||||
"gas_limit": "0x14",
|
||||
"tx_type": null,
|
||||
"value": "0x0"
|
||||
},
|
||||
"result": {
|
||||
"sig_v": 0,
|
||||
"sig_r": "0x0",
|
||||
"sig_s": "0x0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "claim_bad_inputs_1",
|
||||
"parameters": {
|
||||
"comment": "Claim transaction - Mainnet. Misaligned data.",
|
||||
"data": "33986ffaaa000aaa",
|
||||
"path": "m/44'/60'/0'/0/0",
|
||||
"to_address": "0x7a7f0b3c23C23a31cFcb0c44709be70d4D545c6e",
|
||||
"chain_id": 1,
|
||||
"nonce": "0x0",
|
||||
"gas_price": "0x14",
|
||||
"gas_limit": "0x14",
|
||||
"tx_type": null,
|
||||
"value": "0x0"
|
||||
},
|
||||
"result": {
|
||||
"sig_v": 0,
|
||||
"sig_r": "0x0",
|
||||
"sig_s": "0x0"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
{
|
||||
"setup": {
|
||||
"mnemonic": "alcohol woman abuse must during monitor noble actual mixed trade anger aisle",
|
||||
"passphrase": ""
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
"name": "stake_holesky",
|
||||
"parameters": {
|
||||
"comment": "Stake transaction - Holesky testnet",
|
||||
"data": "3a29dbae0000000000000000000000000000000000000000000000000000000000000001",
|
||||
"path": "m/44'/60'/0'/0/0",
|
||||
"to_address": "0xAFA848357154a6a624686b348303EF9a13F63264",
|
||||
"chain_id": 1,
|
||||
"nonce": "0x0",
|
||||
"gas_limit": "0x14",
|
||||
"max_gas_fee": "0x14",
|
||||
"max_priority_fee": "0x1",
|
||||
"value": "0x16345785D8A0000"
|
||||
},
|
||||
"result": {
|
||||
"sig_v": 0,
|
||||
"sig_r": "77d68a17e2bcacccb791ca3d7e298588be0511a7d3c055abbb2030f54b56c6fa",
|
||||
"sig_s": "567092e781fe1aedc458bdbc9ce4328398bf1d7d635787191881131c1afa7143"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "stake_main",
|
||||
"parameters": {
|
||||
"comment": "Stake transaction - Mainnet",
|
||||
"data": "3a29dbae0000000000000000000000000000000000000000000000000000000000000001",
|
||||
"path": "m/44'/60'/0'/0/0",
|
||||
"to_address": "0xD523794C879D9eC028960a231F866758e405bE34",
|
||||
"chain_id": 1,
|
||||
"nonce": "0x0",
|
||||
"gas_limit": "0x14",
|
||||
"max_gas_fee": "0x14",
|
||||
"max_priority_fee": "0x1",
|
||||
"value": "0x16345785D8A0000"
|
||||
},
|
||||
"result": {
|
||||
"sig_v": 0,
|
||||
"sig_r": "05a37bf477df7f256729ec8607aa20a6286c42a246b5deebaf6d54915c0f87e3",
|
||||
"sig_s": "30ffe2e80119452403bbf238b02def90a120ade2e73ab60926060ed10562f5ed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "unstake_holesky",
|
||||
"parameters": {
|
||||
"comment": "Unstake transaction - Holesky testnet",
|
||||
"data": "76ec871c000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
|
||||
"path": "m/44'/60'/0'/0/0",
|
||||
"to_address": "0xAFA848357154a6a624686b348303EF9a13F63264",
|
||||
"chain_id": 1,
|
||||
"nonce": "0x0",
|
||||
"gas_limit": "0x14",
|
||||
"max_gas_fee": "0x14",
|
||||
"max_priority_fee": "0x1",
|
||||
"value": "0x0"
|
||||
},
|
||||
"result": {
|
||||
"sig_v": 0,
|
||||
"sig_r": "9dfa73ea497785ffcb61598c554a57e46fce0a605c9ed06a4c8f265fccfd912e",
|
||||
"sig_s": "45db0bd2189d4bc4828c859d28b907b3d47c4a35eef707052cde2f4fff4ef4fe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "unstake_main",
|
||||
"parameters": {
|
||||
"comment": "Unstake transaction - Mainnet",
|
||||
"data": "76ec871c000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
|
||||
"path": "m/44'/60'/0'/0/0",
|
||||
"to_address": "0xD523794C879D9eC028960a231F866758e405bE34",
|
||||
"chain_id": 1,
|
||||
"nonce": "0x0",
|
||||
"gas_limit": "0x14",
|
||||
"max_gas_fee": "0x14",
|
||||
"max_priority_fee": "0x1",
|
||||
"value": "0x0"
|
||||
},
|
||||
"result": {
|
||||
"sig_v": 0,
|
||||
"sig_r": "15eb458e473c7f74abf99ba8833885e25435f913e77e5bc1259396942f6b9539",
|
||||
"sig_s": "14ea7a1417cfab7bb2cdbd0750aa7929f02a30999b624dd2ae1029c6be9dc9d8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "claim_holesky",
|
||||
"parameters": {
|
||||
"comment": "Claim transaction - Holesky testnet",
|
||||
"data": "33986ffa",
|
||||
"path": "m/44'/60'/0'/0/0",
|
||||
"to_address": "0x624087DD1904ab122A32878Ce9e933C7071F53B9",
|
||||
"chain_id": 1,
|
||||
"nonce": "0x0",
|
||||
"gas_limit": "0x14",
|
||||
"max_gas_fee": "0x14",
|
||||
"max_priority_fee": "0x1",
|
||||
"value": "0x0"
|
||||
},
|
||||
"result": {
|
||||
"sig_v": 1,
|
||||
"sig_r": "5abf2a99ac6431fce9e436234e2962502b1a67d4b582f90f4bc592e790f8fd7e",
|
||||
"sig_s": "60b01cd76d40f089dc9464cb442c6bbac435f80a35b5a1ed128de7cb9718aa3a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "claim_mainnet",
|
||||
"parameters": {
|
||||
"comment": "Claim transaction - Mainnet",
|
||||
"data": "33986ffa",
|
||||
"path": "m/44'/60'/0'/0/0",
|
||||
"to_address": "0x7a7f0b3c23C23a31cFcb0c44709be70d4D545c6e",
|
||||
"chain_id": 1,
|
||||
"nonce": "0x0",
|
||||
"gas_limit": "0x14",
|
||||
"max_gas_fee": "0x14",
|
||||
"max_priority_fee": "0x1",
|
||||
"value": "0x0"
|
||||
},
|
||||
"result": {
|
||||
"sig_v": 0,
|
||||
"sig_r": "7b3a09f1e0b28b2a25ddc3de02168fc20e9faada1d97181679dfb6f8383382da",
|
||||
"sig_s": "6667dbb7b7b63d3e51df012a62dc6b01f13b60c7598b04aa499722cfb26864f3"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1 @@
|
||||
Clear sign ETH staking transactions on Everstake pool.
|
@ -0,0 +1,21 @@
|
||||
from micropython import const
|
||||
from ubinascii import unhexlify
|
||||
|
||||
# smart contract 'data' field lengths in bytes
|
||||
SC_FUNC_SIG_BYTES = const(4)
|
||||
SC_ARGUMENT_BYTES = const(32)
|
||||
|
||||
# staking operations function signatures
|
||||
SC_FUNC_SIG_STAKE = unhexlify("3a29dbae")
|
||||
SC_FUNC_SIG_UNSTAKE = unhexlify("76ec871c")
|
||||
SC_FUNC_SIG_CLAIM = unhexlify("33986ffa")
|
||||
|
||||
# addresses for pool (stake/unstake) and accounting (claim) operations
|
||||
ADDRESSES_POOL = (
|
||||
unhexlify("AFA848357154a6a624686b348303EF9a13F63264"), # holesky testnet
|
||||
unhexlify("D523794C879D9eC028960a231F866758e405bE34"), # mainnet
|
||||
)
|
||||
ADDRESSES_ACCOUNTING = (
|
||||
unhexlify("624087DD1904ab122A32878Ce9e933C7071F53B9"), # holesky testnet
|
||||
unhexlify("7a7f0b3c23C23a31cFcb0c44709be70d4D545c6e"), # mainnet
|
||||
)
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"current": {
|
||||
"merkle_root": "4add9b7a2b80544a382378bc1abdae38600460825ef8010d45da5c2f28d86d26",
|
||||
"merkle_root": "ebba747f556487944a26b19deb5910648694670f0de05f5a1569e1e12cf47ea0",
|
||||
"signature": null,
|
||||
"datetime": "2024-02-21T09:03:23.136322",
|
||||
"commit": "1dc00561ae04804aecbb0715d092c2a907e8eed8"
|
||||
"datetime": "2024-02-21T15:09:10.231125",
|
||||
"commit": "4204ba14044132269dc708e3f0b0cfac3bbfd906"
|
||||
},
|
||||
"history": []
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 9cfd22ef20fec2c34d0f0e5c16a5d5152da30861
|
||||
Subproject commit 28e177c4424820aee8a6f031474c890e5bafe72c
|
Loading…
Reference in new issue