Skip to content

Commit 801e2f7

Browse files
feat: Add stellar launchtube plugin (#401)
* feat: Add stellar launchtube plugin Signed-off-by: dylankilkenny <dylankilkenny95@gmail.com> * chore: Add tests Signed-off-by: dylankilkenny <dylankilkenny95@gmail.com> * test: Add unit tests Signed-off-by: dylankilkenny <dylankilkenny95@gmail.com> * test: Add status test Signed-off-by: dylankilkenny <dylankilkenny95@gmail.com> * refactor: Review changes Signed-off-by: dylankilkenny <dylankilkenny95@gmail.com> * refactor: Remove launchtube Signed-off-by: dylankilkenny <dylankilkenny95@gmail.com> * fix: Whitespace Signed-off-by: dylankilkenny <dylankilkenny95@gmail.com> * fix: Update import Signed-off-by: dylankilkenny <dylankilkenny95@gmail.com> * test: Status workaround Signed-off-by: dylankilkenny <dylankilkenny95@gmail.com> * refactor: Update types and openapi Signed-off-by: dylankilkenny <dylankilkenny95@gmail.com> * fix: Upgrade sdk and use new types Signed-off-by: dylankilkenny <dylankilkenny95@gmail.com> * fix: Update types Signed-off-by: dylankilkenny <dylankilkenny95@gmail.com> --------- Signed-off-by: dylankilkenny <dylankilkenny95@gmail.com>
1 parent 388d409 commit 801e2f7

50 files changed

Lines changed: 6668 additions & 3722 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,11 @@ jobs:
192192
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
193193
with:
194194
node-version: '20'
195-
196195
- name: Install pnpm and plugin dependencies
197196
run: |
198197
npm install -g pnpm
199198
cd plugins
200199
pnpm install
201-
202200
- name: Install TypeScript and ts-node
203201
run: |
204202
npm install -g typescript ts-node

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ path = "helpers/generate_uuid.rs"
119119

120120
[[example]]
121121
name = "generate_encryption_key"
122-
path = "helpers/generate_encyption_key.rs"
122+
path = "helpers/generate_encryption_key.rs"
123123

124124
[[example]]
125125
name = "generate_openapi"

docs/modules/ROOT/pages/configuration.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ The OpenZeppelin Relayer supports two complementary approaches for configuration
743743
- Requires container restart for changes to take effect
744744
- Suitable for infrastructure-as-code workflows
745745

746-
=== API-based Configuration
746+
=== API-based Configuration
747747
- Enables runtime configuration changes
748748
- No service restarts required
749749
- Perfect for dynamic environments

docs/modules/ROOT/pages/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ For quick setup with various configurations, check the https://github.com/OpenZe
231231
* `evm-gcp-kms-signer`: Using Google Cloud KMS for EVM secure signing
232232
* `evm-turnkey-signer`: Using Turnkey for EVM secure signing
233233
* `solana-turnkey-signer`: Using Turnkey for Solana secure signing
234-
* `redis-storage`: Using Redis for Storage
234+
* `redis-storage`: Using Redis for Storage
235235
* `network-configuration-config-file`: Using Custom network configuration via config file
236236
* `network-configuration-json-file`: Using Custom network configuration via JSON file
237237

docs/modules/ROOT/pages/plugins.adoc

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -56,31 +56,31 @@ type MyPluginResult = {
5656
/// Export a handler function - that's it!
5757
export async function handler(api: PluginAPI, params: MyPluginParams): Promise<MyPluginResult> {
5858
console.info("🚀 Plugin started...");
59-
59+
6060
// Validate parameters
6161
if (!params.destinationAddress) {
6262
throw new Error("destinationAddress is required");
6363
}
64-
64+
6565
// Use the relayer API
6666
const relayer = api.useRelayer(params.relayerId || "my-relayer");
67-
67+
6868
const result = await relayer.sendTransaction({
6969
to: params.destinationAddress,
7070
value: params.amount || 1,
7171
data: "0x",
7272
gas_limit: 21000,
7373
speed: Speed.FAST,
7474
});
75-
75+
7676
console.info(`Transaction submitted: ${result.id}`);
77-
77+
7878
// Wait for confirmation
7979
await result.wait({
8080
interval: 5000, // Check every 5 seconds
8181
timeout: 120000 // Timeout after 2 minutes
8282
});
83-
83+
8484
return {
8585
success: true,
8686
transactionId: result.id,
@@ -117,7 +117,7 @@ type Params = {
117117
118118
async function example(api: PluginAPI, params: Params): Promise<string> {
119119
console.info("Plugin started...");
120-
120+
121121
const relayer = api.useRelayer("sepolia-example");
122122
const result = await relayer.sendTransaction({
123123
to: params.destinationAddress,
@@ -126,7 +126,7 @@ async function example(api: PluginAPI, params: Params): Promise<string> {
126126
gas_limit: 21000,
127127
speed: Speed.FAST,
128128
});
129-
129+
130130
await result.wait();
131131
return "done!";
132132
}
@@ -246,18 +246,18 @@ type ExampleResult = {
246246
export async function handler(api: PluginAPI, params: ExampleParams): Promise<ExampleResult> {
247247
console.info("🚀 Example plugin started");
248248
console.info(`📋 Parameters:`, JSON.stringify(params, null, 2));
249-
249+
250250
try {
251251
// Validate parameters
252252
if (!params.destinationAddress) {
253253
throw new Error("destinationAddress is required");
254254
}
255-
255+
256256
const amount = params.amount || 1;
257257
const message = params.message || "Hello from OpenZeppelin Relayer!";
258-
258+
259259
console.info(`💰 Sending ${amount} wei to ${params.destinationAddress}`);
260-
260+
261261
// Get relayer and send transaction
262262
const relayer = api.useRelayer("my-relayer");
263263
const result = await relayer.sendTransaction({
@@ -267,25 +267,25 @@ export async function handler(api: PluginAPI, params: ExampleParams): Promise<Ex
267267
gas_limit: 21000,
268268
speed: Speed.FAST,
269269
});
270-
270+
271271
console.info(`✅ Transaction submitted: ${result.id}`);
272-
272+
273273
// Wait for confirmation
274274
const confirmation = await result.wait({
275275
interval: 5000,
276276
timeout: 120000
277277
});
278-
278+
279279
console.info(`🎉 Transaction confirmed: ${confirmation.hash}`);
280-
280+
281281
return {
282282
success: true,
283283
transactionId: result.id,
284284
transactionHash: confirmation.hash || null,
285285
message: `Successfully sent ${amount} wei to ${params.destinationAddress}. ${message}`,
286286
timestamp: new Date().toISOString()
287287
};
288-
288+
289289
} catch (error) {
290290
console.error("❌ Plugin execution failed:", error);
291291
return {
@@ -341,7 +341,7 @@ curl -X POST http://localhost:8080/api/v1/plugins/example-plugin/call \
341341
"message": "🚀 Example plugin started"
342342
},
343343
{
344-
"level": "info",
344+
"level": "info",
345345
"message": "💰 Sending 1000000000000000 wei to 0x742d35Cc6640C21a1c7656d2c9C8F6bF5e7c3F8A"
346346
},
347347
{
@@ -425,7 +425,7 @@ export async function handler(api: PluginAPI, params: any): Promise<any> {
425425
=== Step-by-Step Migration
426426

427427
1. **Remove the `runPlugin()` call** at the bottom of your file
428-
2. **Rename your function to `handler`** (or create a new handler export)
428+
2. **Rename your function to `handler`** (or create a new handler export)
429429
3. **Export the `handler` function** using `export async function handler`
430430
4. **Add proper TypeScript types** for better development experience
431431
5. **Test your plugin** to ensure it works with the new pattern

docs/modules/ROOT/pages/storage.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Redis storage persists all configuration and transaction data in a Redis databas
5151

5252
==== Use Cases
5353
- **Production deployments**
54-
- **Multi-instance deployments**
54+
- **Multi-instance deployments**
5555
- **When data persistence is required**
5656
- **Scalable environments**
5757
- **When API-based configuration changes should persist**

0 commit comments

Comments
 (0)