The oracle, comprising certain contracts and an external bot, aims to translate select GitHub metrics onto the chain, rendering them usable in our on-chain ecosystem.
While I've shared my skepticism about GitHub being the sole platform for evaluations and score/token allocations, I remain steadfast in treating GitHub as a reliable data source. It's essential we maintain its widely recognized URIs for consistency.
Elaborating further:
On-Chain Reflection of Issues and PRs: I propose that we mirror essential data from GitHub, such as titles, statuses (open, closed, merged), URIs, and some metadata. Visualize it like this:
import "gno.land/r/github"
issue := github.IssueByID("gnolang/gno#4242")
println(issue.Title, issue.State)
This allows on-chain management and tracking that's interlinked with GitHub issues. As @waymobetta and @MichaelFrazzy have been exploring similar territory, I'd like to emphasize:
Two-Way Data Flow: While our bot can translate GitHub activities on-chain, the opposite should be feasible too. It can monitor on-chain events and mirror these as comments on GitHub issues and PRs.
GitHub and Gno Account Linkage: As discussed, users can create a repository like github.com/<username>/.gno with a config.yml, signed with their private key. An on-chain transaction like:
gnokey maketx gno.land/r/github -func LinkAccount -args moul -args sig(moul)
can create a robust two-way connection, broadening our interaction possibilities, such as a bot commenting on GitHub issues/PRs.
Repository Creation
github.com/<username>/.gno
config.yml
file containing necessary information and sign it with their private key.
functions: LinkAccount
signatures: xxx
public_key: xxxx
User Interaction
Server Validation
config.yml
file.config.yml
file to ensure authenticity.config.yml
for required fields and format.Data Push to Chain
Cons: Gno will pay the gas
sequenceDiagram
User ->> Server: Ask github verification
Server ->> Github: Get user gno/config.yaml
Server ->> Server: Parse to get user address
Server ->> Oracle: Push address, githubId
github.com/<username>/.gno
config.yml
file containing necessary information and sign it with their private key.
config.yml
:
functions: LinkAccount
signatures: xxx
public_key: xxxx
config.yml
, and desired action.config.yml
file.config.yml
file to ensure authenticity.config.yml
for required fields and format.The server will respond to the user with the signed function and argument, ready for execution on the Gno Realm.
The user can then execute this function on the Gno Realm with the provided signature.
Cons: user will pay the gas
sequenceDiagram
Server ->> Realm: Add Public Key
User ->> Server: Ask github verification
Server ->> Github: Get user gno/config.yaml
Server ->> Server: Parse to get user address
Server ->> User: Signature(address,githubID)
User ->> Realm: Push address,githubID, serverSignature
sequenceDiagram
User ->> Github: Comment on github
Github ->> Bot: User Comment
Bot ->> Github: Get user gno/config.yaml
Bot ->> Bot: Parse to get user address
Bot ->> Oracle: Push adress, githubId, data related to the comment
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing