Coder Social home page Coder Social logo

Problems with Switchboard about flow-ft HOT 6 CLOSED

onflow avatar onflow commented on July 30, 2024
Problems with Switchboard

from flow-ft.

Comments (6)

alilloig avatar alilloig commented on July 30, 2024

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.

alilloig avatar alilloig commented on July 30, 2024

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.

bjartek avatar bjartek commented on July 30, 2024

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.

alilloig avatar alilloig commented on July 30, 2024

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.

bluesign avatar bluesign commented on July 30, 2024

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.

bjartek avatar bjartek commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.