Skip to content

Commit

Permalink
Merge pull request #96 from onflow/stable-cadence-refactor
Browse files Browse the repository at this point in the history
Merge Stable Cadence Changes to main
  • Loading branch information
joshuahannan authored May 21, 2024
2 parents 6662b80 + 53f1509 commit 63ddee7
Show file tree
Hide file tree
Showing 76 changed files with 4,881 additions and 12,350 deletions.
47 changes: 20 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,32 @@ jobs:
name: NFTStorefront V2 Integration Tests
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.16"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 15.0.0
cache: 'npm'
cache-dependency-path: lib/js/test/package-lock.json
submodules: "true"
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.20
- name: Install Flow CLI
run: sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)" -- v0.43.0
- name: Flow cli Version
run: flow version
- name: Update PATH
run: echo "/root/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: cd lib/js/test && npm ci
run: sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/feature/stable-cadence/install.sh)"
- name: Run tests
run: cd lib/js/test && npm run test
V1-Integration-Tests:
run: flow test -f ./flow.testing.json --cover --covercode="contracts/NFTStorefrontV2.cdc" ./test/NFTStorefrontV2_test.cdc
V2-Integration-Tests:
name: NFTStorefront V1 Integration Tests
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.16'
- uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: make ci
- uses: actions/checkout@v3
with:
submodules: "true"
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.20
- name: Install Flow CLI
run: sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/feature/stable-cadence/install.sh)"
- name: Run tests
run: flow test -f ./flow.testing.json --cover --covercode="contracts/NFTStorefront.cdc" ./test/NFTStorefrontV1_test.cdc

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
lib/js/test/node_modules/*
.idea
coverage.json
*.pkey
*.pub
.env
.env
19 changes: 11 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
.PHONY: update-mainnet
update-mainnet:
$(MAKE) flow accounts update-contract NFTStorefrontV2 ./contracts/NFTStorefrontV2.cdc --signer mainnet-account --network mainnet -f ./flow.mainnet.json

.PHONY: update-testnet
update-testnet:
$(MAKE) flow accounts update-contract NFTStorefrontV2 ./contracts/NFTStorefrontV2.cdc --signer testnet-account --network testnet -f ./flow.testnet.json

.PHONY: test
test:
$(MAKE) generate -C lib/go
$(MAKE) test -C lib/go
flow-c1 test --cover --covercode="contracts" tests/*.cdc

.PHONY: ci
ci:
$(MAKE) ci -C lib/go

.PHONY: update-mainnet
update-mainnet:
$(MAKE) flow accounts update-contract NFTStorefrontV2 ./contracts/NFTStorefrontV2.cdc --signer mainnet-account --network mainnet -f ./flow.mainnet.json

.PHONY: update-testnet
update-testnet:
$(MAKE) flow accounts update-contract NFTStorefrontV2 ./contracts/NFTStorefrontV2.cdc --signer testnet-account --network testnet -f ./flow.testnet.json
flow-c1 test --cover --covercode="contracts" tests/*.cdc
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Detailed docs: [docs/documentation.md](docs/documentation.md)

## Contract Addresses

|Name|Testnet|Mainnet|
|----|-------|-------|
|[NFTStorefront](contracts/NFTStorefront.cdc)|[0x94b06cfca1d8a476](https://testnet.flowdiver.io/contract/A.94b06cfca1d8a476.NFTStorefront)|[0x4eb8a10cb9f87357](https://www.flowdiver.io/contract/A.4eb8a10cb9f87357.NFTStorefront)|
|[NFTStorefrontV2 (recommended)](contracts/NFTStorefrontV2.cdc)|[0x2d55b98eb200daef](https://testnet.flowdiver.io/contract/A.2d55b98eb200daef.NFTStorefrontV2)|[0x4eb8a10cb9f87357](https://www.flowdiver.io/contract/A.4eb8a10cb9f87357.NFTStorefrontV2)|
|Name|Testnet|Previewnet|Mainnet|
|----|-------|------|-------|
|[NFTStorefront](contracts/NFTStorefront.cdc)|[0x94b06cfca1d8a476](https://flow-view-source.com/testnet/account/0x94b06cfca1d8a476/contract/NFTStorefront)|[0x6df5e52755433994](contracts/NFTStorefront.cdc)|[0x4eb8a10cb9f87357](https://flowscan.org/contract/A.4eb8a10cb9f87357.NFTStorefront)|
|[NFTStorefrontV2 (recommended)](contracts/NFTStorefrontV2.cdc)|[0x2d55b98eb200daef](https://flow-view-source.com/testnet/account/0x2d55b98eb200daef/contract/NFTStorefrontV2)|[0x6df5e52755433994](contracts/NFTStorefrontV2.cdc)|[0x4eb8a10cb9f87357](https://flowscan.org/contract/A.4eb8a10cb9f87357.NFTStorefrontV2)|

## Usage

Expand Down
Loading

0 comments on commit 63ddee7

Please sign in to comment.