-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from onflow/init-go-package
Initialize go assets
- Loading branch information
Showing
24 changed files
with
1,851 additions
and
23 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,27 @@ | ||
--- | ||
name: Requesting a Feature or Improvement | ||
about: "For feature requests. Please search for existing issues first. Also see CONTRIBUTING." | ||
title: '' | ||
labels: Feedback, Feature, SC-Eng | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Instructions | ||
|
||
Please fill out the template below to the best of your ability and include a label indicating which tool/service you were working with when you encountered the problem. | ||
|
||
### Issue To Be Solved | ||
(Replace This Text: Please present a concise description of the problem to be addressed by this feature request. Please be clear what parts of the problem are considered to be in-scope and out-of-scope.) | ||
|
||
### (Optional): Suggest A Solution | ||
(Replace This Text: A concise description of your preferred solution. Things to address include: | ||
* Details of the technical implementation | ||
* Tradeoffs made in design decisions | ||
* Caveats and considerations for the future | ||
|
||
If there are multiple solutions, please present each one separately. Save comparisons for the very end.) | ||
|
||
### (Optional): Context | ||
|
||
<what are you currently working on that this is blocking?> |
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,18 @@ | ||
Closes: #??? | ||
|
||
## Description | ||
|
||
<!-- Add a description of the changes that this PR introduces and the files that | ||
are the most critical to review. | ||
--> | ||
|
||
______ | ||
|
||
For contributor use: | ||
|
||
- [ ] Targeted PR against `main` branch | ||
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. | ||
- [ ] Code follows the [standards mentioned here](https://github.com/onflow/contract-updater/blob/master/CONTRIBUTING.md#styleguides). | ||
- [ ] Updated relevant documentation | ||
- [ ] Re-reviewed `Files changed` in the Github PR explorer | ||
- [ ] Added appropriate labels |
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
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 |
---|---|---|
@@ -1,6 +1,10 @@ | ||
.PHONY: test | ||
test: | ||
$(MAKE) generate -C lib/go | ||
$(MAKE) test -C lib/go | ||
flow test --cover --covercode="contracts" --coverprofile="coverage.lcov" tests/*.cdc | ||
|
||
.PHONY: ci | ||
ci: test | ||
ci: | ||
$(MAKE) ci -C lib/go | ||
$(MAKE) test |
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
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
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
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,13 @@ | ||
.PHONY: test | ||
test: | ||
$(MAKE) test -C templates | ||
|
||
.PHONY: generate | ||
generate: | ||
$(MAKE) generate -C contracts | ||
$(MAKE) generate -C templates | ||
|
||
.PHONY: ci | ||
ci: | ||
$(MAKE) ci -C contracts | ||
$(MAKE) ci -C templates |
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,11 @@ | ||
.PHONY: generate | ||
generate: | ||
go generate | ||
|
||
.PHONY: check-tidy | ||
check-tidy: generate | ||
go mod tidy | ||
git diff --exit-code | ||
|
||
.PHONY: ci | ||
ci: check-tidy |
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,18 @@ | ||
package contracts | ||
|
||
//go:generate go run github.com/kevinburke/go-bindata/go-bindata -prefix ../../../contracts -o internal/assets/assets.go -pkg assets -nometadata -nomemcopy ../../../contracts | ||
|
||
import ( | ||
_ "github.com/kevinburke/go-bindata" | ||
|
||
"github.com/onflow/contract-updater/lib/go/contracts/internal/assets" | ||
) | ||
|
||
const ( | ||
filenameMigrationContractStaging = "MigrationContractStaging.cdc" | ||
) | ||
|
||
func MigrationContractStaging() []byte { | ||
code := assets.MustAssetString(filenameMigrationContractStaging) | ||
return []byte(code) | ||
} |
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,5 @@ | ||
module github.com/onflow/contract-updater/lib/go/contracts | ||
|
||
go 1.20 | ||
|
||
require github.com/kevinburke/go-bindata v3.24.0+incompatible |
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 @@ | ||
github.com/kevinburke/go-bindata v3.24.0+incompatible h1:qajFA3D0pH94OTLU4zcCCKCDgR+Zr2cZK/RPJHDdFoY= | ||
github.com/kevinburke/go-bindata v3.24.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM= |
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,15 @@ | ||
.PHONY: test | ||
test: | ||
go test ./... | ||
|
||
.PHONY: generate | ||
generate: | ||
go generate | ||
|
||
.PHONY: check-tidy | ||
check-tidy: generate | ||
go mod tidy | ||
git diff --exit-code | ||
|
||
.PHONY: ci | ||
ci: check-tidy |
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,51 @@ | ||
module github.com/onflow/contract-updater/lib/go/templates | ||
|
||
go 1.20 | ||
|
||
require ( | ||
github.com/kevinburke/go-bindata v3.23.0+incompatible | ||
github.com/onflow/flow-go-sdk v1.0.0-M1 | ||
github.com/stretchr/testify v1.8.4 | ||
) | ||
|
||
require ( | ||
github.com/SaveTheRbtz/mph v0.1.1-0.20240117162131-4166ec7869bc // indirect | ||
github.com/bits-and-blooms/bitset v1.7.0 // indirect | ||
github.com/btcsuite/btcd/btcec/v2 v2.2.1 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect | ||
github.com/ethereum/go-ethereum v1.13.5 // indirect | ||
github.com/fxamacker/cbor/v2 v2.4.1-0.20230228173756-c0c9f774e40c // indirect | ||
github.com/fxamacker/circlehash v0.3.0 // indirect | ||
github.com/golang/protobuf v1.5.3 // indirect | ||
github.com/holiman/uint256 v1.2.3 // indirect | ||
github.com/k0kubun/pp v3.0.1+incompatible // indirect | ||
github.com/klauspost/cpuid/v2 v2.2.5 // indirect | ||
github.com/kr/pretty v0.3.1 // indirect | ||
github.com/kr/text v0.2.0 // indirect | ||
github.com/logrusorgru/aurora/v4 v4.0.0 // indirect | ||
github.com/mattn/go-colorable v0.1.13 // indirect | ||
github.com/mattn/go-isatty v0.0.19 // indirect | ||
github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f // indirect | ||
github.com/onflow/cadence v1.0.0-M3 // indirect | ||
github.com/onflow/crypto v0.25.0 // indirect | ||
github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231121210617-52ee94b830c2 // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/rivo/uniseg v0.4.4 // indirect | ||
github.com/rogpeppe/go-internal v1.9.0 // indirect | ||
github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8b0eaed6c // indirect | ||
github.com/turbolent/prettier v0.0.0-20220320183459-661cc755135d // indirect | ||
github.com/x448/float16 v0.8.4 // indirect | ||
github.com/zeebo/blake3 v0.2.3 // indirect | ||
go.opentelemetry.io/otel v1.16.0 // indirect | ||
go.uber.org/goleak v1.2.1 // indirect | ||
golang.org/x/crypto v0.16.0 // indirect | ||
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect | ||
golang.org/x/sys v0.15.0 // indirect | ||
golang.org/x/text v0.14.0 // indirect | ||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect | ||
gonum.org/v1/gonum v0.13.0 // indirect | ||
google.golang.org/protobuf v1.31.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
) |
Oops, something went wrong.