-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: implement evm execute * chore: fix lint * chore: support all evm chain in evm package * chore: support missing chains for evm client in testnet * chore: refactor * chore: uncomment check for tx.approved * chore: add tests * docs(changeset): feat: add evmExecute for transaction-recovery package * chore: add comments * chore: add a bit more comment * chore: fix lock files * chore: merge pnpm-lock.yaml * chore: fix test * chore: remove .only
- Loading branch information
Showing
16 changed files
with
11,073 additions
and
13,808 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@axelarjs/transaction-recovery": patch | ||
"@axelarjs/api": patch | ||
"@axelarjs/evm": patch | ||
--- | ||
|
||
feat: add evmExecute for transaction-recovery package |
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
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,31 @@ | ||
import { defineChain } from "viem"; | ||
|
||
export const centrifuge = defineChain({ | ||
id: 2090, | ||
name: "Centrifuge", | ||
network: "centrifuge", | ||
nativeCurrency: { name: "Centrifuge", symbol: "CFG", decimals: 18 }, | ||
rpcUrls: { | ||
default: { | ||
http: ["https://fullnode.parachain.centrifuge.io"], | ||
}, | ||
}, | ||
blockExplorers: { | ||
default: { | ||
name: "Centrifuge Explorer", | ||
url: "https://centrifuge.subscan.io/", | ||
}, | ||
}, | ||
}); | ||
|
||
export const centrifugeTestnet = defineChain({ | ||
id: 2032, | ||
name: "Centrifuge Testnet", | ||
network: "centrifuge", | ||
nativeCurrency: { name: "Centrifuge", symbol: "CFG", decimals: 18 }, | ||
rpcUrls: { | ||
default: { | ||
http: [""], // TODO: Add testnet RPC URL | ||
}, | ||
}, | ||
}); |
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
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,26 @@ | ||
import { createAxelarscanClient } from "@axelarjs/api"; | ||
import { createAxelarConfigClient } from "@axelarjs/api/axelar-config"; | ||
import { createAxelarQueryClient } from "@axelarjs/api/axelar-query"; | ||
import { createGMPClient } from "@axelarjs/api/gmp"; | ||
|
||
import { evmExecute as baseEvmExecute } from "./isomorphic"; | ||
import type { EvmExecuteParams } from "./types"; | ||
|
||
/** | ||
* A wrapper function for executing EVM transaction on the destination chain. | ||
* | ||
* @param params - An object containing parameters for the EVM execution, including the environment. | ||
* @returns The result of the EVM execution. | ||
*/ | ||
export function evmExecute(params: EvmExecuteParams) { | ||
const { environment } = params; | ||
|
||
return baseEvmExecute(params, { | ||
axelarscanClient: createAxelarscanClient(environment), | ||
axelarQueryClient: createAxelarQueryClient(environment), | ||
configClient: createAxelarConfigClient(environment), | ||
gmpClient: createGMPClient(environment), | ||
}); | ||
} | ||
|
||
export default evmExecute; |
Oops, something went wrong.