Skip to content

Commit e29c5e4

Browse files
committed
Add makefile
1 parent bbf81ac commit e29c5e4

File tree

4 files changed

+26
-98
lines changed

4 files changed

+26
-98
lines changed

gno_github_agent/.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.env
2+
github.db

gno_github_agent/.env

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
GNO_MNEMONIC=scissors razor beauty delay derive chronic toss burger gravity shallow couch slogan change tray connect frame token slight zone usage sad monkey pyramid change
2-
GNO_CHAIN_ID=dev
3-
GNO_RPC_ADDR=http://127.0.0.1:26657
1+
GNO_MNEMONIC=source bonus chronic canvas draft south burst lottery vacant surface solve popular case indicate oppose farm nothing bullet exhibit title speed wink action roast
2+
GNO_CHAIN_ID=test4
3+
GNO_RPC_ADDR=https://rpc.test4.gno.land:443
44
GNO_REALM_PATH=gno.land/r/teritori/ghverify
5-
GNO_TX_INDEXER=http://localhost:8546/graphql/query
5+
GNO_TX_INDEXER=https://indexer.test4.gno.testnet.teritori.com

gno_github_agent/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Start from the latest golang base image
2+
FROM golang:1.23-bullseye
3+
4+
# Set the Current Working Directory inside the container
5+
WORKDIR /app
6+
7+
# Copy everything from the current directory to the Working Directory inside the container
8+
COPY . .
9+
10+
ENV CGO_ENABLED=1
11+
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go go build -o bin/main main.go
12+
13+
CMD [ "/app/bin/main" ]
14+

gno_github_agent/Makefile

Lines changed: 6 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,7 @@
1-
KEY = MyKey
2-
BASE = teritori
3-
REMOTE = http://127.0.0.1:26657
4-
CHAIN_ID = dev
1+
DOCKER_REGISTRY=rg.nl-ams.scw.cloud/teritori
2+
AGENT_DOCKER_IMAGE=$(DOCKER_REGISTRY)/gno-gh-verify-agent:$(shell git rev-parse --short HEAD)
53

6-
.PHONY: add_social_feeds_realm add_utf16_pkg add_ujson_pkg add_flags_index_pkg add_dao_interfaces_pkg add_social_feed all
7-
8-
add_gh_verify_realm:
9-
gnokey maketx addpkg \
10-
-deposit="1ugnot" \
11-
-gas-fee="1ugnot" \
12-
-gas-wanted="50000000" \
13-
-broadcast="true" \
14-
-chainid="${CHAIN_ID}" \
15-
-remote="${REMOTE}" \
16-
-pkgdir="./r/gnoland/ghverify" \
17-
-pkgpath="gno.land/r/${BASE}/ghverify" \
18-
${KEY}
19-
20-
request_verification:
21-
gnokey maketx call \
22-
-pkgpath "gno.land/r/${BASE}/ghverify" \
23-
-func="RequestVerification" \
24-
-gas-fee="1000000ugnot" \
25-
-gas-wanted="3000000" \
26-
-remote="${REMOTE}" \
27-
-chainid="${CHAIN_ID}" \
28-
-broadcast \
29-
-args "villaquiranm" \
30-
MyKey
31-
32-
check_current_feeds:
33-
gnokey query vm/qeval --data 'gno.land/r/${BASE}/ghverify.GnorkleEntrypoint("request")'
34-
-remote="${REMOTE}" \
35-
${KEY}
36-
37-
set_owner:
38-
gnokey maketx call \
39-
-pkgpath "gno.land/r/${BASE}/ghverify" \
40-
-func="SetOwner" \
41-
-gas-fee="1000000ugnot" \
42-
-gas-wanted="3000000" \
43-
-remote="${REMOTE}" \
44-
-chainid="${CHAIN_ID}" \
45-
-broadcast \
46-
-args "g1yr5sts6w9k2arsuk858lh6phegcfvg0y4d0pgf" \
47-
${KEY}
48-
49-
verify:
50-
gnokey maketx call \
51-
-pkgpath "gno.land/r/${BASE}/ghverify" \
52-
-func="GnorkleEntrypoint" \
53-
-gas-fee="1000000ugnot" \
54-
-gas-wanted="3000000" \
55-
-remote="${REMOTE}" \
56-
-chainid="${CHAIN_ID}" \
57-
-broadcast \
58-
-args "ingest,g1pwxuhltfqxcumjmuquuue6y3f2g3f2d0rcq52x,OK" \
59-
${KEY}
60-
relay_verify:
61-
gnokey maketx call \
62-
-pkgpath "gno.land/r/${BASE}/ghverify" \
63-
-func="GnorkleEntrypoint" \
64-
-gas-fee="1000000ugnot" \
65-
-gas-wanted="3000000" \
66-
-remote="${REMOTE}" \
67-
-chainid="${CHAIN_ID}" \
68-
-broadcast \
69-
-args "relay,gpub1pgfj7ard9eg82cjtv4u4xetrwqer2dntxyfzxz3pqgfakcapzvuux7vug9vagyjmvj6k2w2xu723qnue69z9r7wlt9c6zeyxvt8,dd4b4012daddb14fe7587f4bbb5bef5f16d123032e5c6dc718528907c8f71ee267c1a051328d42991fe6f82cdba424efd3866251cf9411c8f38ebb1e144f10ce,ingest,g14vxq5e5pt5sev7rkz2ej438scmxtylnzv5vnkw,OK" \
70-
newkey
71-
72-
check:
73-
gnokey maketx call \
74-
-pkgpath "gno.land/r/${BASE}/ghverify" \
75-
-func="GnorkleEntrypoint" \
76-
-gas-fee="1000000ugnot" \
77-
-gas-wanted="3000000" \
78-
-remote="${REMOTE}" \
79-
-chainid="${CHAIN_ID}" \
80-
-broadcast \
81-
-args "request" \
82-
${KEY}
83-
84-
send:
85-
gnokey maketx send \
86-
-gas-fee="1000000ugnot" \
87-
-gas-wanted="3000000" \
88-
-remote="${REMOTE}" \
89-
-chainid="${CHAIN_ID}" \
90-
-send="100000ugnot" \
91-
-to "g1yr5sts6w9k2arsuk858lh6phegcfvg0y4d0pgf" \
92-
-broadcast \
93-
${KEY}
94-
95-
4+
.PHONY: publish
5+
publish:
6+
docker build . --platform linux/amd64 -t $(AGENT_DOCKER_IMAGE)
7+
docker push $(AGENT_DOCKER_IMAGE)

0 commit comments

Comments
 (0)