Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add post-action handling #63

Open
vaniiiii opened this issue Sep 23, 2024 · 0 comments
Open

Add post-action handling #63

vaniiiii opened this issue Sep 23, 2024 · 0 comments

Comments

@vaniiiii
Copy link
Contributor

Description

The protocol currently lacks a fallback mechanism to execute tasks post-action completion (e.g., API calls, database writes, referral tracking). Adding this feature would enable secondary processes like analytics, notifications, or other external logic to be triggered after the main action is finalized.

Suggested Solution

Introduce a postAction handler within each action type to define tasks that execute upon successful action completion.

Example postAction Structure:

export interface PostAction {
    type: 'api-call' | 'db-write' | 'smart-contract';
    endpoint?: string; // For API calls
    data?: string;     // Payload for API or DB write
    contractAddress?: string; // For smart contract call
    abi?: string; // ABI for contract interaction
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant