forked from cosmonft/lens-tracker-and-push
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
1,582 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.env | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"nuxt.isNuxtApp": false | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
FROM golang:latest | ||
|
||
WORKDIR /app | ||
|
||
ADD . . | ||
|
||
RUN go install | ||
RUN go build | ||
ENTRYPOINT ["./main"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
docker_test: | ||
docker system prune | ||
docker build -t main . | ||
docker run --name main main | ||
|
||
docker create: | ||
docker build -t main . | ||
|
||
docker test exec: | ||
# docker kill $(docker ps -q) | ||
# docker system prune | ||
docker build -t tracker . | ||
docker run --name tracker tracker | ||
docker exec -it tracker bash | ||
|
||
test: | ||
docker build -t tracker . | ||
docker run --name tracker tracker | ||
|
||
clean: | ||
docker system prune | ||
|
||
Build_and_Push: | ||
# Your Project ID here as argument in line! | ||
echo "Set PROJECT_ID=YOUR_PROJECT_ID if you have not !!!" | ||
docker buildx build --platform linux/amd64 -t gcr.io/$(PROJECT_ID)/tracker . | ||
docker push gcr.io/$(PROJECT_ID)/tracker | ||
|
||
|
||
setting up gcloud etc: | ||
gcloud auth login | ||
gcloud auth configure-docker | ||
|
||
production: | ||
# Your Project ID here as argument in line! | ||
echo "Set PROJECT_ID=YOUR_PROJECT_ID if you have not !!!" | ||
# Build for production for arm64 to make it work on GKE | ||
docker buildx build --platform linux/amd64 -t gcr.io/$(PROJECT_ID)/tracker . | ||
docker push gcr.io/$(PROJECT_ID)/tracker | ||
cd terraform; terraform apply; | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"BaseInitialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collectModule","type":"address"},{"indexed":true,"internalType":"bool","name":"whitelisted","type":"bool"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"CollectModuleWhitelisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"profileId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"pubId","type":"uint256"},{"indexed":true,"internalType":"address","name":"collectNFT","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"CollectNFTDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"profileId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"pubId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"CollectNFTInitialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"profileId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"pubId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"collectNFTId","type":"uint256"},{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"CollectNFTTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collector","type":"address"},{"indexed":true,"internalType":"uint256","name":"profileId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"pubId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rootProfileId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rootPubId","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"collectModuleData","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Collected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"profileId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"pubId","type":"uint256"},{"indexed":false,"internalType":"string","name":"contentURI","type":"string"},{"indexed":false,"internalType":"uint256","name":"profileIdPointed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pubIdPointed","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"referenceModuleData","type":"bytes"},{"indexed":false,"internalType":"address","name":"collectModule","type":"address"},{"indexed":false,"internalType":"bytes","name":"collectModuleReturnData","type":"bytes"},{"indexed":false,"internalType":"address","name":"referenceModule","type":"address"},{"indexed":false,"internalType":"bytes","name":"referenceModuleReturnData","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"CommentCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":true,"internalType":"uint256","name":"profileId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"DefaultProfileSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"profileId","type":"uint256"},{"indexed":true,"internalType":"address","name":"dispatcher","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"DispatcherSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"oldEmergencyAdmin","type":"address"},{"indexed":true,"internalType":"address","name":"newEmergencyAdmin","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"EmergencyAdminSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"moduleGlobals","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"FeeModuleBaseConstructed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"profileId","type":"uint256"},{"indexed":false,"internalType":"address","name":"followModule","type":"address"},{"indexed":false,"internalType":"bytes","name":"followModuleReturnData","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"FollowModuleSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"followModule","type":"address"},{"indexed":true,"internalType":"bool","name":"whitelisted","type":"bool"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"FollowModuleWhitelisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"uint256","name":"newPower","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"FollowNFTDelegatedPowerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"profileId","type":"uint256"},{"indexed":true,"internalType":"address","name":"followNFT","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"FollowNFTDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"profileId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"FollowNFTInitialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"profileId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"followNFTId","type":"uint256"},{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"FollowNFTTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"profileId","type":"uint256"},{"indexed":false,"internalType":"string","name":"followNFTURI","type":"string"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"FollowNFTURISet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"follower","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"profileIds","type":"uint256[]"},{"indexed":false,"internalType":"bytes[]","name":"followModuleDatas","type":"bytes[]"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Followed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"profileId","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"addresses","type":"address[]"},{"indexed":false,"internalType":"bool[]","name":"approved","type":"bool[]"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"FollowsApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"profileIds","type":"uint256[]"},{"indexed":false,"internalType":"bool[]","name":"enabled","type":"bool[]"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"FollowsToggled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"prevGovernance","type":"address"},{"indexed":true,"internalType":"address","name":"newGovernance","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"GovernanceSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"profileId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"pubId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"profileIdPointed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pubIdPointed","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"referenceModuleData","type":"bytes"},{"indexed":false,"internalType":"address","name":"referenceModule","type":"address"},{"indexed":false,"internalType":"bytes","name":"referenceModuleReturnData","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"MirrorCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"hub","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ModuleBaseConstructed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"currency","type":"address"},{"indexed":true,"internalType":"bool","name":"prevWhitelisted","type":"bool"},{"indexed":true,"internalType":"bool","name":"whitelisted","type":"bool"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ModuleGlobalsCurrencyWhitelisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevGovernance","type":"address"},{"indexed":true,"internalType":"address","name":"newGovernance","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ModuleGlobalsGovernanceSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint16","name":"prevTreasuryFee","type":"uint16"},{"indexed":true,"internalType":"uint16","name":"newTreasuryFee","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ModuleGlobalsTreasuryFeeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevTreasury","type":"address"},{"indexed":true,"internalType":"address","name":"newTreasury","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ModuleGlobalsTreasurySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"profileId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"pubId","type":"uint256"},{"indexed":false,"internalType":"string","name":"contentURI","type":"string"},{"indexed":false,"internalType":"address","name":"collectModule","type":"address"},{"indexed":false,"internalType":"bytes","name":"collectModuleReturnData","type":"bytes"},{"indexed":false,"internalType":"address","name":"referenceModule","type":"address"},{"indexed":false,"internalType":"bytes","name":"referenceModuleReturnData","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"PostCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"profileId","type":"uint256"},{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"string","name":"handle","type":"string"},{"indexed":false,"internalType":"string","name":"imageURI","type":"string"},{"indexed":false,"internalType":"address","name":"followModule","type":"address"},{"indexed":false,"internalType":"bytes","name":"followModuleReturnData","type":"bytes"},{"indexed":false,"internalType":"string","name":"followNFTURI","type":"string"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ProfileCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"profileCreator","type":"address"},{"indexed":true,"internalType":"bool","name":"whitelisted","type":"bool"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ProfileCreatorWhitelisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"profileId","type":"uint256"},{"indexed":false,"internalType":"string","name":"imageURI","type":"string"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ProfileImageURISet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"referenceModule","type":"address"},{"indexed":true,"internalType":"bool","name":"whitelisted","type":"bool"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ReferenceModuleWhitelisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"enum DataTypes.ProtocolState","name":"prevState","type":"uint8"},{"indexed":true,"internalType":"enum DataTypes.ProtocolState","name":"newState","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"StateSet","type":"event"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
solc --abi events.sol | ||
solc --bin events.sol | ||
abigen --bin=Store_sol_Store.bin --abi=Store_sol_Store.abi --pkg=store --out=Store.go | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package database | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/google/uuid" | ||
"github.com/shopspring/decimal" | ||
) | ||
|
||
type User struct { | ||
ID string `gorm:"primaryKey"` | ||
Address string | ||
} | ||
|
||
type CommentMessage struct { | ||
MessageID uuid.UUID `gorm:"primaryKey"` | ||
Sent bool | ||
ProfileId decimal.Decimal | ||
PubId decimal.Decimal | ||
ContentURI string | ||
ProfileIdPointed decimal.Decimal | ||
PubIdPointed decimal.Decimal | ||
CollectModule string | ||
CollectModuleReturnData string | ||
ReferenceModule string | ||
ReferenceModuleReturnData string | ||
Timestamp decimal.Decimal | ||
} | ||
|
||
type FollowMessage struct { | ||
MessageID uuid.UUID `gorm:"primaryKey"` | ||
ProfileId decimal.Decimal | ||
FollowNFT string | ||
Timestamp decimal.Decimal | ||
Sent bool | ||
} | ||
|
||
type Clone struct { | ||
Day time.Time `gorm:"primaryKey"` | ||
Count int | ||
Uniques int | ||
Repository string `gorm:"primaryKey"` | ||
} | ||
|
||
type View struct { | ||
Day time.Time `gorm:"primaryKey"` | ||
Count int | ||
Uniques int | ||
Repository string `gorm:"primaryKey"` | ||
} | ||
|
||
type Path struct { | ||
Path string `gorm:"primaryKey"` | ||
Title string | ||
Count int | ||
Uniques int | ||
Day time.Time `gorm:"primaryKey"` | ||
Repository string `gorm:"primaryKey"` | ||
} | ||
|
||
type Referral struct { | ||
Referrer string `gorm:"primaryKey"` | ||
Count int | ||
Uniques int | ||
Day time.Time `gorm:"primaryKey"` | ||
Repository string `gorm:"primaryKey"` | ||
} |
Oops, something went wrong.