Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# BUILD BIN

FROM golang:1.17.7 as vt-init
FROM golang:1.18.4 as vt-init
# Install go modules

WORKDIR /flow-voting-tool
Expand All @@ -20,7 +20,7 @@ RUN CGO_ENABLED=0 go build -o flow-voting-tool-server ./main

FROM alpine:latest
ENV CWD "/flow-voting-tool/"
ENV SNAPSHOT_BASE_URL "https://snapshot.brud.dev"
ENV SNAPSHOT_BASE_URL "https://snapshotter.production.cast.dapperlabs.com"
ENV TX_OPTIONS_ADDRS "0xe0de919ed4ebeee4 0x7f81b82fa0e59b17"
RUN apk --no-cache add ca-certificates
COPY --from=vt-build /flow-voting-tool /flow-voting-tool
Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile.kube
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# BUILD BIN

FROM golang:1.17.7 as vt-init
FROM golang:1.18.4 as vt-init
# Install go modules
WORKDIR /flow-voting-tool
COPY ./go.mod ./
Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile.local
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BUILD BIN

FROM golang:1.17.7 as vt-init
FROM golang:1.18.4 as vt-init
# Install go modules
WORKDIR /flow-voting-tool
COPY ./go.mod ./
Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:latest as vt-init
FROM golang:1.18.4 as vt-init
# Install go modules
WORKDIR /flow-voting-tool
COPY ./go.mod ./
Expand Down
15 changes: 14 additions & 1 deletion backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,20 @@ test:

build_and_run: build run

macrun: build_macos run
macrun: build_macos run && NFTdeploy

nft:
flow accounts add-contract NonFungibleToken ./main/cadence/contracts/NonFungibleToken.cdc && \
flow accounts add-contract MetadataViews ./main/cadence/contracts/MetadataViews.cdc && \
flow accounts add-contract ExampleNFT ./main/cadence/contracts/ExampleNFT.cdc && \
flow transactions send ./main/cadence/transactions/setup_flow_token_account.cdc && \
flow transactions send ./main/cadence/transactions/setup_account_to_receive_royalty.cdc /storage/flowTokenVault && \
flow transactions send ./main/cadence/transactions/mint_nft.cdc 0xf8d6e0586b0a20c7 "dev_nft" "don't try at home" "thumnbail goes here" '[0.8]' '["royalties"]' '[0xf8d6e0586b0a20c7]'

float:
flow accounts add-contract GrantedAccountAccess ./main/cadence/float/GrantedAccountAccess.cdc && \
flow accounts add-contract FLOAT ./main/cadence/float/FLOAT.cdc && \
flow accounts add-contract FLOATVerifiers ./main/cadence/float/FLOATVerifiers.cdc

macdev:
APP_ENV=DEV make macrun
Expand Down
14 changes: 10 additions & 4 deletions backend/flow.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@
"FlowToken": {
"source": "./cadence/contracts/FlowToken.cdc",
"aliases": {
"emulator": "0x0ae53cb6e3f42a79"
"emulator": "0x0ae53cb6e3f42a79",
"testnet": "0x7e60df042a9c0868",
"mainnet": "0x1654653399040a61"
}
},
"NonFungibleToken": {
"source": "./cadence/contracts/NonFungibleToken.cdc",
"aliases": {
"emulator": "0xf8d6e0586b0a20c7"
"emulator": "0xf8d6e0586b0a20c7",
"testnet": "0x631e88ae7f1d7c20",
"mainnet": "0x1d7e57aa55817448"
}
},
"ExampleNFT": {
Expand All @@ -35,7 +39,9 @@
"MetadataViews": {
"source": "./cadence/contracts/MetadataViews.cdc",
"aliases": {
"emulator": "0xf8d6e0586b0a20c7"
"emulator": "0xf8d6e0586b0a20c7",
"testnet": "0x631e88ae7f1d7c20",
"mainnet": "0x1d7e57aa55817448"
}
}
},
Expand Down Expand Up @@ -76,7 +82,7 @@
},
"deployments": {
"emulator": {
"emulator-account": ["NonFungibleToken", "ExampleNFT", "MetadataViews"],
"emulator-account": ["NonFungibleToken", "MetadataViews", "ExampleNFT"],
"emulator-user1": [],
"emulator-user2": [],
"emulator-user3": [],
Expand Down
95 changes: 51 additions & 44 deletions backend/go.mod
Original file line number Diff line number Diff line change
@@ -1,68 +1,63 @@
module github.com/DapperCollectives/CAST/backend

go 1.17
go 1.18

require (
github.com/axiomzen/envconfig v1.3.0
github.com/bjartek/overflow v0.0.0-20220421162831-bed308def2ad
github.com/bjartek/overflow v1.0.0-rc1
github.com/georgysavva/scany v0.3.0
github.com/go-playground/validator/v10 v10.10.0
github.com/google/uuid v1.3.0
github.com/gorilla/mux v1.8.0
github.com/jackc/pgx/v4 v4.14.1
github.com/joho/godotenv v1.4.0
github.com/onflow/cadence v0.23.3
github.com/onflow/flow-go-sdk v0.24.0
github.com/onflow/cadence v0.24.2-0.20220627202951-5a06fec82b4a
github.com/onflow/flow-go-sdk v0.26.6-0.20220712195924-6920f8f55b88
github.com/rs/zerolog v1.26.1
github.com/stretchr/testify v1.7.1
github.com/stretchr/testify v1.8.0
github.com/thoas/go-funk v0.9.2
google.golang.org/grpc v1.45.0
)

require (
cloud.google.com/go v0.99.0 // indirect
cloud.google.com/go/kms v1.0.0 // indirect
cloud.google.com/go v0.100.2 // indirect
cloud.google.com/go/compute v1.3.0 // indirect
cloud.google.com/go/iam v0.3.0 // indirect
cloud.google.com/go/kms v1.4.0 // indirect
github.com/a8m/envsubst v1.3.0 // indirect
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de // indirect
github.com/bits-and-blooms/bitset v1.2.2 // indirect
github.com/btcsuite/btcd v0.22.0-beta // indirect
github.com/bwmarrin/discordgo v0.23.2 // indirect
github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 // indirect
github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgraph-io/badger/v2 v2.2007.4 // indirect
github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de // indirect
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/ef-ds/deque v1.0.4 // indirect
github.com/enescakir/emoji v1.0.0 // indirect
github.com/envoyproxy/go-control-plane v0.10.1 // indirect
github.com/envoyproxy/protoc-gen-validate v0.6.2 // indirect
github.com/ethereum/go-ethereum v1.9.13 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/fxamacker/cbor/v2 v2.3.1-0.20211029162100-5d5d7c3edd41 // indirect
github.com/fxamacker/circlehash v0.2.0 // indirect
github.com/fxamacker/cbor/v2 v2.4.1-0.20220515183430-ad2eae63303f // indirect
github.com/fxamacker/circlehash v0.3.0 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-test/deep v1.0.5 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.3 // indirect
github.com/google/go-cmp v0.5.7 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/googleapis/gax-go/v2 v2.1.1 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/gosuri/uilive v0.0.4 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hexops/autogold v1.3.0 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/hexops/valast v1.4.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/ipfs/go-block-format v0.0.3 // indirect
github.com/ipfs/go-cid v0.1.0 // indirect
github.com/ipfs/go-datastore v0.5.1 // indirect
github.com/ipfs/go-ipfs-util v0.0.2 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.10.1 // indirect
github.com/jackc/pgio v1.0.0 // indirect
Expand All @@ -71,14 +66,13 @@ require (
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
github.com/jackc/pgtype v1.9.1 // indirect
github.com/jackc/puddle v1.2.0 // indirect
github.com/jbenet/goprocess v0.1.4 // indirect
github.com/kevinburke/go-bindata v3.22.0+incompatible // indirect
github.com/klauspost/compress v1.12.3 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/klauspost/compress v1.15.1 // indirect
github.com/klauspost/cpuid/v2 v2.0.14 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/libp2p/go-buffer-pool v0.0.2 // indirect
github.com/libp2p/go-libp2p-core v0.11.0 // indirect
github.com/libp2p/go-libp2p-tls v0.3.1 // indirect
github.com/libp2p/go-libp2p-core v0.15.1 // indirect
github.com/libp2p/go-libp2p-tls v0.4.1 // indirect
github.com/libp2p/go-openssl v0.0.7 // indirect
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
github.com/magiconair/properties v1.8.5 // indirect
Expand All @@ -90,26 +84,32 @@ require (
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/multiformats/go-base32 v0.0.4 // indirect
github.com/multiformats/go-base36 v0.1.0 // indirect
github.com/multiformats/go-multiaddr v0.4.1 // indirect
github.com/multiformats/go-multiaddr v0.5.0 // indirect
github.com/multiformats/go-multibase v0.0.3 // indirect
github.com/multiformats/go-multicodec v0.4.1 // indirect
github.com/multiformats/go-multihash v0.1.0 // indirect
github.com/multiformats/go-varint v0.0.6 // indirect
github.com/onflow/atree v0.2.0 // indirect
github.com/onflow/flow-cli v0.33.0 // indirect
github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.0 // indirect
github.com/onflow/flow-core-contracts/lib/go/templates v0.11.0 // indirect
github.com/onflow/flow-emulator v0.31.0 // indirect
github.com/nightlyone/lockfile v1.0.0 // indirect
github.com/onflow/atree v0.4.0 // indirect
github.com/onflow/flow-cli/pkg/flowkit v0.0.0-20220708202053-3b2866146b5f // indirect
github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.2-0.20220620142725-49b5accb2a84 // indirect
github.com/onflow/flow-core-contracts/lib/go/templates v0.11.2-0.20220513155751-c4c1f8d59f83 // indirect
github.com/onflow/flow-emulator v0.33.4-0.20220705151023-2cc6a4f25a20 // indirect
github.com/onflow/flow-ft/lib/go/contracts v0.5.0 // indirect
github.com/onflow/flow-go v0.25.5-0.20220330212458-32bda868ae65 // indirect
github.com/onflow/flow-go v0.25.13-0.20220706165514-abf4535fe946 // indirect
github.com/onflow/flow-go/crypto v0.24.3 // indirect
github.com/onflow/flow/protobuf/go/flow v0.2.4 // indirect
github.com/onflow/flow/protobuf/go/flow v0.3.1 // indirect
github.com/onflow/sdks v0.4.4 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/psiemens/sconfig v0.1.0 // indirect
github.com/rivo/uniseg v0.2.1-0.20211004051800-57c86be7915a // indirect
github.com/sethvargo/go-retry v0.1.0 // indirect
github.com/sanity-io/litter v1.5.5 // indirect
github.com/sethvargo/go-retry v0.2.3 // indirect
github.com/shurcooL/go-goon v0.0.0-20210110234559-7585751d9a17 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/afero v1.8.2 // indirect
Expand All @@ -119,27 +119,34 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.10.1 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/turbolent/prettier v0.0.0-20220320183459-661cc755135d // indirect
github.com/uber/jaeger-client-go v2.29.1+incompatible // indirect
github.com/uber/jaeger-lib v2.4.0+incompatible // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v4 v4.3.11 // indirect
github.com/vmihailenco/tagparser v0.1.1 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/zeebo/blake3 v0.2.2 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/zeebo/blake3 v0.2.3 // indirect
go.opencensus.io v0.23.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
golang.org/x/exp v0.0.0-20220706164943-b4a6d9510983 // indirect
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
golang.org/x/net v0.0.0-20220418201149-a630d4f3e7a2 // indirect
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.10 // indirect
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
gonum.org/v1/gonum v0.11.0 // indirect
google.golang.org/api v0.63.0 // indirect
google.golang.org/api v0.70.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220211171837-173942840c17 // indirect
google.golang.org/protobuf v1.27.1 // indirect
google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.1.7 // indirect
mvdan.cc/gofumpt v0.1.0 // indirect
)
Loading