Skip to content
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Compiler files
cache/
out/
out
dist

# Ignores development broadcast logs
!/broadcast
Expand All @@ -19,3 +20,6 @@ broadcast/*/*/run-*.json
/coverage
lcov.info
lcov.src.info

# Dependency directories
node_modules
45 changes: 45 additions & 0 deletions tenderly-actions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Tenderly Actions

This directory contains Tenderly Actions for monitoring and automating responses to blockchain events in the RLC Multichain project.

## 🚀 Quick Start

### Prerequisites

- Node.js installed
- Tenderly CLI installed (`npm install -g @tenderly/cli`)
- Tenderly account and project set up

### Installation

```bash
cd actions
npm install
```

### Deploy Actions

```bash
# Deploy all actions to Tenderly
npm run deploy
```

## ⚠️ Important Notes

- **Run Tenderly CLI commands**: All Tenderly CLI commands must be executed from the folder containing `tenderly.yaml`
- **File references**: All files referenced in actions must be within this `tenderly-actions/` directory
- **Simultaneous deployment**: All actions for a project are deployed together

## 📚 Documentation

- [Tenderly Actions Documentation](https://docs.tenderly.co/web3-actions/tutorials-and-quickstarts)
- [Tenderly CLI Reference](https://docs.tenderly.co/web3-actions/references/cli-cheatsheet)

## 🔧 Configuration

Edit `tenderly.yaml` to configure:

- Action triggers (events, blocks, etc.)
- Runtime settings
- Environment variables
- Project mappings
11 changes: 11 additions & 0 deletions tenderly-actions/example.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {
ActionFn,
Context,
Event,
BlockEvent,
} from '@tenderly/actions';

export const blockHelloWorldFn: ActionFn = async (context: Context, event: Event) => {
let blockEvent = event as BlockEvent;
console.log(blockEvent);
}
35 changes: 35 additions & 0 deletions tenderly-actions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions tenderly-actions/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "actions",
"private": true,
"scripts": {
"build": "tsc",
"deploy": "cd .. && tenderly actions deploy"
},
"devDependencies": {
"typescript": "^4.3.5"
},
"dependencies": {
"@tenderly/actions": "^0.2.0"
}
}
14 changes: 14 additions & 0 deletions tenderly-actions/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"module": "node16",
"target": "ES2022",
"declaration": true,
"sourceMap": true,
"outDir": "dist",
"esModuleInterop": true,
"moduleResolution": "nodenext",
"skipLibCheck": true
},
"exclude": ["**/*.spec.ts"],
"include": ["**/*"]
}
16 changes: 16 additions & 0 deletions tenderly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
account_id: "iexec"
project_slug: "arbitrum-mainnet"
actions:
iexec/arbitrum-mainnet:
runtime: v2
sources: tenderly-actions
specs:
block-number-printer:
description: Example Web3 Action that logs block number once it is mined.
function: example:blockHelloWorldFn
trigger:
type: block
block:
network:
- 42161
blocks: 10