Skip to content

Commit

Permalink
Fix linea stargate helper
Browse files Browse the repository at this point in the history
  • Loading branch information
AAweidai committed Apr 15, 2024
1 parent 363b6d4 commit 4e5543e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ethereum/scripts/deploy_helper.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# @Time : 2023/9/21 11:13
# @Author : WeiDai
# @FileName: deploy_helper.py
import hashlib

from brownie import ContractDeployerFactory, StargateHelper, config, accounts, Contract, web3

from scripts.helpful_scripts import get_account


def deploy_helper_direct():
StargateHelper.deploy({"from": get_account()})


def main():
acc = get_account()
deploy_acc = accounts.add(config["wallets"]["create_key"])
acc.transfer(deploy_acc.address, int(0.03 * 1e18))
acc.transfer(deploy_acc.address, int(0.001 * 1e18))

ContractDeployerFactory.deploy({"from": deploy_acc})
print(f"Deploy:{ContractDeployerFactory[-1]}")
Expand All @@ -27,7 +29,7 @@ def main():


def decode_stargate_payload():
helper = Contract.from_abi("StargateHelper", "0x44c974f2d53647af76b9acc9c282b7dcf483de19", StargateHelper.abi)
helper = Contract.from_abi("StargateHelper", "0x46aa8f8FF3E04b79f87dCBE9eA9ED5BeA800e756", StargateHelper.abi)
payload = "0x252f7b01000000000000000000000000000000000000000000000000000000000000006f0000000000000000000000009d1b1669c73b033dfe47ae5a0164ab96df25b944000000000000000000000000000000000000000000000000000000000018083bf8a310acdcbf036d6b1fa154ccac59f968c8ba1d99588827c6008950a97df814f8a310acdcbf036d6b1fa154ccac59f968c8ba1d99588827c6008950a97df81400000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000004540000000000000000000000004d73adb72bc3dd368966edd0f0b2148401a178e2000000000006027e006f701a95707a0290ac8b90b3719e8ee5b210360883006a9d1b1669c73b033dfe47ae5a0164ab96df25b9440000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000061a6300000000000000000000000000000000000000000000000000000000002b42a200000000000000000000000000000000000000000000000000000193a554624f000000000000000000000000000000000000000000000000000000000018b159000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000039a000000000000000000000000000000000000000000000000000000000018b52300000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000143b83d454a50abe06d94cb0d5d367825e190bda8f00000000000000000000000000000000000000000000000000000000000000000000000000000000000001da2967e7bb9daa5711ac332caf874bd47ef99b38202967e7bb9daa5711ac332caf874bd47ef99b3820203d4b0f1f4588770e301f4ee2e60f15c400000000650ba2bf0351aa260d0db5a314e4b3a75530ae255840807bc83506e059326516ee14000000000000000000000000000000000000000001011460ae616a2155ee3d9a68541ba4544862310933d414b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e1400000000000000000000000000000000000000000124676528d100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000270b6f8f4d6512500000000000000000000000000000000000000000000000000000000000000a00000000000000000000000002967e7bb9daa5711ac332caf874bd47ef99b382000000000000000000000000000000000000000000000000000000000650cf4400000000000000000000000000000000000000000000000000000000000000003000000000000000000000000b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e0000000000000000000000009702230a8ea53601f5cd2dc00fdbc13d4df4a8c7000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c7000000000000000000000000000000000000"
soDiamond = "0x2967E7Bb9DaA5711Ac332cAF874BD47ef99B3820"
result = helper.tryFindStargatePayload(payload, soDiamond)
Expand Down
5 changes: 5 additions & 0 deletions ethereum/scripts/relayer/stargate_compensate.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
"dstNet": "mantle-main",
"dstChainId": 5000
},
{
"dstSoDiamond": "0x6e166933CACB57b40f5C5D1a2D275aD997A7D318",
"dstNet": "linea-main",
"dstChainId": 59144
},
]


Expand Down

0 comments on commit 4e5543e

Please sign in to comment.