3
3
4
4
sys .path .append (os .path .abspath ("tests" ))
5
5
from consts import *
6
- from brownie import accounts , KeyManager , Vault , network
6
+ from brownie import accounts , KeyManager , Vault , network , web3
7
7
from shared_tests import *
8
8
import re
9
9
@@ -54,13 +54,14 @@ def send_transferFallback():
54
54
# Insert the address of the vault contract for the network
55
55
vault = Vault .at ("0xF5e10380213880111522dd0efD3dbb45b9f62Bcc" )
56
56
57
- # Get the sig data from the signed tx. Will look like this and can be converted straight away to a uint.
57
+ # Get the sig data from the signed tx or decode the raw bytes via decode_vault_call.
58
+ # Sig might look like this and shall be converted straight away to a uint.
58
59
# sig: 105,443,778,774,230,036,821,222,798,164,959,664,336,048,410,063,990,219,863,188,006,721,837,015,465,009
59
60
sig = 105443778774230036821222798164959664336048410063990219863188006721837015465009
60
61
nonce = 7227
61
62
kTimesGAddress = "0x6c87aef85c3342deaecc056aecaf62f61af62233"
62
63
63
- # Insert [token, recipitent , amount]
64
+ # Insert [token, recipient , amount]
64
65
transferParams = [
65
66
NATIVE_ADDR ,
66
67
"0xf112f5d0995e17bfe5021fea90c3a6fac875664e" ,
@@ -81,13 +82,13 @@ def send_allBatch():
81
82
# Insert the address of the vault contract for the network
82
83
vault = Vault .at ("0x2bb150e6d4366A1BDBC4275D1F35892CD63F27e3" )
83
84
84
- # Get the sig data from the signed tx as in the send_transferFallback function .
85
+ # Get the sig data from the signed tx or decode the raw bytes via decode_vault_call .
85
86
sigData = [
86
87
53564996668499050857217723416332709030557380600265126346613536706207704396933 ,
87
88
584 ,
88
89
"0xd1714973cbd82edad9c1af48cb21abd54283e366" ,
89
90
]
90
- # [token, recipitent , amount]
91
+ # [token, recipient , amount]
91
92
transferParams = [
92
93
NATIVE_ADDR ,
93
94
"0x8c952cc18969129a1c67297332a0b6558eb0bfec" ,
@@ -97,12 +98,34 @@ def send_allBatch():
97
98
tx = vault .allBatch (sigData , [], [], [transferParams ], {"from" : DEPLOYER })
98
99
tx .info ()
99
100
101
+ def send_ccm ():
102
+ # Insert the address of the vault contract for the network
103
+ vault = Vault .at ("0x79001a5e762f3befc8e5871b42f6734e00498920" )
104
+
105
+ # Get the sig data from the signed tx or decode the raw bytes via decode_vault_call.
106
+ sigData = [
107
+ 22693291636675602011791116506026624476735317944893560308690927511849435500000 ,
108
+ 6247 ,
109
+ "0xa5b6a41b2c74BCbD0975FA3F69614b5149A1508A" ,
110
+ ]
111
+ # [token, recipient, amount]
112
+ transferParams = [
113
+ NATIVE_ADDR ,
114
+ "0xce16F69375520ab01377ce7B88f5BA8C48F8D666" ,
115
+ 11560083268210087 ,
116
+ ]
117
+ message = "0x"
118
+
119
+ tx = vault .executexSwapAndCall (sigData , transferParams , 5 , b"" , message , {"from" : DEPLOYER })
120
+ # tx = vault.executexSwapAndCall.call(sigData, transferParams, 5, b"", message, {"from": DEPLOYER})
121
+ print (tx )
122
+ tx .info ()
100
123
101
124
def send_rotation ():
102
125
# Insert the address of the Key Manager contract for the network
103
126
keyManager = KeyManager .at ("0x18195b0E3c33EeF3cA6423b1828E0FE0C03F32Fd" )
104
127
105
- # Get the sig data from the signed tx as in the send_transferFallback function .
128
+ # Get the sig data from the signed tx or decode the raw bytes via decode_vault_call .
106
129
sigData = [
107
130
15744132089818751460223478396489526259646805948031235684624463192235106336468 ,
108
131
587 ,
0 commit comments