forked from defi-wonderland/phuture-keeper-scripts
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from connext/4681-wormhole-updates
4681 wormhole updates
- Loading branch information
Showing
8 changed files
with
1,428 additions
and
991 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,26 +26,26 @@ | |
}, | ||
"dependencies": { | ||
"@arbitrum/sdk": "3.1.3", | ||
"@connext/nxtp-adapters-subgraph": "^2.0.0-alpha.1", | ||
"@connext/nxtp-utils": "^2.0.3", | ||
"@eth-optimism/sdk": "^2.1.0", | ||
"@flashbots/ethers-provider-bundle": "^0.6.2", | ||
"@connext/nxtp-adapters-subgraph": "2.0.0", | ||
"@connext/nxtp-utils": "2.0.4", | ||
"@eth-optimism/sdk": "2.1.0", | ||
"@flashbots/ethers-provider-bundle": "0.6.2", | ||
"@keep3r-network/keeper-scripting-utils": "1.1.0", | ||
"dotenv": "16.1.4", | ||
"ethers": "5.6.9", | ||
"interval-promise": "^1.4.0", | ||
"interval-promise": "1.4.0", | ||
"lodash.isequal": "4.5.0", | ||
"undici": "5.22.1", | ||
"zksync-web3": "^0.14.4" | ||
"zksync-web3": "0.14.3" | ||
}, | ||
"devDependencies": { | ||
"@dethcrypto/eth-sdk": "0.3.4", | ||
"@dethcrypto/eth-sdk-client": "0.1.6", | ||
"@types/lodash.isequal": "4.5.6", | ||
"husky": "^8.0.3", | ||
"lint-staged": "^13.2.2", | ||
"husky": "8.0.3", | ||
"lint-staged": "13.2.3", | ||
"ts-node": "10.9.1", | ||
"typechain": "^8.2.0", | ||
"typechain": "8.2.0", | ||
"typescript": "5.1.3", | ||
"xo": "0.54.2" | ||
}, | ||
|
@@ -69,7 +69,8 @@ | |
"new-cap": "off", | ||
"no-await-in-loop": "off", | ||
"@typescript-eslint/no-unsafe-argument": "off", | ||
"import/no-extraneous-dependencies": "warn" | ||
"import/no-extraneous-dependencies": "warn", | ||
"unicorn/prefer-top-level-await": "warn" | ||
} | ||
}, | ||
"packageManager": "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
import {Contract} from 'ethers'; | ||
import {utils} from 'ethers'; | ||
import {getMainnetSdk} from '@dethcrypto/eth-sdk-client'; | ||
|
||
import {type ExtraPropagateParameters, type InitialSetup} from 'src/utils/types'; | ||
|
||
export const getPropagateParameters = async ({txSigner, provider}: InitialSetup): Promise<ExtraPropagateParameters> => { | ||
const mainnetSdk = getMainnetSdk(txSigner); | ||
const ambAddress = await mainnetSdk.bnbHubConnector.AMB(); | ||
|
||
const ambContract = new Contract( | ||
ambAddress, | ||
['function calcSrcFees(string calldata _appID, uint256 _toChainID, uint256 _dataLength) external view returns (uint256)'], | ||
provider, | ||
); | ||
const fee = await ambContract.calcSrcFees('', 56, 32); | ||
// See: https://github.com/connext/monorepo/blob/e28db100e55d28d8a9d509959d603f9ced58de25/packages/agents/lighthouse/src/tasks/propagate/helpers/bnb.ts#L54-L57 | ||
const gasLimit = '200000'; | ||
const fee = await mainnetSdk.bnbHubConnector.quoteEVMDeliveryPrice(gasLimit, ambAddress); | ||
const encodedData = utils.defaultAbiCoder.encode(['uint256'], [gasLimit]); | ||
|
||
return {connector: '', fee, encodedData: '0x'}; | ||
return {connector: '', fee: fee.toString(), encodedData}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.