olas-operate-middleware 0.13.2__py3-none-any.whl → 0.13.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of olas-operate-middleware might be problematic. Click here for more details.
- {olas_operate_middleware-0.13.2.dist-info → olas_operate_middleware-0.13.4.dist-info}/METADATA +8 -27
- {olas_operate_middleware-0.13.2.dist-info → olas_operate_middleware-0.13.4.dist-info}/RECORD +40 -40
- operate/bridge/providers/provider.py +23 -31
- operate/cli.py +4 -17
- operate/constants.py +1 -0
- operate/data/contracts/dual_staking_token/contract.py +3 -3
- operate/data/contracts/dual_staking_token/contract.yaml +2 -2
- operate/data/contracts/foreign_omnibridge/contract.yaml +1 -1
- operate/data/contracts/home_omnibridge/contract.py +2 -2
- operate/data/contracts/home_omnibridge/contract.yaml +2 -2
- operate/data/contracts/l1_standard_bridge/contract.yaml +1 -1
- operate/data/contracts/l2_standard_bridge/contract.py +4 -4
- operate/data/contracts/l2_standard_bridge/contract.yaml +2 -2
- operate/data/contracts/mech_activity/contract.yaml +1 -1
- operate/data/contracts/optimism_mintable_erc20/contract.yaml +1 -1
- operate/data/contracts/recovery_module/contract.yaml +1 -1
- operate/data/contracts/requester_activity_checker/contract.yaml +1 -1
- operate/data/contracts/staking_token/contract.py +3 -3
- operate/data/contracts/staking_token/contract.yaml +2 -2
- operate/data/contracts/uniswap_v2_erc20/contract.yaml +3 -3
- operate/data/contracts/uniswap_v2_erc20/tests/test_contract.py +5 -5
- operate/keys.py +5 -3
- operate/ledger/__init__.py +1 -7
- operate/ledger/profiles.py +0 -1
- operate/operate_http/__init__.py +0 -2
- operate/operate_types.py +3 -93
- operate/quickstart/run_service.py +63 -6
- operate/quickstart/utils.py +8 -4
- operate/resource.py +2 -2
- operate/services/agent_runner.py +3 -3
- operate/services/manage.py +14 -17
- operate/services/protocol.py +124 -169
- operate/services/utils/mech.py +3 -3
- operate/services/utils/tendermint.py +5 -3
- operate/utils/gnosis.py +76 -101
- operate/wallet/master.py +42 -47
- operate/wallet/wallet_recovery_manager.py +8 -6
- {olas_operate_middleware-0.13.2.dist-info → olas_operate_middleware-0.13.4.dist-info}/WHEEL +0 -0
- {olas_operate_middleware-0.13.2.dist-info → olas_operate_middleware-0.13.4.dist-info}/entry_points.txt +0 -0
- {olas_operate_middleware-0.13.2.dist-info → olas_operate_middleware-0.13.4.dist-info}/licenses/LICENSE +0 -0
{olas_operate_middleware-0.13.2.dist-info → olas_operate_middleware-0.13.4.dist-info}/METADATA
RENAMED
|
@@ -1,50 +1,31 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: olas-operate-middleware
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.4
|
|
4
4
|
Summary:
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Author: David Vilela
|
|
7
7
|
Author-email: dvilelaf@gmail.com
|
|
8
|
-
Requires-Python: >=3.
|
|
8
|
+
Requires-Python: >=3.10,<3.12
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
11
10
|
Classifier: Programming Language :: Python :: 3.10
|
|
12
11
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Requires-Dist: aiohttp (==3.9.5)
|
|
14
12
|
Requires-Dist: argon2-cffi (==23.1.0)
|
|
15
13
|
Requires-Dist: clea (==0.1.0rc4)
|
|
14
|
+
Requires-Dist: cryptography (>=46.0.3,<47.0.0)
|
|
16
15
|
Requires-Dist: cytoolz (==0.12.3)
|
|
17
16
|
Requires-Dist: deepdiff (>=8.6.1,<9.0.0)
|
|
18
|
-
Requires-Dist: docker (==6.1.2)
|
|
19
|
-
Requires-Dist: eth-abi (==4.0.0)
|
|
20
|
-
Requires-Dist: eth-account (==0.8.0)
|
|
21
|
-
Requires-Dist: eth-hash (==0.7.0)
|
|
22
|
-
Requires-Dist: eth-keyfile (==0.6.1)
|
|
23
|
-
Requires-Dist: eth-keys (==0.4.0)
|
|
24
|
-
Requires-Dist: eth-rlp (==0.3.0)
|
|
25
|
-
Requires-Dist: eth-typing (==3.5.2)
|
|
26
|
-
Requires-Dist: eth-utils (==2.2.0)
|
|
27
17
|
Requires-Dist: fastapi (==0.110.3)
|
|
28
|
-
Requires-Dist: frozenlist (==1.4.1)
|
|
29
18
|
Requires-Dist: halo (==0.0.31)
|
|
30
|
-
Requires-Dist: hexbytes (==0.3.1)
|
|
31
|
-
Requires-Dist: ipfshttpclient (==0.8.0a2)
|
|
32
|
-
Requires-Dist: jsonschema (==4.3.3)
|
|
33
19
|
Requires-Dist: multiaddr (==0.0.9)
|
|
34
|
-
Requires-Dist:
|
|
35
|
-
Requires-Dist: open-aea-
|
|
36
|
-
Requires-Dist: open-aea-ledger-
|
|
37
|
-
Requires-Dist: open-aea-ledger-ethereum (
|
|
38
|
-
Requires-Dist: open-
|
|
39
|
-
Requires-Dist: open-autonomy (>=0.20.2,<0.21.0)
|
|
20
|
+
Requires-Dist: open-aea-cli-ipfs (>=2.0.6,<3.0.0)
|
|
21
|
+
Requires-Dist: open-aea-ledger-cosmos (>=2.0.6,<3.0.0)
|
|
22
|
+
Requires-Dist: open-aea-ledger-ethereum (>=2.0.6,<3.0.0)
|
|
23
|
+
Requires-Dist: open-aea-ledger-ethereum-flashbots (>=2.0.6,<3.0.0)
|
|
24
|
+
Requires-Dist: open-autonomy (>=0.21.4,<0.22.0)
|
|
40
25
|
Requires-Dist: psutil (>=5.9.8,<6.0.0)
|
|
41
26
|
Requires-Dist: pyinstaller (>=6.8.0,<7.0.0)
|
|
42
27
|
Requires-Dist: requests-mock (>=1.12.1,<2.0.0)
|
|
43
|
-
Requires-Dist: requests-toolbelt (==1.0.0)
|
|
44
|
-
Requires-Dist: starlette (==0.37.2)
|
|
45
|
-
Requires-Dist: twikit (==2.2.0)
|
|
46
28
|
Requires-Dist: uvicorn (==0.27.0)
|
|
47
|
-
Requires-Dist: web3 (==6.20.4)
|
|
48
29
|
Description-Content-Type: text/markdown
|
|
49
30
|
|
|
50
31
|
<h1 align="center">
|
{olas_operate_middleware-0.13.2.dist-info → olas_operate_middleware-0.13.4.dist-info}/RECORD
RENAMED
|
@@ -4,98 +4,98 @@ operate/account/user.py,sha256=y7DqqDpqgHjbVmnfL_cN0Me_JWl3Dh6GSVt2-9FdRVw,3044
|
|
|
4
4
|
operate/bridge/bridge_manager.py,sha256=K5DMYGqgX0xw3pxzZXrwnCQ8ZKpy-HVsfNRM185xb5g,17445
|
|
5
5
|
operate/bridge/providers/lifi_provider.py,sha256=UzAeEnX9FGpnCYYml5lcICeEZeHHqNRCHkGZ-npgteo,14208
|
|
6
6
|
operate/bridge/providers/native_bridge_provider.py,sha256=vAx0MtVPIAxIdQ5OKSUDhnGurYVkC8tKVJRFK9NkIdk,25088
|
|
7
|
-
operate/bridge/providers/provider.py,sha256=
|
|
7
|
+
operate/bridge/providers/provider.py,sha256=Ra-HBzcq2fSBSZWu9Qv1WsuBiMtU6IXYL5lc6D6cvZM,16881
|
|
8
8
|
operate/bridge/providers/relay_provider.py,sha256=4D2U8jrugh2DJZeSoxLCTVSZe8xMEwdCimqFDtfwWwc,17422
|
|
9
|
-
operate/cli.py,sha256=
|
|
10
|
-
operate/constants.py,sha256=
|
|
9
|
+
operate/cli.py,sha256=2Rg4pIRZMMK7U2xgMuX3CEueOXi280cUzk-avZ3E1aw,69786
|
|
10
|
+
operate/constants.py,sha256=FC1jdzqwwEgyl4qKV8rNcJ_DbazbkEBk5dqPqxTX4e0,3870
|
|
11
11
|
operate/data/README.md,sha256=jGPyZTvg2LCGdllvmYxmFMkkkiXb6YWatbqIkcX3kv4,879
|
|
12
12
|
operate/data/__init__.py,sha256=ttC51Yqk9c4ehpIgs1Qbe7aJvzkrbbdZ1ClaCxJYByE,864
|
|
13
13
|
operate/data/contracts/__init__.py,sha256=_th54_WvL0ibGy-b6St0Ne9DX-fyjsh-tNOKDn-cWrg,809
|
|
14
14
|
operate/data/contracts/dual_staking_token/__init__.py,sha256=YYKRGg8_J6W2dQMZ75Il_UObydgk42bis1GavBm7xD4,864
|
|
15
15
|
operate/data/contracts/dual_staking_token/build/DualStakingToken.json,sha256=vGfSr37sNXtQ79FfOeqe7CXXzz2AqxVAgyRApTHyaC4,39379
|
|
16
|
-
operate/data/contracts/dual_staking_token/contract.py,sha256=
|
|
17
|
-
operate/data/contracts/dual_staking_token/contract.yaml,sha256=
|
|
16
|
+
operate/data/contracts/dual_staking_token/contract.py,sha256=dlCfUOEgSqMxzlwaWXVGUUgFs2vY7ak8wnE3VNj-X5o,4432
|
|
17
|
+
operate/data/contracts/dual_staking_token/contract.yaml,sha256=acpT_sARq3P_ff0eRofsl3K_f64Ww23pS_8ucpxePKs,722
|
|
18
18
|
operate/data/contracts/foreign_omnibridge/__init__.py,sha256=9eiHXGxm3pz3DZPEo1Wy5HgUsdUdy0CMU9ClQGFcznI,871
|
|
19
19
|
operate/data/contracts/foreign_omnibridge/build/ForeignOmnibridge.json,sha256=VnxMqVe6QsI4zdZZzsV7qONXd2RDHqVuNz_fJjGUa-Q,76259
|
|
20
20
|
operate/data/contracts/foreign_omnibridge/contract.py,sha256=t7n84tz0Jx0jKoxod-wZxlFyjdOIoxt8x2pTWt-RUwk,4157
|
|
21
|
-
operate/data/contracts/foreign_omnibridge/contract.yaml,sha256=
|
|
21
|
+
operate/data/contracts/foreign_omnibridge/contract.yaml,sha256=owBXew7nICxSrQUNlyBYkpdGexcOBNZNrdJM_U1yYTU,694
|
|
22
22
|
operate/data/contracts/home_omnibridge/__init__.py,sha256=jyPO8Sw9wCrcqHBPv37nJNkwPa3IfN_w6jImRsouG1Q,868
|
|
23
23
|
operate/data/contracts/home_omnibridge/build/HomeOmnibridge.json,sha256=YtRpoNcKlUtkNyZvQ420k_oPaIEaOmTJngHoa3lU6_0,78799
|
|
24
|
-
operate/data/contracts/home_omnibridge/contract.py,sha256=
|
|
25
|
-
operate/data/contracts/home_omnibridge/contract.yaml,sha256=
|
|
24
|
+
operate/data/contracts/home_omnibridge/contract.py,sha256=T_gBQAsgsM7n3PzKy4VvOfvFTOhRRiXNToREwUhsaWM,2798
|
|
25
|
+
operate/data/contracts/home_omnibridge/contract.yaml,sha256=_w8uTsqM73EF12im8y8QWgjeXex4MQTtnC_WswMnFkw,679
|
|
26
26
|
operate/data/contracts/l1_standard_bridge/__init__.py,sha256=u6pmgRIDXK0E1yCcNQNJXwfXLgc2hO-I1D3_eFCDQJQ,870
|
|
27
27
|
operate/data/contracts/l1_standard_bridge/build/L1StandardBridge.json,sha256=obGPvvhL3gwhyl-wE-U8tuDO6udMrcfycUjfwT5zzgo,41243
|
|
28
28
|
operate/data/contracts/l1_standard_bridge/contract.py,sha256=irwic3jXTNwPh1eBhANswzoPJlWWQEIJez3Alhyx3Kg,5128
|
|
29
|
-
operate/data/contracts/l1_standard_bridge/contract.yaml,sha256=
|
|
29
|
+
operate/data/contracts/l1_standard_bridge/contract.yaml,sha256=U5tO7PduUQoBfzW7sJDlDpStZ8GVIccFhHdrlJW4NuM,701
|
|
30
30
|
operate/data/contracts/l2_standard_bridge/__init__.py,sha256=DLSOdkVp7qYDtNkxK8R6rz8CkFNKHoEoW_uM1r1nL5I,870
|
|
31
31
|
operate/data/contracts/l2_standard_bridge/build/L2StandardBridge.json,sha256=Hr6X_oSP6_N7Txh4QJ9hf7Upb7WYk7fxooGlI0qV_8I,35581
|
|
32
|
-
operate/data/contracts/l2_standard_bridge/contract.py,sha256=
|
|
33
|
-
operate/data/contracts/l2_standard_bridge/contract.yaml,sha256=
|
|
32
|
+
operate/data/contracts/l2_standard_bridge/contract.py,sha256=RTtaoP_nLlOmflwl8znVKxEoKEF0P52Lx0z3UjoCeEU,4522
|
|
33
|
+
operate/data/contracts/l2_standard_bridge/contract.yaml,sha256=K4DdhJ6JWxGnl8PTSwxq3R1o3w_bztvRvmSVzrNMVPg,701
|
|
34
34
|
operate/data/contracts/mech_activity/__init__.py,sha256=DKz-W2SBPIKCrgd4kWvy8B7jVDq2CTo94xcbfCBzkTk,873
|
|
35
35
|
operate/data/contracts/mech_activity/build/MechActivity.json,sha256=lx5_e-lzBUzYG5GbfBbwP9g66eFAIbLcmPu4ivfw4AA,56225
|
|
36
36
|
operate/data/contracts/mech_activity/contract.py,sha256=-MhQOV6iawyzqnAdKL272vlsUTTCtLse_h8bNR1D37Y,1551
|
|
37
|
-
operate/data/contracts/mech_activity/contract.yaml,sha256=
|
|
37
|
+
operate/data/contracts/mech_activity/contract.yaml,sha256=owm7OGHPZjU3GQWciHcH5Ld5Ul9-EvnqolVagtIHTks,695
|
|
38
38
|
operate/data/contracts/optimism_mintable_erc20/__init__.py,sha256=7MXE2uJ_XdnpaBeonWGJotUXd5X5Yg-lHi6g0EodLb0,875
|
|
39
39
|
operate/data/contracts/optimism_mintable_erc20/build/OptimismMintableERC20.json,sha256=77YyAhmsobhckux59r0JWgPd9fgmlSnEAJ_Wef-WwKI,9974
|
|
40
40
|
operate/data/contracts/optimism_mintable_erc20/contract.py,sha256=WDaHgB5iugnpkDF_QRKoIPGhJmk___9y97S7nkbpInY,1566
|
|
41
|
-
operate/data/contracts/optimism_mintable_erc20/contract.yaml,sha256=
|
|
41
|
+
operate/data/contracts/optimism_mintable_erc20/contract.yaml,sha256=kX4RBON_ajqOVJffhKtMSjf0FA0hMuVTUPUbCMaZCz4,717
|
|
42
42
|
operate/data/contracts/recovery_module/__init__.py,sha256=mkoUIiE0NPmybypzUQbYGHOvU5-PSRH5YP2urAS07hE,868
|
|
43
43
|
operate/data/contracts/recovery_module/build/RecoveryModule.json,sha256=QRfZH_dAjXEhCRZMv3VOyEmSn6vy3ggDgXePLYhv6as,60660
|
|
44
44
|
operate/data/contracts/recovery_module/contract.py,sha256=-9eaMdUBXRN-0GCw3hozbc_ZyvrTAi_R0VGnAcDfiI0,1907
|
|
45
|
-
operate/data/contracts/recovery_module/contract.yaml,sha256=
|
|
45
|
+
operate/data/contracts/recovery_module/contract.yaml,sha256=Kxf2GCWPwT0QqjuhsM8eMYNm8YtTWE9y571tYq3NtlE,680
|
|
46
46
|
operate/data/contracts/requester_activity_checker/__init__.py,sha256=BrOe5cib0jItJCsygrAYejy0v16xayRUoJUWubyw1yA,878
|
|
47
47
|
operate/data/contracts/requester_activity_checker/build/RequesterActivityChecker.json,sha256=KbZbZDEred3LvxIY30igz5w9ubaD0-PvDbFdlg7F-y4,9748
|
|
48
48
|
operate/data/contracts/requester_activity_checker/contract.py,sha256=preNvyk8kmtUE0LgEIZMLorYevgCmoxBqI-1STrX0_4,1252
|
|
49
|
-
operate/data/contracts/requester_activity_checker/contract.yaml,sha256=
|
|
49
|
+
operate/data/contracts/requester_activity_checker/contract.yaml,sha256=beEpaau3ahCkrNpn4g3Es7NztLJRYBYSLHfZAj4zoIw,749
|
|
50
50
|
operate/data/contracts/staking_token/__init__.py,sha256=9GisClTvLBaDB3MPIYReUCsncyE16_mRA3ZPdPRobmY,859
|
|
51
51
|
operate/data/contracts/staking_token/build/StakingToken.json,sha256=BMaZE6WuyuO9Wd2PBTAMyCD3RyBCDMKBIarXtrFpViE,56490
|
|
52
|
-
operate/data/contracts/staking_token/contract.py,sha256=
|
|
53
|
-
operate/data/contracts/staking_token/contract.yaml,sha256=
|
|
52
|
+
operate/data/contracts/staking_token/contract.py,sha256=0dzJYUr9ETXqQRSvmiCEGxUJsaaDipI8lhH-oeaMgCE,6369
|
|
53
|
+
operate/data/contracts/staking_token/contract.yaml,sha256=SRItb_W9i0ol16wUvVOWlQOizQXH-DNr9ZF7Xp7bGsc,708
|
|
54
54
|
operate/data/contracts/uniswap_v2_erc20/__init__.py,sha256=zrX0ZiB1EjaN5j6fwVMmsrShkGAuAl2xXre65jHCFhk,868
|
|
55
55
|
operate/data/contracts/uniswap_v2_erc20/build/IUniswapV2ERC20.json,sha256=VQE1d4scixqZDRixk21VJnTJtZS8l7mH9ylm0JetILY,14169
|
|
56
56
|
operate/data/contracts/uniswap_v2_erc20/contract.py,sha256=MwBks4QmZ3XouMT_TqWLn7KFpgwyl1x2EphNEiJEHs0,6985
|
|
57
|
-
operate/data/contracts/uniswap_v2_erc20/contract.yaml,sha256=
|
|
57
|
+
operate/data/contracts/uniswap_v2_erc20/contract.yaml,sha256=t-Yhwtzheb9s52FXEcGGcB-9qGg3cS6yaYN2ymJJdlc,741
|
|
58
58
|
operate/data/contracts/uniswap_v2_erc20/tests/__init__.py,sha256=3Arw8dsCsJz6hVOl0t9UjFASHXbV9yp3hw6x4HqgXpU,847
|
|
59
|
-
operate/data/contracts/uniswap_v2_erc20/tests/test_contract.py,sha256=
|
|
60
|
-
operate/keys.py,sha256=
|
|
61
|
-
operate/ledger/__init__.py,sha256=
|
|
62
|
-
operate/ledger/profiles.py,sha256=
|
|
59
|
+
operate/data/contracts/uniswap_v2_erc20/tests/test_contract.py,sha256=z4GfybA_oZUA6-sl61qaJ78rXdbcW_rk4APzgMzQD38,13456
|
|
60
|
+
operate/keys.py,sha256=qfT3-ZS1R2jG_t7BdqUdgrAYqHnj6dNrtK5c0-_AODU,6179
|
|
61
|
+
operate/ledger/__init__.py,sha256=c41SqGLSpLBvG_q1cPyDh1aunByopsIIC5Mfk1vdmQE,6207
|
|
62
|
+
operate/ledger/profiles.py,sha256=TeNrbLpkpSenHBNHqrZVZjlfYNlmlgZLDXeC67i8VOc,14692
|
|
63
63
|
operate/migration.py,sha256=hdZlhhdkoPPzkOD0CFyNYAp-eqUrVu_PJnw8_PoxpWk,21015
|
|
64
|
-
operate/operate_http/__init__.py,sha256=
|
|
64
|
+
operate/operate_http/__init__.py,sha256=MTS1tMZ5qnA_WzaoeLxlK9IJToMGIpkNr7_vyBeAqZ8,4680
|
|
65
65
|
operate/operate_http/exceptions.py,sha256=4UFzrn-GyDD71RhkaOyFPBynL6TrrtP3eywaaU3o4fc,1339
|
|
66
|
-
operate/operate_types.py,sha256=
|
|
66
|
+
operate/operate_types.py,sha256=TCmbLfJIbo-OyvpMN9PBcfYj94e00zttVPcQ0GnwyWs,13038
|
|
67
67
|
operate/pearl.py,sha256=yrTpSXLu_ML3qT-uNxq3kScOyo31JyxBujiSMfMUbcg,1690
|
|
68
68
|
operate/quickstart/analyse_logs.py,sha256=cAeAL2iUy0Po8Eor70tq54-Ibg-Dn8rkuaS167yjE_I,4198
|
|
69
69
|
operate/quickstart/claim_staking_rewards.py,sha256=K7X1Yq0mxe3qWmFLb1Xu9-Jghhml95lS_LpM_BXii0o,3533
|
|
70
70
|
operate/quickstart/reset_configs.py,sha256=DVPM4mh6Djunwq16hf8lD9-nGkkm7wVtwr2JUXr1if8,3380
|
|
71
71
|
operate/quickstart/reset_password.py,sha256=jEBk2ROR1q8PkTIHlqum7E8PRQtXHwrauiy0_bik3RQ,2394
|
|
72
72
|
operate/quickstart/reset_staking.py,sha256=SB5LZq9EctG4SYn2M6oPZ7R7ARHSFLRGzAqfKkpRcy0,5111
|
|
73
|
-
operate/quickstart/run_service.py,sha256=
|
|
73
|
+
operate/quickstart/run_service.py,sha256=d8CJ5fEODDIq1-0IRAz5O96utlsqr2QzVwKKpLPmU4E,29911
|
|
74
74
|
operate/quickstart/stop_service.py,sha256=a3-1vVyZma2UtFUPKMvVrOso1Iwpz5Rzpus9VAI4qOc,2169
|
|
75
75
|
operate/quickstart/terminate_on_chain_service.py,sha256=5ENU8_mkj06i80lKUX-v1QbLU0YzKeOZDUL1e_jzySE,2914
|
|
76
|
-
operate/quickstart/utils.py,sha256=
|
|
77
|
-
operate/resource.py,sha256=
|
|
76
|
+
operate/quickstart/utils.py,sha256=i1juhJCPkzB7ZKgSk5tNiRmYxGcx8MG-dTjVyC5sKys,9287
|
|
77
|
+
operate/resource.py,sha256=LlHJWw66RLIA9TV3HIQ6p7zZSIqoUvn3ntaVs4eRs-g,5803
|
|
78
78
|
operate/services/__init__.py,sha256=isrThS-Ccu5Sc15JZgkN4uTAVaSg-NwUUSDeTyJEqLk,855
|
|
79
|
-
operate/services/agent_runner.py,sha256=
|
|
79
|
+
operate/services/agent_runner.py,sha256=JGjyrzA5hX4Nuh79h81-dl2hdt74ZkC63t7UsGXY6Rw,7500
|
|
80
80
|
operate/services/deployment_runner.py,sha256=7A94QpZu100BwIk1Q9Cr0SVK5Sj7nTWx2GRCwr0gvaM,30772
|
|
81
81
|
operate/services/funding_manager.py,sha256=S9jYnRQe2m6QDVrkvGS11KFYkbTPrZc0zNygahukHVs,38621
|
|
82
82
|
operate/services/health_checker.py,sha256=dARikrgzU1jEuK4NUqlZ7N0DQq4Ah1ZiRKHmrlh8v-A,11472
|
|
83
|
-
operate/services/manage.py,sha256=
|
|
84
|
-
operate/services/protocol.py,sha256=
|
|
83
|
+
operate/services/manage.py,sha256=el0PPSu2g994qQXmaVdjd47Ut9KDhNPJB2B6_i0yoGI,113640
|
|
84
|
+
operate/services/protocol.py,sha256=ZRnY-irel11jgVL4G1jVE_sZUi1hQUXEClYsmmvamJg,71134
|
|
85
85
|
operate/services/service.py,sha256=GqeS8Fm-iA8UPb4QdDWSHa5uZ-Or0G7po7qT0WfUJWI,45348
|
|
86
86
|
operate/services/utils/__init__.py,sha256=TvioaZ1mfTRUSCtrQoLNAp4WMVXyqEJqFJM4PxSQCRU,24
|
|
87
|
-
operate/services/utils/mech.py,sha256=
|
|
88
|
-
operate/services/utils/tendermint.py,sha256=
|
|
87
|
+
operate/services/utils/mech.py,sha256=98gNw8pMNvv_O34V1blr7JUwenqxFeeyFuXLuSYv10w,3864
|
|
88
|
+
operate/services/utils/tendermint.py,sha256=M4zjF97SOJomhmj97bWKIphnia30lbDie65fs_vy_q8,25686
|
|
89
89
|
operate/settings.py,sha256=0J2E69-Oplo-Ijy-7rzYHc2Q9Xvct-EUMiEdmKKaYOQ,2353
|
|
90
90
|
operate/utils/__init__.py,sha256=EXZ5SQFszLr4qr5oq9bCJ7L4zdjqP6tSCaoOudHyLBQ,5110
|
|
91
|
-
operate/utils/gnosis.py,sha256=
|
|
91
|
+
operate/utils/gnosis.py,sha256=TYAciQRFxhTdDZIa4Z5XT1SOscrUpK8rnNeVkOV4MiY,19042
|
|
92
92
|
operate/utils/single_instance.py,sha256=pmtumg0fFDWWcGzXFXQdLXSW54Zq9qBKgJTEPF6pVW8,9092
|
|
93
93
|
operate/utils/ssl.py,sha256=O5DrDoZD4T4qQuHP8GLwWUVxQ-1qXeefGp6uDJiF2lM,4308
|
|
94
94
|
operate/wallet/__init__.py,sha256=NGiozD3XhvkBi7_FaOWQ8x1thZPK4uGpokJaeDY_o2w,813
|
|
95
|
-
operate/wallet/master.py,sha256=
|
|
96
|
-
operate/wallet/wallet_recovery_manager.py,sha256=
|
|
97
|
-
olas_operate_middleware-0.13.
|
|
98
|
-
olas_operate_middleware-0.13.
|
|
99
|
-
olas_operate_middleware-0.13.
|
|
100
|
-
olas_operate_middleware-0.13.
|
|
101
|
-
olas_operate_middleware-0.13.
|
|
95
|
+
operate/wallet/master.py,sha256=zzEODjWOoqKB0XJQU3sAznOdsmvWEzQkaYLzGe2Lx5o,33515
|
|
96
|
+
operate/wallet/wallet_recovery_manager.py,sha256=Dn0QmOYmmNj4p1X1TVQOrua3fysR3XJ99m6Z3H7tJQI,19792
|
|
97
|
+
olas_operate_middleware-0.13.4.dist-info/METADATA,sha256=i-85usgWmFaUH-7Kv_CasSJ8hGJ9Hyv6cbq2T2-gHHo,1492
|
|
98
|
+
olas_operate_middleware-0.13.4.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
99
|
+
olas_operate_middleware-0.13.4.dist-info/entry_points.txt,sha256=dM1g2I7ODApKQFcgl5J4NGA7pfBTo6qsUTXM-j2OLlw,44
|
|
100
|
+
olas_operate_middleware-0.13.4.dist-info/licenses/LICENSE,sha256=mdBDB-mWKV5Cz4ejBzBiKqan6Z8zVLAh9xwM64O2FW4,11339
|
|
101
|
+
olas_operate_middleware-0.13.4.dist-info/RECORD,,
|
|
@@ -27,11 +27,13 @@ import time
|
|
|
27
27
|
import typing as t
|
|
28
28
|
import uuid
|
|
29
29
|
from abc import ABC, abstractmethod
|
|
30
|
+
from contextlib import suppress
|
|
30
31
|
from dataclasses import dataclass
|
|
31
32
|
|
|
32
33
|
from aea.crypto.base import LedgerApi
|
|
33
34
|
from autonomy.chain.tx import TxSettler
|
|
34
35
|
from web3 import Web3
|
|
36
|
+
from web3.exceptions import TimeExhausted
|
|
35
37
|
|
|
36
38
|
from operate.constants import (
|
|
37
39
|
ON_CHAIN_INTERACT_RETRIES,
|
|
@@ -58,7 +60,7 @@ MESSAGE_EXECUTION_FAILED_SETTLEMENT = (
|
|
|
58
60
|
)
|
|
59
61
|
MESSAGE_REQUIREMENTS_QUOTE_FAILED = "Cannot compute requirements for failed quote."
|
|
60
62
|
|
|
61
|
-
ERC20_APPROVE_SELECTOR = "0x095ea7b3" # First 4 bytes of Web3.keccak(text='approve(address,uint256)').
|
|
63
|
+
ERC20_APPROVE_SELECTOR = "0x095ea7b3" # First 4 bytes of Web3.keccak(text='approve(address,uint256)').to_0x_hex()[:10]
|
|
62
64
|
|
|
63
65
|
|
|
64
66
|
@dataclass
|
|
@@ -370,48 +372,38 @@ class Provider(ABC):
|
|
|
370
372
|
from_address = provider_request.params["from"]["address"]
|
|
371
373
|
wallet = self.wallet_manager.load(chain.ledger_type)
|
|
372
374
|
from_ledger_api = self._from_ledger_api(provider_request)
|
|
373
|
-
tx_settler = TxSettler(
|
|
374
|
-
ledger_api=from_ledger_api,
|
|
375
|
-
crypto=wallet.crypto,
|
|
376
|
-
chain_type=Chain(provider_request.params["from"]["chain"]),
|
|
377
|
-
timeout=ON_CHAIN_INTERACT_TIMEOUT,
|
|
378
|
-
retries=ON_CHAIN_INTERACT_RETRIES,
|
|
379
|
-
sleep=ON_CHAIN_INTERACT_SLEEP,
|
|
380
|
-
)
|
|
381
|
-
tx_hashes = []
|
|
382
375
|
|
|
383
376
|
for tx_label, tx in txs:
|
|
384
377
|
self.logger.info(f"[PROVIDER] Executing transaction {tx_label}.")
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
378
|
+
tx_settler = TxSettler(
|
|
379
|
+
ledger_api=from_ledger_api,
|
|
380
|
+
crypto=wallet.crypto,
|
|
381
|
+
chain_type=Chain(provider_request.params["from"]["chain"]),
|
|
382
|
+
timeout=ON_CHAIN_INTERACT_TIMEOUT,
|
|
383
|
+
retries=ON_CHAIN_INTERACT_RETRIES,
|
|
384
|
+
sleep=ON_CHAIN_INTERACT_SLEEP,
|
|
385
|
+
tx_builder=lambda: {
|
|
386
|
+
**tx, # noqa: B023
|
|
387
|
+
"nonce": from_ledger_api.api.eth.get_transaction_count(
|
|
388
|
+
from_address
|
|
389
|
+
),
|
|
390
|
+
},
|
|
391
|
+
).transact()
|
|
392
|
+
|
|
393
|
+
with suppress(TimeExhausted):
|
|
394
|
+
tx_settler.settle()
|
|
395
|
+
self.logger.info(f"[PROVIDER] Transaction {tx_label} settled.")
|
|
398
396
|
|
|
399
397
|
execution_data = ExecutionData(
|
|
400
398
|
elapsed_time=time.time() - timestamp,
|
|
401
399
|
message=None,
|
|
402
400
|
timestamp=int(timestamp),
|
|
403
|
-
from_tx_hash=
|
|
401
|
+
from_tx_hash=tx_settler.tx_hash,
|
|
404
402
|
to_tx_hash=None,
|
|
405
403
|
provider_data=None,
|
|
406
404
|
)
|
|
407
405
|
provider_request.execution_data = execution_data
|
|
408
|
-
|
|
409
|
-
provider_request.status = ProviderRequestStatus.EXECUTION_PENDING
|
|
410
|
-
else:
|
|
411
|
-
provider_request.execution_data.message = (
|
|
412
|
-
MESSAGE_EXECUTION_FAILED_SETTLEMENT
|
|
413
|
-
)
|
|
414
|
-
provider_request.status = ProviderRequestStatus.EXECUTION_FAILED
|
|
406
|
+
provider_request.status = ProviderRequestStatus.EXECUTION_PENDING
|
|
415
407
|
|
|
416
408
|
except Exception as e: # pylint: disable=broad-except
|
|
417
409
|
self.logger.error(f"[PROVIDER] Error executing request: {e}")
|
operate/cli.py
CHANGED
|
@@ -101,22 +101,7 @@ from operate.wallet.wallet_recovery_manager import (
|
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
# TODO Backport to Open Autonomy
|
|
104
|
-
|
|
105
|
-
"""Check if we should rebuild the transaction."""
|
|
106
|
-
for _error in (
|
|
107
|
-
"wrong transaction nonce",
|
|
108
|
-
"OldNonce",
|
|
109
|
-
"nonce too low",
|
|
110
|
-
"replacement transaction underpriced",
|
|
111
|
-
):
|
|
112
|
-
if _error in error:
|
|
113
|
-
return True
|
|
114
|
-
return False
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
autonomy.chain.tx.ERRORS_TO_RETRY += ("replacement transaction underpriced",)
|
|
118
|
-
autonomy.chain.tx.should_rebuild = should_rebuild
|
|
119
|
-
# End backport to Open Autonomy
|
|
104
|
+
autonomy.chain.tx.ERRORS_TO_RETRY |= {"replacement transaction underpriced"}
|
|
120
105
|
|
|
121
106
|
|
|
122
107
|
DEFAULT_MAX_RETRIES = 3
|
|
@@ -414,7 +399,9 @@ def create_app( # pylint: disable=too-many-locals, unused-argument, too-many-st
|
|
|
414
399
|
return
|
|
415
400
|
|
|
416
401
|
status = funding_job.cancel()
|
|
417
|
-
if
|
|
402
|
+
if status:
|
|
403
|
+
funding_job = None
|
|
404
|
+
else:
|
|
418
405
|
logger.info("Funding job cancellation failed")
|
|
419
406
|
|
|
420
407
|
def pause_all_services_on_startup() -> None:
|
operate/constants.py
CHANGED
|
@@ -39,7 +39,7 @@ class DualStakingTokenContract(Contract):
|
|
|
39
39
|
) -> JSONLike:
|
|
40
40
|
"""Build stake tx."""
|
|
41
41
|
contract_instance = cls.get_instance(ledger_api, contract_address)
|
|
42
|
-
data = contract_instance.
|
|
42
|
+
data = contract_instance.encode_abi("stake", args=[service_id])
|
|
43
43
|
return dict(data=bytes.fromhex(data[2:]))
|
|
44
44
|
|
|
45
45
|
@classmethod
|
|
@@ -50,7 +50,7 @@ class DualStakingTokenContract(Contract):
|
|
|
50
50
|
) -> JSONLike:
|
|
51
51
|
"""Build checkpoint tx."""
|
|
52
52
|
contract_instance = cls.get_instance(ledger_api, contract_address)
|
|
53
|
-
data = contract_instance.
|
|
53
|
+
data = contract_instance.encode_abi("checkpoint")
|
|
54
54
|
return dict(data=bytes.fromhex(data[2:]))
|
|
55
55
|
|
|
56
56
|
@classmethod
|
|
@@ -62,7 +62,7 @@ class DualStakingTokenContract(Contract):
|
|
|
62
62
|
) -> JSONLike:
|
|
63
63
|
"""Build unstake tx."""
|
|
64
64
|
contract_instance = cls.get_instance(ledger_api, contract_address)
|
|
65
|
-
data = contract_instance.
|
|
65
|
+
data = contract_instance.encode_abi("unstake", args=[service_id])
|
|
66
66
|
return dict(data=bytes.fromhex(data[2:]))
|
|
67
67
|
|
|
68
68
|
@classmethod
|
|
@@ -4,11 +4,11 @@ version: 0.1.0
|
|
|
4
4
|
type: contract
|
|
5
5
|
description: Dual staking token contract
|
|
6
6
|
license: Apache-2.0
|
|
7
|
-
aea_version: '>=
|
|
7
|
+
aea_version: '>=2.0.0, <3.0.0'
|
|
8
8
|
fingerprint:
|
|
9
9
|
__init__.py: bafybeickx6ot3syhywbaewl3mmnowa75dd5rogqy7pmmc5ctk4yd74pvoa
|
|
10
10
|
build/DualStakingToken.json: bafybeibvh3lcvo242jqtyrfrbezgziedlymjlr7bmttvezhgjjxlgklcxa
|
|
11
|
-
contract.py:
|
|
11
|
+
contract.py: bafybeihkaxtx36c2yka2bzisj72zsmugbpyse2g7snq3shokjerr35rpse
|
|
12
12
|
fingerprint_ignore_patterns: []
|
|
13
13
|
contracts: []
|
|
14
14
|
class_name: DualStakingTokenContract
|
|
@@ -4,7 +4,7 @@ version: 0.1.0
|
|
|
4
4
|
type: contract
|
|
5
5
|
description: ForeignOmnibridge
|
|
6
6
|
license: Apache-2.0
|
|
7
|
-
aea_version: '>=
|
|
7
|
+
aea_version: '>=2.0.0, <3.0.0'
|
|
8
8
|
fingerprint:
|
|
9
9
|
__init__.py: bafybeibsmumov3s36vfo24xp2niilcp3ywju2d4yqfadllyjncqtgtndly
|
|
10
10
|
build/ForeignOmnibridge.json: bafybeibmcflt7w5p5szgii7glbtrvjahweclowz2k7e6qjq7yfbvszy6em
|
|
@@ -50,7 +50,7 @@ class HomeOmnibridge(Contract):
|
|
|
50
50
|
"""Return the transaction hash of the matching TokensBridged event in the given block range."""
|
|
51
51
|
ledger_api = cast(EthereumApi, ledger_api)
|
|
52
52
|
event_signature = "TokensBridged(address,address,uint256,bytes32)"
|
|
53
|
-
event_signature_hash = Web3.keccak(text=event_signature).
|
|
53
|
+
event_signature_hash = Web3.keccak(text=event_signature).to_0x_hex()
|
|
54
54
|
|
|
55
55
|
topics = [
|
|
56
56
|
event_signature_hash, # TokensBridged
|
|
@@ -75,6 +75,6 @@ class HomeOmnibridge(Contract):
|
|
|
75
75
|
for log in logs:
|
|
76
76
|
decoded = eth_abi.decode(non_indexed_types, log["data"])
|
|
77
77
|
if all(a == b for a, b in zip(decoded, non_indexed_values)):
|
|
78
|
-
return log["transactionHash"].
|
|
78
|
+
return log["transactionHash"].to_0x_hex()
|
|
79
79
|
|
|
80
80
|
return None
|
|
@@ -4,11 +4,11 @@ version: 0.1.0
|
|
|
4
4
|
type: contract
|
|
5
5
|
description: HomeOmnibridge
|
|
6
6
|
license: Apache-2.0
|
|
7
|
-
aea_version: '>=
|
|
7
|
+
aea_version: '>=2.0.0, <3.0.0'
|
|
8
8
|
fingerprint:
|
|
9
9
|
__init__.py: bafybeigrlrmwk3dhnoe4o5ovygtmudik7ybhsx2etqqjpvdi65rtlfpuhe
|
|
10
10
|
build/HomeOmnibridge.json: bafybeihm4ff4mhoca2iwcogg5srqe2x6p674uxxc3v5dcci4emxfgc7qpm
|
|
11
|
-
contract.py:
|
|
11
|
+
contract.py: bafybeickvhwco3ccqfe3usnzvvxayvbpuhv2aoiryroehqqpfylap7h2f4
|
|
12
12
|
fingerprint_ignore_patterns: []
|
|
13
13
|
contracts: []
|
|
14
14
|
class_name: HomeOmnibridge
|
|
@@ -4,7 +4,7 @@ version: 0.1.0
|
|
|
4
4
|
type: contract
|
|
5
5
|
description: Optimism L1 Standard Bridge
|
|
6
6
|
license: Apache-2.0
|
|
7
|
-
aea_version: '>=
|
|
7
|
+
aea_version: '>=2.0.0, <3.0.0'
|
|
8
8
|
fingerprint:
|
|
9
9
|
__init__.py: bafybeifsbxn6hlccnpgqnpvaz3ph6ajl4is4mcyerr6aqp7heggagcphye
|
|
10
10
|
build/L1StandardBridge.json: bafybeidq6jt7zmedtuxbbyggiqhu7w6543bunyd2vrbibg6y2svxsi2q5m
|
|
@@ -50,7 +50,7 @@ class L2StandardBridge(Contract):
|
|
|
50
50
|
"""Return the transaction hash of the matching ETHBridgeFinalized event in the given block range."""
|
|
51
51
|
ledger_api = cast(EthereumApi, ledger_api)
|
|
52
52
|
event_signature = "ETHBridgeFinalized(address,address,uint256,bytes)"
|
|
53
|
-
event_signature_hash = Web3.keccak(text=event_signature).
|
|
53
|
+
event_signature_hash = Web3.keccak(text=event_signature).to_0x_hex()
|
|
54
54
|
|
|
55
55
|
topics = [
|
|
56
56
|
event_signature_hash, # ETHBridgeFinalized
|
|
@@ -75,7 +75,7 @@ class L2StandardBridge(Contract):
|
|
|
75
75
|
for log in logs:
|
|
76
76
|
decoded = eth_abi.decode(non_indexed_types, log["data"])
|
|
77
77
|
if all(a == b for a, b in zip(decoded, non_indexed_values)):
|
|
78
|
-
return log["transactionHash"].
|
|
78
|
+
return log["transactionHash"].to_0x_hex()
|
|
79
79
|
|
|
80
80
|
return None
|
|
81
81
|
|
|
@@ -98,7 +98,7 @@ class L2StandardBridge(Contract):
|
|
|
98
98
|
event_signature = (
|
|
99
99
|
"ERC20BridgeFinalized(address,address,address,address,uint256,bytes)"
|
|
100
100
|
)
|
|
101
|
-
event_signature_hash = Web3.keccak(text=event_signature).
|
|
101
|
+
event_signature_hash = Web3.keccak(text=event_signature).to_0x_hex()
|
|
102
102
|
|
|
103
103
|
topics = [
|
|
104
104
|
event_signature_hash, # ERC20BridgeFinalized
|
|
@@ -125,6 +125,6 @@ class L2StandardBridge(Contract):
|
|
|
125
125
|
for log in logs:
|
|
126
126
|
decoded = eth_abi.decode(non_indexed_types, log["data"])
|
|
127
127
|
if all(a == b for a, b in zip(decoded, non_indexed_values)):
|
|
128
|
-
return log["transactionHash"].
|
|
128
|
+
return log["transactionHash"].to_0x_hex()
|
|
129
129
|
|
|
130
130
|
return None
|
|
@@ -4,11 +4,11 @@ version: 0.1.0
|
|
|
4
4
|
type: contract
|
|
5
5
|
description: Optimism L2 Standard Bridge
|
|
6
6
|
license: Apache-2.0
|
|
7
|
-
aea_version: '>=
|
|
7
|
+
aea_version: '>=2.0.0, <3.0.0'
|
|
8
8
|
fingerprint:
|
|
9
9
|
__init__.py: bafybeihp3ucqaxnuozotqcmvm6bjdds4rfbtr56sj7jeb6sbxlzikvtxyq
|
|
10
10
|
build/L2StandardBridge.json: bafybeid2zqptx4awocztkhmifqsdnqrqcib73hbsp53snmfd24u7k3q6me
|
|
11
|
-
contract.py:
|
|
11
|
+
contract.py: bafybeiehyezv2ijyt5onme6ttbp5bmncarcoktsk3f3qxwmedjbhknjifi
|
|
12
12
|
fingerprint_ignore_patterns: []
|
|
13
13
|
contracts: []
|
|
14
14
|
class_name: L2StandardBridge
|
|
@@ -4,7 +4,7 @@ version: 0.1.0
|
|
|
4
4
|
type: contract
|
|
5
5
|
description: Mech activity checker contract
|
|
6
6
|
license: Apache-2.0
|
|
7
|
-
aea_version: '>=
|
|
7
|
+
aea_version: '>=2.0.0, <3.0.0'
|
|
8
8
|
fingerprint:
|
|
9
9
|
__init__.py: bafybeid4hg5rx75ltdjmekmxdddwqzbvblygmvlhws5samjxfirnkp666i
|
|
10
10
|
build/MechActivity.json: bafybeiagrufcoljrlo2zklc7kxwh7eyrf67usos2bqnf7hss47hgm6low4
|
|
@@ -4,7 +4,7 @@ version: 0.1.0
|
|
|
4
4
|
type: contract
|
|
5
5
|
description: Optimism Mintable ERC20
|
|
6
6
|
license: Apache-2.0
|
|
7
|
-
aea_version: '>=
|
|
7
|
+
aea_version: '>=2.0.0, <3.0.0'
|
|
8
8
|
fingerprint:
|
|
9
9
|
__init__.py: bafybeiffqotbwpjde3htgfuplg62x4btoekvitqrkrlx2vkjpciwzov6sy
|
|
10
10
|
build/OptimismMintableERC20.json: bafybeieuzn55dh5zlg4ygtuifqso6hwbhsjvidxkjkh2vnah5psxqup62i
|
|
@@ -4,7 +4,7 @@ version: 0.1.0
|
|
|
4
4
|
type: contract
|
|
5
5
|
description: Recovery module
|
|
6
6
|
license: Apache-2.0
|
|
7
|
-
aea_version: '>=
|
|
7
|
+
aea_version: '>=2.0.0, <3.0.0'
|
|
8
8
|
fingerprint:
|
|
9
9
|
__init__.py: bafybeicjlkmxs5ikpgdtgndifstpmmpaixwcbgouvmt6gowuhf5dy3dpgu
|
|
10
10
|
build/RecoveryModule.json: bafybeifsyjdbprcp4kxpijlpqfovxcf7cv2ujapt3d5zn34wby26ldv4ky
|
|
@@ -4,7 +4,7 @@ version: 0.1.0
|
|
|
4
4
|
type: contract
|
|
5
5
|
description: Requester activity checker contract
|
|
6
6
|
license: Apache-2.0
|
|
7
|
-
aea_version: '>=
|
|
7
|
+
aea_version: '>=2.0.0, <3.0.0'
|
|
8
8
|
fingerprint:
|
|
9
9
|
__init__.py: bafybeihibyzldqy5ecqvxdhnpejol5hkophsu53slyfmtpobts55zvyoba
|
|
10
10
|
build/RequesterActivityChecker.json: bafybeiaaklcnrqr3tmxq3vdf3hqqbodknqaa2xfx7ltnp22bcjcfaj2yku
|
|
@@ -53,7 +53,7 @@ class StakingTokenContract(Contract):
|
|
|
53
53
|
) -> JSONLike:
|
|
54
54
|
"""Build stake tx."""
|
|
55
55
|
contract_instance = cls.get_instance(ledger_api, contract_address)
|
|
56
|
-
data = contract_instance.
|
|
56
|
+
data = contract_instance.encode_abi("stake", args=[service_id])
|
|
57
57
|
return dict(data=bytes.fromhex(data[2:]))
|
|
58
58
|
|
|
59
59
|
@classmethod
|
|
@@ -64,7 +64,7 @@ class StakingTokenContract(Contract):
|
|
|
64
64
|
) -> JSONLike:
|
|
65
65
|
"""Build checkpoint tx."""
|
|
66
66
|
contract_instance = cls.get_instance(ledger_api, contract_address)
|
|
67
|
-
data = contract_instance.
|
|
67
|
+
data = contract_instance.encode_abi("checkpoint")
|
|
68
68
|
return dict(data=bytes.fromhex(data[2:]))
|
|
69
69
|
|
|
70
70
|
@classmethod
|
|
@@ -76,7 +76,7 @@ class StakingTokenContract(Contract):
|
|
|
76
76
|
) -> JSONLike:
|
|
77
77
|
"""Build unstake tx."""
|
|
78
78
|
contract_instance = cls.get_instance(ledger_api, contract_address)
|
|
79
|
-
data = contract_instance.
|
|
79
|
+
data = contract_instance.encode_abi("unstake", args=[service_id])
|
|
80
80
|
return dict(data=bytes.fromhex(data[2:]))
|
|
81
81
|
|
|
82
82
|
@classmethod
|
|
@@ -4,11 +4,11 @@ version: 0.1.0
|
|
|
4
4
|
type: contract
|
|
5
5
|
description: Service staking token contract
|
|
6
6
|
license: Apache-2.0
|
|
7
|
-
aea_version: '>=
|
|
7
|
+
aea_version: '>=2.0.0, <3.0.0'
|
|
8
8
|
fingerprint:
|
|
9
9
|
__init__.py: bafybeicmgkagyhgwn2ktcdjbprijalbdyj26cvza4d3b7uvmehvy4mmr3i
|
|
10
10
|
build/StakingToken.json: bafybeibhcwyawq377innrpq4ytpw5kotufjqo7cyd2rjhyit34mnbks5b4
|
|
11
|
-
contract.py:
|
|
11
|
+
contract.py: bafybeickf3qfsscyieceoxxjoqkmecymkgkeqnarmcblprsowvubbqf7am
|
|
12
12
|
fingerprint_ignore_patterns: []
|
|
13
13
|
contracts: []
|
|
14
14
|
class_name: StakingTokenContract
|
|
@@ -4,13 +4,13 @@ version: 0.1.0
|
|
|
4
4
|
type: contract
|
|
5
5
|
description: Uniswap V2 ERC20 contract
|
|
6
6
|
license: Apache-2.0
|
|
7
|
-
aea_version: '>=
|
|
7
|
+
aea_version: '>=2.0.0, <3.0.0'
|
|
8
8
|
fingerprint:
|
|
9
9
|
__init__.py: bafybeia75xbvf6zogcloppdcu2zrwcl6d46ebj2zmm6dkge6eno3k6ysw4
|
|
10
10
|
build/IUniswapV2ERC20.json: bafybeid45gy6x5ah5ub5p2obdhph36skpoy5qdhikwwfso7f3655iqnpc4
|
|
11
|
-
contract.py:
|
|
11
|
+
contract.py: bafybeiarfpumhdmxh24xuiv6jprjq5f6qlrfrlxisz5enbvvbhotafp37e
|
|
12
12
|
tests/__init__.py: bafybeigj3ngmfmyy4nw4xipxbqnx4nd42aqidqmmduwpx6hurssjqqkirq
|
|
13
|
-
tests/test_contract.py:
|
|
13
|
+
tests/test_contract.py: bafybeic6ttl2zbcr5tfrfw6mwdumjw7lwjdy5pgeafacp6ch2sxstwd3lm
|
|
14
14
|
fingerprint_ignore_patterns: []
|
|
15
15
|
contracts: []
|
|
16
16
|
class_name: UniswapV2ERC20Contract
|
|
@@ -68,7 +68,7 @@ class TestUniswapV2ERC20Contract(BaseContractTestCase):
|
|
|
68
68
|
approval_value = 100
|
|
69
69
|
data = self.contract.get_instance(
|
|
70
70
|
self.ledger_api, self.contract_address
|
|
71
|
-
).
|
|
71
|
+
).encode_abi(abi_element_identifier="approve", args=[spender_address, approval_value])
|
|
72
72
|
with mock.patch.object(
|
|
73
73
|
self.ledger_api.api.eth, "get_transaction_count", return_value=NONCE
|
|
74
74
|
):
|
|
@@ -102,7 +102,7 @@ class TestUniswapV2ERC20Contract(BaseContractTestCase):
|
|
|
102
102
|
value = 100
|
|
103
103
|
data = self.contract.get_instance(
|
|
104
104
|
self.ledger_api, self.contract_address
|
|
105
|
-
).
|
|
105
|
+
).encode_abi(abi_element_identifier="transfer", args=[spender_address, value])
|
|
106
106
|
with mock.patch.object(
|
|
107
107
|
self.ledger_api.api.eth, "get_transaction_count", return_value=NONCE
|
|
108
108
|
):
|
|
@@ -137,7 +137,7 @@ class TestUniswapV2ERC20Contract(BaseContractTestCase):
|
|
|
137
137
|
value = 100
|
|
138
138
|
data = self.contract.get_instance(
|
|
139
139
|
self.ledger_api, self.contract_address
|
|
140
|
-
).
|
|
140
|
+
).encode_abi(abi_element_identifier="transferFrom", args=[from_address, to_address, value])
|
|
141
141
|
with mock.patch.object(
|
|
142
142
|
self.ledger_api.api.eth, "get_transaction_count", return_value=NONCE
|
|
143
143
|
):
|
|
@@ -177,8 +177,8 @@ class TestUniswapV2ERC20Contract(BaseContractTestCase):
|
|
|
177
177
|
s = b""
|
|
178
178
|
data = self.contract.get_instance(
|
|
179
179
|
self.ledger_api, self.contract_address
|
|
180
|
-
).
|
|
181
|
-
|
|
180
|
+
).encode_abi(
|
|
181
|
+
abi_element_identifier="permit",
|
|
182
182
|
args=[owner_address, spender_address, value, deadline, v, r, s],
|
|
183
183
|
)
|
|
184
184
|
with mock.patch.object(
|