-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: create account estimate fees (#22)
- Loading branch information
Showing
16 changed files
with
1,120 additions
and
97 deletions.
There are no files selected for viewing
605 changes: 605 additions & 0 deletions
605
src/chains/evm/common/constants/abi/wormhole-data-adapter-abi.ts
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { concat } from "viem"; | ||
|
||
import { | ||
UINT16_LENGTH, | ||
UINT256_LENGTH, | ||
} from "../../../../common/constants/bytes.js"; | ||
import { convertNumberToBytes } from "../../../../common/utils/bytes.js"; | ||
|
||
import type { GenericAddress } from "../../../../common/types/chain.js"; | ||
import type { AdapterType } from "../../../../common/types/message.js"; | ||
import type { Hex } from "viem"; | ||
|
||
export function encodeWormholeEvmPayloadWithMetadata( | ||
returnAdapterId: AdapterType, | ||
returnGasLimit: bigint, | ||
sender: GenericAddress, | ||
handler: GenericAddress, | ||
payload: Hex, | ||
): Hex { | ||
return concat([ | ||
convertNumberToBytes(returnAdapterId, UINT16_LENGTH), | ||
convertNumberToBytes(returnGasLimit, UINT256_LENGTH), | ||
sender, | ||
handler, | ||
payload, | ||
]); | ||
} |
Oops, something went wrong.