Skip to content

Commit cb2c6a5

Browse files
committed
chore: add ccm
1 parent 54cf42d commit cb2c6a5

File tree

1 file changed

+29
-6
lines changed

1 file changed

+29
-6
lines changed

scripts/contracts_utils.py

+29-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
sys.path.append(os.path.abspath("tests"))
55
from consts import *
6-
from brownie import accounts, KeyManager, Vault, network
6+
from brownie import accounts, KeyManager, Vault, network, web3
77
from shared_tests import *
88
import re
99

@@ -54,13 +54,14 @@ def send_transferFallback():
5454
# Insert the address of the vault contract for the network
5555
vault = Vault.at("0xF5e10380213880111522dd0efD3dbb45b9f62Bcc")
5656

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.
5859
# 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
5960
sig = 105443778774230036821222798164959664336048410063990219863188006721837015465009
6061
nonce = 7227
6162
kTimesGAddress = "0x6c87aef85c3342deaecc056aecaf62f61af62233"
6263

63-
# Insert [token, recipitent, amount]
64+
# Insert [token, recipient, amount]
6465
transferParams = [
6566
NATIVE_ADDR,
6667
"0xf112f5d0995e17bfe5021fea90c3a6fac875664e",
@@ -81,13 +82,13 @@ def send_allBatch():
8182
# Insert the address of the vault contract for the network
8283
vault = Vault.at("0x2bb150e6d4366A1BDBC4275D1F35892CD63F27e3")
8384

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.
8586
sigData = [
8687
53564996668499050857217723416332709030557380600265126346613536706207704396933,
8788
584,
8889
"0xd1714973cbd82edad9c1af48cb21abd54283e366",
8990
]
90-
# [token, recipitent, amount]
91+
# [token, recipient, amount]
9192
transferParams = [
9293
NATIVE_ADDR,
9394
"0x8c952cc18969129a1c67297332a0b6558eb0bfec",
@@ -97,12 +98,34 @@ def send_allBatch():
9798
tx = vault.allBatch(sigData, [], [], [transferParams], {"from": DEPLOYER})
9899
tx.info()
99100

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()
100123

101124
def send_rotation():
102125
# Insert the address of the Key Manager contract for the network
103126
keyManager = KeyManager.at("0x18195b0E3c33EeF3cA6423b1828E0FE0C03F32Fd")
104127

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.
106129
sigData = [
107130
15744132089818751460223478396489526259646805948031235684624463192235106336468,
108131
587,

0 commit comments

Comments
 (0)