Skip to content

Commit cacc72d

Browse files
committed
"feat: finished all integrations for injective-plugin"
1 parent cd2099c commit cacc72d

18 files changed

+83
-35
lines changed

packages/plugin-injective/src/action/auction.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ export const MsgBidAction = createGenericAction({
6262
validateContent: () => true,
6363
});
6464

65-
export const AuctionActions = {
65+
export const AuctionActions = [
6666
GetAuctionModuleParamsAction,
6767
GetAuctionModuleStateAction,
6868
GetCurrentBasketAction,
6969
GetAuctionRoundAction,
7070
GetAuctionsAction,
7171
MsgBidAction,
72-
};
72+
];

packages/plugin-injective/src/action/auth.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export const MsgRevokeAction = createGenericAction({
102102
validateContent: () => true,
103103
});
104104

105-
export const AuthActions = {
105+
export const AuthActions = [
106106
GetAuthModuleParamsAction,
107107
GetAccountDetailsAction,
108108
GetAccountsAction,
@@ -112,4 +112,4 @@ export const AuthActions = {
112112
MsgGrantAction,
113113
MsgExecAction,
114114
MsgRevokeAction,
115-
};
115+
];

packages/plugin-injective/src/action/bank.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export const MsgMultiSendAction = createGenericAction({
114114
validateContent: () => true,
115115
});
116116

117-
export const BankActions = {
117+
export const BankActions = [
118118
GetBankModuleParamsAction,
119119
GetBankBalanceAction,
120120
GetBankBalancesAction,
@@ -126,4 +126,4 @@ export const BankActions = {
126126
GetDenomOwnersAction,
127127
MsgSendAction,
128128
MsgMultiSendAction,
129-
};
129+
];

packages/plugin-injective/src/action/distribution.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ export const MsgWithdrawValidatorCommissionAction = createGenericAction({
9898
});
9999

100100
// Export all actions as a group
101-
export const DistributionActions = {
101+
export const DistributionActions = [
102102
GetDistributionModuleParamsAction,
103103
GetDelegatorRewardsForValidatorAction,
104104
GetDelegatorRewardsForValidatorNoThrowAction,
105105
GetDelegatorRewardsAction,
106106
GetDelegatorRewardsNoThrowAction,
107107
MsgWithdrawDelegatorRewardAction,
108108
MsgWithdrawValidatorCommissionAction,
109-
};
109+
];

packages/plugin-injective/src/action/exchange.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ export const MsgAdminUpdateBinaryOptionsMarketAction = createGenericAction({
875875
});
876876

877877
// Export all actions as a group
878-
export const ExchangeActions = {
878+
export const ExchangeActions = [
879879
// Module Parameters and State
880880
GetModuleParamsAction,
881881
GetModuleStateAction,
@@ -985,4 +985,4 @@ export const ExchangeActions = {
985985
MsgSignDataAction,
986986
MsgExternalTransferAction,
987987
MsgAdminUpdateBinaryOptionsMarketAction,
988-
};
988+
];

packages/plugin-injective/src/action/explorer.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export const GetExplorerStatsAction = createGenericAction({
126126
});
127127

128128
// Export all actions as a group
129-
export const ExplorerActions = {
129+
export const ExplorerActions = [
130130
GetTxByHashAction,
131131
GetAccountTxAction,
132132
GetExplorerValidatorAction,
@@ -138,4 +138,4 @@ export const ExplorerActions = {
138138
GetTxsAction,
139139
GetIBCTransferTxsAction,
140140
GetExplorerStatsAction,
141-
};
141+
];

packages/plugin-injective/src/action/gov.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export const MsgGovDepositAction = createGenericAction({
179179
});
180180

181181
// Export all actions as a group
182-
export const GovernanceActions = {
182+
export const GovActions = [
183183
GetGovernanceModuleParamsAction,
184184
GetProposalsAction,
185185
GetProposalAction,
@@ -194,4 +194,4 @@ export const GovernanceActions = {
194194
MsgSubmitProposalSpotMarketParamUpdateAction,
195195
MsgSubmitGenericProposalAction,
196196
MsgGovDepositAction,
197-
};
197+
];

packages/plugin-injective/src/action/ibc.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ export const MsgIBCTransferAction = createGenericAction({
4242
});
4343

4444
// Export all actions as a group
45-
export const IBCActions = {
45+
export const IbcActions = [
4646
GetDenomTraceAction,
4747
GetDenomsTraceAction,
4848
MsgIBCTransferAction,
49-
};
49+
];

packages/plugin-injective/src/action/index.ts

+40-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1-
export * from "./base";
1+
import { Action } from "@elizaos/core";
2+
import { AuctionActions } from "./auction";
3+
import { AuthActions } from "./auth";
4+
import { BankActions } from "./bank";
5+
import { DistributionActions } from "./distribution";
6+
import { ExchangeActions } from "./exchange";
7+
import { ExplorerActions } from "./explorer";
8+
import { GovActions } from "./gov";
9+
import { IbcActions } from "./ibc";
10+
import { InsuranceActions } from "./insurance";
11+
import { MintActions } from "./mint";
12+
import { MitoActions } from "./mito";
13+
import { PeggyActions } from "./peggy";
14+
import { PermissionsActions } from "./permissions";
15+
import { StakingActions } from "./staking";
16+
import { TokenFactoryActions } from "./token-factory";
17+
import { WasmActions } from "./wasm";
18+
19+
// Exporting all actions
220
export * from "./auction";
321
export * from "./auth";
422
export * from "./bank";
@@ -15,3 +33,24 @@ export * from "./permissions";
1533
export * from "./staking";
1634
export * from "./token-factory";
1735
export * from "./wasm";
36+
37+
export const InjectiveActions: Array<Action> = [
38+
...AuctionActions,
39+
...AuthActions,
40+
...BankActions,
41+
...DistributionActions,
42+
...ExchangeActions,
43+
...ExplorerActions,
44+
...GovActions,
45+
...IbcActions,
46+
...InsuranceActions,
47+
...MintActions,
48+
...MitoActions,
49+
...PeggyActions,
50+
...PermissionsActions,
51+
...StakingActions,
52+
...TokenFactoryActions,
53+
...WasmActions,
54+
];
55+
56+
export default InjectiveActions;

packages/plugin-injective/src/action/insurance.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const MsgUnderwriteAction = createGenericAction({
103103
});
104104

105105
// Export all actions as a group
106-
export const InsuranceActions = {
106+
export const InsuranceActions = [
107107
GetInsuranceModuleParamsAction,
108108
GetInsuranceFundsAction,
109109
GetInsuranceFundAction,
@@ -112,4 +112,4 @@ export const InsuranceActions = {
112112
MsgCreateInsuranceFundAction,
113113
MsgRequestRedemptionAction,
114114
MsgUnderwriteAction,
115-
};
115+
];

packages/plugin-injective/src/action/mint.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ export const GetAnnualProvisionsAction = createGenericAction({
4141
});
4242

4343
// Export all actions as a group
44-
export const MintActions = {
44+
export const MintActions = [
4545
GetMintModuleParamsAction,
4646
GetInflationAction,
4747
GetAnnualProvisionsAction,
48-
};
48+
];

packages/plugin-injective/src/action/mito.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export const GetClaimReferencesAction = createGenericAction({
232232
});
233233

234234
// Export all actions as a group
235-
export const MitoActions = {
235+
export const MitoActions = [
236236
GetVaultAction,
237237
GetVaultsAction,
238238
GetVaultsByHolderAddressAction,
@@ -255,4 +255,4 @@ export const MitoActions = {
255255
GetIDOActivitiesAction,
256256
GetIDOWhitelistAction,
257257
GetClaimReferencesAction,
258-
};
258+
];

packages/plugin-injective/src/action/peggy.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,4 @@ export const MsgSendToEthAction = createGenericAction({
3030
});
3131

3232
// Export all actions as a group
33-
export const PeggyActions = {
34-
GetPeggyModuleParamsAction,
35-
MsgSendToEthAction,
36-
};
33+
export const PeggyActions = [GetPeggyModuleParamsAction, MsgSendToEthAction];

packages/plugin-injective/src/action/permissions.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ export const GetVouchersForAddressAction = createGenericAction({
8484
});
8585

8686
// Export all actions as a group
87-
export const PermissionsActions = {
87+
export const PermissionsActions = [
8888
GetAddressesByRoleAction,
8989
GetAddressRolesAction,
9090
GetAllNamespacesAction,
9191
GetPermissionsModuleParamsAction,
9292
GetNamespaceByDenomAction,
9393
GetVouchersForAddressAction,
94-
};
94+
];

packages/plugin-injective/src/action/staking.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ export const MsgCancelUnbondingDelegationAction = createGenericAction({
286286
});
287287

288288
// Export all actions as a group
289-
export const StakingActions = {
289+
export const StakingActions = [
290290
// Module and Pool Actions
291291
GetStakingModuleParamsAction,
292292
GetPoolAction,
@@ -317,4 +317,4 @@ export const StakingActions = {
317317
MsgCreateValidatorAction,
318318
MsgEditValidatorAction,
319319
MsgCancelUnbondingDelegationAction,
320-
};
320+
];

packages/plugin-injective/src/action/token-factory.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export const MsgSetDenomMetadataAction = createGenericAction({
115115
});
116116

117117
// Export all actions as a group
118-
export const TokenFactoryActions = {
118+
export const TokenFactoryActions = [
119119
// Query Actions
120120
GetDenomsFromCreatorAction,
121121
GetDenomAuthorityMetadataAction,
@@ -128,4 +128,4 @@ export const TokenFactoryActions = {
128128
MsgCreateDenomAction,
129129
MsgMintAction,
130130
MsgSetDenomMetadataAction,
131-
};
131+
];

packages/plugin-injective/src/action/wasm.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ export const GetWasmxModuleStateAction = createGenericAction({
214214
});
215215

216216
// Export all actions as a group
217-
export const WasmActions = {
217+
export const WasmActions = [
218218
// Contract Query Actions
219219
GetContractAccountsBalanceAction,
220220
GetContractStateAction,
@@ -240,4 +240,4 @@ export const WasmActions = {
240240
// WasmX Query Actions
241241
GetWasmxModuleParamsAction,
242242
GetWasmxModuleStateAction,
243-
};
243+
];
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import InjectiveActions from "./action";
2+
import { Plugin } from "@elizaos/core";
3+
4+
export const injectivePlugin: Plugin = {
5+
name: "injective",
6+
description: "A plugin for interacting with the Injective blockchain",
7+
actions: InjectiveActions,
8+
evaluators: [],
9+
providers: [], //TODO: Integrate with injective-trader to run MM and Taking Strats
10+
};
11+
12+
export default injectivePlugin;

0 commit comments

Comments
 (0)