Comments (5)
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.
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.
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.
Need to do some reading on how, polkadot and tezos do this.
from specs.
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)
- Architecture diagram SVG fails to render?
- Spec update for FIP 0024 HOT 1
- Spec update for FIP-0020 HOT 3
- Spec update to 0023
- Fix fault fees
- Update faulty period according to FIP-0026 HOT 4
- Add spec section for batch balancer
- Add spec for snap deal HOT 3
- The penalty mechanism of time and space proof
- i too many init miner... can i remove Owned Miner?? HOT 1
- Removal of Fuhon network implementation HOT 3
- Fix the deployment. HOT 6
- Filecoin Verify method is mentioned as Todo, is the implementation available for it. HOT 2
- Internal links/anchors on spec.filecoin.io don't open
- Where to find Filecoin’s network’s handshake specification?
- sector sealing specifics link to lotus source on github leads nowhere
- Multiple links broken HOT 1
- link broken HOT 1
- spec.filecoin.io DOWN HOT 1
- Let's update the spec! HOT 1
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 specs.