Comments (6)
Hi @bjartek! Thanks for rising your concerns about this. There wasn't a FLIP for this, but a rather a design proposal, as well as a PR where this feature got discussed. (This happened before summer so you may not remember it).
I'll take a look at your examples and come back to you.
from flow-ft.
I'm not following you with the FlowToken.Vault
thing. The switchboard exposes the deposit(from: @FungibleToken.Vault)
method from the {FungibleToken.Receiver}
, being able to redirect the deposited vault to a capability pointing to &{FungibleToken.Receiver}
(e.g. a @ShardedWallet.Wallet
)
I'm very interested in discussing how can we improve the events emitted by this contract, I'll take a calm look at that latter!
from flow-ft.
Right now if I create a wrapper around an FlowToken.Vault I cannot register that said wrapper should be called when FlowToken.Vault is sent to switchboard. The dictionary stores things on implementation type not supported type or underlying type.
So the issue is not with sending funds, it is how to register when something can receive some funds.
from flow-ft.
Could you post a little gist example of what you are trying to explain? You could only add Capability<&{FungibleToken.Receiver}>
to the switchboard, since the goal of this was to create a single Receiver object for receiving Royalties, that could route the funds to different types of Receiver, but maybe there was a wider way of storing those Receivers that we didn't think about
from flow-ft.
I think this should be a one tool of many for 1 to N
distribution, this shouldn't be a standard.
This is a utility contract in my understanding. Maybe we can communicate that more clear as not standard, but a utility contract ? Like Offers or StoreFront ( though StoreFront seems a bit debatable )
This switchboard is not compatible with TokenForwarding on dapper wallet either since the type of the receiver vault is not FlowToken.Vault but TokenForwarding.
Isn't this should replace TokenForwarding ?
from flow-ft.
I forked and created a small overflow script here to show my point, I only use standard flow/dapper contracts. The ExampleToken and the TokenForwader.
clone:
https://github.com/bjartek/flow-ft
run go run main.go
As you can see the last transaction fails because when i try to deposit ExampleToken to Alice
it does not work because she only has TokenForwarder for ExampleToken
registered and not ExampleToken
What can be done to fix it? Allow sending in the type/types your capability accepts as input.
from flow-ft.
Related Issues (20)
- Adequate comments to docgen tool and include generated docs in repo
- feat: Allow public Switchboard to be used as FT Receiver HOT 2
- FungibleTokenSwitchboard is not interoperable with TokenForwarding HOT 3
- Check PrivateForwarder transactions and tests HOT 1
- error: cannot deploy invalid contract HOT 4
- Add Practical Token Setup and Transfer transactions that utilize switchboard HOT 3
- safeDeposit and addNewVaultsByPath methods on switchboard are not entirely panic free HOT 6
- Make TokenForwarder and Switchboard target capabilities retrievable
- Update contract import schema HOT 1
- [DOCS] Add documentation for FungibleTokenMetadataViews HOT 2
- Flow CLI: Transaction Error [Error Code: 1101] pre-condition failed: Cannot deposit an incompatible token type HOT 2
- Build FT Metadata Views features
- Add FT Metadata Views to Example Token contract
- DOCS: Update FT documentation to include Metadata Views including examples
- Incorrect attribute when emitting `VaultCapabilityAdded` in FungibleTokenSwitchboard
- Update flow-ft contracts to comply with Stable Cadence changes
- cannot borrowViewResolver for some NFT HOT 2
- Normalize flow.json
- Refactor utilityContracts folder into utility folder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flow-ft.