Skip to content

Commit 03372f2

Browse files
joshuahannandsainati1bjartekSupunSsisyphusSmiling
authored
FEATURE: V2 FungibleToken Standard (#131)
* draft of v2 standard for working group * bring FT v2 up to latest design * adds total supply view and updates dependencies * update FungibleToken.cdc for Stable Cadence * integrate stable cadence changes * comment out events temp * add view to structs * use correct import placeholder * remove view modifier from resolveView * add default impl for getSupportedVaultTypes * remove default impl for getsupported * add Withdrawable to transfer * remove AnyResource * update dependencies for stable cadence * WIP updates to transactions for stable cadence * comment out default functions and remove Balance * remove restricted type from link * Update sdk * Update contracts * Update to Cadence v1.0.0-preview.1 * Revert changes to ExampleToken.cdc * add Cadence test cases for Metadata * add PrivateReceiverForwarder Cadence tests * consolidate Cadence test directories * bump flow CLI version for ci automation * update go assets * update utility contracts * update ExampleToken-v2 Vault to return TotalSupply view * update ExampleToken-v2 init to publish {FungibleToken.Vault} capability * update private forwarder transactions for Cadence 1.0 * update tests/scripts for Cadence 1.0 * update go assets * update go transaction templates * update transactions for Cadence 1.0 * update scripts for Cadence 1.0 * bump go version * add public burn method in ExampleToken-v2 * update create_forwarder & generic_transfer txns for Cadence 1.0 * update go assets * add ReceiverPublicPath to ExampleToken-v2 & update go tests + txns * update go assets * update go assets * rm ExampleToken-v2 dependency on MultipleVaults * update NonFungibleToken import syntax * update flow config with up to date dependencies * update MetadataViews Cadence tests, scripts & txns * update test_helpers.cdc to Cadence 1.0 syntax * update PrivateReceiverForwarder Cadence tests * enable FungibleToken.Receiver.getSupportedVaultTypes() in v2 standard impl * update switchboard Cadence tests & supporting scripts & txns * update ExampleToken-v2 Cadence tests * update go assets * bump flow cli version to v1.5.0-stable-cadence.3 * fix test script bugs & update go assets * update example_token_tests * remove ExampleToken.Minter.mintTokens() pre condition * add FT.Vault.getDefaultReceiverPath() method * update ExampleToken.Vault Capability setup & go assets * rm unused import from ExampleToken-v2 * update NonFungibleToken-v2 implementation from source repo * fix go GenerateTransferInvalidVaultScript() template txn generation * rm test bash script in favor of Makefile * fix example_token_tests burn event check * Apply suggestions from code review Co-authored-by: Joshua Hannan <hannanjoshua19@gmail.com> * update ExampleToken-v2.Vault receiverLinkedType + tests & go assets * update instances of ExampleToken to ExampleToken-v2 in flow.json & tests * remove transfer * remove default implementations and move destroy supply update * remove transfer event and remove event functions * remove custom destructor * add event args, global burn method, balance interface, and clean up tests * remove path functions and add view function * remove view modifier, add getIDs * remove view from data view function, updating forwarding events * add suport for multiple type definitions * remove get vault types function and add conformance * update dependencies and remove getVaultTypes line * remove burn method * add burner and add event emission functions * fix supply update and burner name * use conditional downcasting * fix access type * revert to event emission directly in the pre condition * update sdk and cadence deps * fix example token, remove getBalance, add isAvailableToWithdraw * generate assets * update transactions to get go tests passing * add post-condition for vault type * remove some go tests * add view functions to Balance and change transactions to use Balance instead of concrete type * use Balance and FungibleToken.Vault as public interfaces * use correct linked types * generate assets * update generic setup and transfer transactions * update generic transfer transactions * update contract borrows and ExampleToken import * update README for v2 standards * use correct import placeholder format * update previewnet address * update Burner for optional resources and add tests * revove coverage file * fix imports for standard transactions * add switchboard entitlements and tests * remove old code samples in the README and add links * add pre-condition to createEmptyVault * update dependencies * reorganize txs and scripts * add type to TokenForwarding * update comment and event test * move withdraw event and add balance after params * make event formatting prettier * add forwarding addresses * fix capabilities get in switchboard * use contract field and mint event * update CLI and emulator deps and tests --------- Co-authored-by: Daniel Sainati <sainatidaniel@gmail.com> Co-authored-by: Bjarte Stien Karlsen <bjarte@bjartek.org> Co-authored-by: Supun Setunga <supun.setunga@gmail.com> Co-authored-by: Giovanni Sanchez <108043524+sisyphusSmiling@users.noreply.github.com>
1 parent 6ec66e1 commit 03372f2

File tree

98 files changed

+6075
-4567
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+6075
-4567
lines changed

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ jobs:
1111
- uses: actions/checkout@v2
1212
- uses: actions/setup-go@v2
1313
with:
14-
go-version: '1.18.x'
14+
go-version: '1.20.x'
1515
- uses: actions/cache@v1
1616
with:
1717
path: ~/go/pkg/mod
1818
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
1919
restore-keys: |
2020
${{ runner.os }}-go-
2121
- name: Install Flow CLI
22-
run: sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)" -- v1.5.0
22+
run: sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/feature/stable-cadence/install.sh)"
2323
- name: Flow CLI Version
24-
run: flow version
24+
run: flow-c1 version
2525
- name: Update PATH
2626
run: echo "/root/.local/bin" >> $GITHUB_PATH
2727
- name: Run tests

.github/workflows/release.yml

-31
This file was deleted.

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
lib/js/test/node_modules/*
22
node_modules/*
3-
.env
3+
.env
4+
coverage.lcov
5+
coverage.json

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
test:
33
$(MAKE) generate -C lib/go
44
$(MAKE) test -C lib/go
5-
flow test --cover --covercode="contracts" tests/*.cdc
5+
flow-c1 test --cover --covercode="contracts" tests/*.cdc
66

77
.PHONY: ci
88
ci:
99
$(MAKE) ci -C lib/go
10-
flow test --cover --covercode="contracts" tests/*.cdc
10+
flow-c1 test --cover --covercode="contracts" tests/*.cdc

README.md

+195-325
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)