mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-09 07:28:05 -05:00
* feat: split postman and sdk * fix: update postman client and sendMessage script * fix: clean the sdk * fix: update sdk dependencies * fix: remove .env.sample file * fix: remove testing helpers from the build * fix: update gas provider in linea sdk and update postman client * fix: update postman dependencies * fix: update postman dockerfile and fix tests imports and types * fix: remove unused code in the sdk + move typechain folder * fix: remove unused code + fix imports in postman * fix: pnpm lock file issue * fix: import issue * fix: case sensitive file issue * fix: update sdk fees options and update exports * fix: remove postman unused code and adjust imports and tests * fix: update contracts abis + clean error parsing * fix: update postman based on new SDk changes * add readme + remove unused interface in postman * fix: rename Base.ts file to BaseError.ts * fix: rename Base.ts file to BaseError.ts in postman * chore: update readme for the postman * fix: rename maxFeePerGas to maxFeePerGasCap * fix: update DefaultGasProvider fees check * fix: default gas provider test issue * fix: update main ci filter * fix: issue in default gas provider
19 lines
440 B
TypeScript
19 lines
440 B
TypeScript
import { ethers } from "ethers";
|
|
|
|
export async function encodeSendMessage(
|
|
sender: string,
|
|
receiver: string,
|
|
fee: bigint,
|
|
amount: bigint,
|
|
messageNonce: bigint,
|
|
calldata: string,
|
|
) {
|
|
const abiCoder = new ethers.AbiCoder();
|
|
const data = abiCoder.encode(
|
|
["address", "address", "uint256", "uint256", "uint256", "bytes"],
|
|
[sender, receiver, fee, amount, messageNonce, calldata],
|
|
);
|
|
|
|
return ethers.keccak256(data);
|
|
}
|