Giter VIP home page Giter VIP logo

Comments (5)

nicola avatar nicola commented on July 16, 2024

Nicola's problem:

  • The current version does not allow for sending money to a contract that will trigger a special function.
  • In Ethereum you can send a transaction that executes a function call that passes the money to the contract account.

Nicola's possible solution:

  • Make TokenActor a special contract
  • Add "Amount" in "Message"
  • Add condition for the miner: if a message has an amount move amount to the Receiver

from specs.

dignifiedquire avatar dignifiedquire commented on July 16, 2024

The current version does not allow for sending money to a contract that will trigger a special function.

Not entirely, it is simply not defined right now, as we have not yet defined the permissions of the transfer method.

In Ethereum you can send a transaction that executes a function call that passes the money to the contract account.

Yes, but the system is pretty complicated, and looking at the docs quite easy to get wrong. That said they achieve this through specific methods that are called when transfering money that check if the contract has the correct permissions.

Make TokenActor a special contract

What kind of special? How would this get around the issue?

Add "Amount" in "Message"
Add condition for the miner: if a message has an amount move amount to the Receiver

This would make me very sad, and not necessarily solve the issue as we would run into the 4th issue mentioned in the security considerations from ethereum, as far as I understand.

from specs.

dignifiedquire avatar dignifiedquire commented on July 16, 2024

Some more relevant thoughts: https://github.com/ConsenSys/Ethereum-Development-Best-Practices/wiki/Fallback-functions-and-the-fundamental-limitations-of-using-send()-in-Ethereum-&-Solidity

from specs.

dignifiedquire avatar dignifiedquire commented on July 16, 2024

Need to do some reading on how, polkadot and tezos do this.

from specs.

whyrusleeping avatar whyrusleeping commented on July 16, 2024

It would be helpful to have a few sample usecases of "send money to a function call on another actor". This in general isnt really that difficult, its going to be the same sort of logic that multisig wallet contracts in ethereum use to invoke other contracts.

from specs.

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.