Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect attribute when emitting VaultCapabilityAdded in FungibleTokenSwitchboard #92

Closed
ggpt-labs opened this issue Sep 16, 2022 · 0 comments · Fixed by #89
Closed
Assignees
Labels
bug Something isn't working Feedback SC-Eng Issues that we want to see surfaced in SC-Eng ZH Board

Comments

@ggpt-labs
Copy link

Instructions

Within FungibleTokenSwitchboard contract, there is an Incorrect emission of switchboardOwner attribute in event emission.

In this line: https://github.com/onflow/flow-ft/blob/master/contracts/FungibleTokenSwitchboard.cdc#L108
The event VaultCapabilityAdded should emit self.owner?.address for the switchboardOwner attribute.
It currently points to the address of the capability owner rather than the switchboard owner.

This line in the FungibleTokenSwitchboard emits the correct switchboardOwner attribute: https://github.com/onflow/flow-ft/blob/master/contracts/FungibleTokenSwitchboard.cdc#L74

@ggpt-labs ggpt-labs added bug Something isn't working Feedback labels Sep 16, 2022
@alilloig alilloig added T-Bug 🐞 SC-Eng Issues that we want to see surfaced in SC-Eng ZH Board labels Sep 16, 2022
@alilloig alilloig linked a pull request Nov 23, 2022 that will close this issue
7 tasks
alilloig added a commit that referenced this issue Nov 23, 2022
alilloig added a commit that referenced this issue Nov 29, 2022
alilloig added a commit that referenced this issue Nov 29, 2022
joshuahannan added a commit that referenced this issue Mar 14, 2023
* avoid oppressive terminology

* avoid oppressive terminology

* Create FungibleTokenMetadataViews contract, include MetadataViews contract from NFT repo

* Apply suggestions from code review

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>

* Fix CI

* Remove unnecesary init parameter on ftvaultdata

* Fix CI

* Remove thumbnail and images from FTDisplay, add logo as only image and symbol string field

* Restore files after the testing crisis

* Fix setup account from view test

* Add auxiliary function for returning views and the case for returning the FTView

* Change logo (media) for logos (medias) at FTView

* Add comments and use of getFTView function instead of resolveView

* Add scripts for read metadata

* Delete returnview functions

* Switch to MetadataPublicPath

* Add metadata path

* Change balance for metadata path at transactions. Fix FTVaultData construction at ExampleToken

* Add default implementation for MetadataViews.Resolver methods

* Update contracts/FungibleToken.cdc

Co-authored-by: Peter Siemens <peterjsiemens@gmail.com>

* Update contracts/FungibleToken.cdc

Co-authored-by: Peter Siemens <peterjsiemens@gmail.com>

* Update contracts/FungibleTokenMetadataViews.cdc

Co-authored-by: Peter Siemens <peterjsiemens@gmail.com>

* Update contracts/FungibleTokenMetadataViews.cdc

Co-authored-by: Peter Siemens <peterjsiemens@gmail.com>

* Update contracts/FungibleToken.cdc

Co-authored-by: Peter Siemens <peterjsiemens@gmail.com>

* Update contracts/FungibleTokenMetadataViews.cdc

Co-authored-by: Peter Siemens <peterjsiemens@gmail.com>

* Update contracts/FungibleTokenMetadataViews.cdc

Co-authored-by: Peter Siemens <peterjsiemens@gmail.com>

* Update contracts/FungibleTokenMetadataViews.cdc

Co-authored-by: Peter Siemens <peterjsiemens@gmail.com>

* Update contracts/FungibleTokenMetadataViews.cdc

Co-authored-by: Peter Siemens <peterjsiemens@gmail.com>

* Update contracts/FungibleTokenMetadataViews.cdc

Co-authored-by: Peter Siemens <peterjsiemens@gmail.com>

* Update contracts/FungibleTokenMetadataViews.cdc

Co-authored-by: Peter Siemens <peterjsiemens@gmail.com>

* Add consistency about vaultData field name

* Fix spelling typos

* FT metadata docs section

* Finish docs

* add metadata views to go tests

* move view methods to the balance interface

* Remove MetadataViews import from FungibleToken contract

* Normalize flow.json

* Split test suites

* Move timeout to jest config instead of per test suite

* Update go test for metadataviews

* get go tests working

* update ci

* Change references to ResolvePublicPath for VaultPublicPath

* Separate metadata tests from core features

* Create folder only for metadata transactions

* Rename utilityContracts folder as utility

* Remove the need of linking a resolver on the provider for returning a FTVaultData

* Add test case for FTDisplay and kill bug on ExampleToken catched with said test

* Fix github ci to get latest Flow CLI version

* Fix bug on event from issue #92

* Standarize comments on Example Token

* Standarize comments to docgen tool format on the FungibleToken contract interface

* Include contracts docs

* Fix broken links

* Update package.json version

* Fix typos

* Fix public path after merge conflicts

* Bump decode-uri-component from 0.2.0 to 0.2.2 in /lib/js/test (#105)

Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](SamVerschueren/decode-uri-component@v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add functionality to switchboard to link receiver capabilities to different receiver types (#107)

* Link the capabilty to the FT.Receiver also

* Add addNewVaultWrapper method

* Move create forwarder tx to its own folder

* Undo folder change to avoid modify tests

* Typo

* Create tx to add vault capability specifying the type to be deposited

* Create test for adding vault wrapper capability

* Make test

* Fix test name

* Fix comment

* Update version

* Update docs

* Update README.md

Co-authored-by: Joshua Hannan <hannanjoshua19@gmail.com>

* Fix ci

* Update flow-cli version in ci workflow to 0.41.2 for flow-js-testing compatibility

Co-authored-by: Joshua Hannan <hannanjoshua19@gmail.com>
Co-authored-by: Giovanni Sanchez <108043524+sisyphusSmiling@users.noreply.github.com>

* add import addresses

* Bump github.com/ethereum/go-ethereum in /lib/go/test (#117)

Bumps [github.com/ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) from 1.9.13 to 1.10.22.
- [Release notes](https://github.com/ethereum/go-ethereum/releases)
- [Commits](ethereum/go-ethereum@v1.9.13...v1.10.22)

---
updated-dependencies:
- dependency-name: github.com/ethereum/go-ethereum
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump golang.org/x/text from 0.3.7 to 0.3.8 in /lib/go/test (#121)

Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.7 to 0.3.8.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](golang/text@v0.3.7...v0.3.8)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump golang.org/x/net in /lib/go/test (#122)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20220812174116-3211cb980234 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/commits/v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump golang.org/x/text from 0.3.3 to 0.3.8 in /lib/go/templates (#120)

* Bump golang.org/x/text from 0.3.3 to 0.3.8 in /lib/go/templates

Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.3 to 0.3.8.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](golang/text@v0.3.3...v0.3.8)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* tidy

* update gomod

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Josh Hannan <hannanjoshua19@gmail.com>

* Bump golang.org/x/crypto from 0.0.0-20210220033148-5ea612d1eb83 to 0.1.0 in /lib/go/templates (#124)

* Bump golang.org/x/crypto in /lib/go/templates

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.0.0-20210220033148-5ea612d1eb83 to 0.1.0.
- [Release notes](https://github.com/golang/crypto/releases)
- [Commits](https://github.com/golang/crypto/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* go mod tidy

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Josh Hannan <hannanjoshua19@gmail.com>

* update to latest v2 standard

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Bastian Müller <bastian@axiomzen.co>
Co-authored-by: Álvaro Lillo Igualada <alvaro.lillo@dapperlabs.com>
Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>
Co-authored-by: Peter Siemens <peterjsiemens@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Giovanni Sanchez <108043524+sisyphusSmiling@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Feedback SC-Eng Issues that we want to see surfaced in SC-Eng ZH Board
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants