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

0g plugin dev #1

Merged
merged 7 commits into from
Nov 19, 2024
Merged

0g plugin dev #1

merged 7 commits into from
Nov 19, 2024

Conversation

Ravenyjh
Copy link
Collaborator

@Ravenyjh Ravenyjh commented Nov 19, 2024

Risks

Low. This change involves adding a new plugin, which is isolated and should not affect existing functionality.

Background

What does this PR do?

This PR adds a new plugin for 0G, which includes an action that allows users to upload local files to 0G Storage.

What kind of change is this?

Features (non-breaking change which adds functionality).

Documentation changes needed?

My changes do not require a change to the project documentation.

Testing

Where should a reviewer start?

The review can start with the new 0G plugin code, focusing on the action that uploads files to ensure it handles files correctly and integrates well with 0G Storage.

Screenshots

No UI changes.


This change is Reviewable

Copy link

@zenghbo zenghbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with some minor comments

"STORE_FILE_ON_ZG",
"SAVE_FILE_TO_ZG",
"UPLOAD_TO_ZERO_GRAVITY",
"STORE_ON_ZERO_GRAVITY",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ZERO_GRAVITY vs ZG, let's make it consistent

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Various of similes make the agent smarter?

try {
await fs.access(filePath);
} catch (error) {
console.error(`File ${filePath} does not exist or is not accessible:`, error);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vs ", make it consistent. also a space afteraccessible:`

await file.close();

} catch (error) {
console.error("Error getting settings for 0G upload:", error);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space after upload:

import { zgUpload } from "./actions/upload";

export const zgPlugin: Plugin = {
name: "ZG",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the name here be ZeroG or 0G

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

const flowAddr = runtime.getSetting("ZEROG_FLOW_ADDRESS");
const filePath = content.filePath;
if (!filePath) {
console.error("File path is missing");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File path is required

@Wilbert957 Wilbert957 merged commit 14d9b28 into main Nov 19, 2024
Wilbert957 pushed a commit that referenced this pull request Nov 20, 2024
Wilbert957 pushed a commit that referenced this pull request Nov 25, 2024
Wilbert957 pushed a commit that referenced this pull request Nov 25, 2024
Wilbert957 pushed a commit that referenced this pull request Dec 8, 2024
Wilbert957 pushed a commit that referenced this pull request Dec 8, 2024
feat: EVM Pubkey derivation
Wilbert957 pushed a commit that referenced this pull request Jan 14, 2025
Wilbert957 pushed a commit that referenced this pull request Jan 14, 2025
Introduce sentient AI to DePIN plugin
Wilbert957 pushed a commit that referenced this pull request Jan 14, 2025
Wilbert957 pushed a commit that referenced this pull request Jan 14, 2025
Orchestrator architecture V1
Wilbert957 pushed a commit that referenced this pull request Jan 14, 2025
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

Successfully merging this pull request may close these issues.

4 participants