Smart contract limitations in Ethereum and Hyperledger Fabric

0 votes

I am trying to make a smart contract to achieve the following automatically. But I stuck in the implementation. How can I run the (2) Tx without having B to sign the Tx, ie: I want it to run automatically once (1) is activated and condition (2) is ready.

Pseudocode:

A send 50 to B        (1)
if (B > 50)           (2)
    B send 10 to C    (3)

The code above involves multiple owners, ie. A, B and C. Firstly, A actives the contract by running/signing Tx (1). Then the contract checks condition (2). Now but how can run(3) automatically without having to force B to sign?

Ultimately, is the contract able to sign (or proxy sign) on behave of B?

Sep 11, 2018 in Blockchain by sabby
• 4,370 points
672 views

1 answer to this question.

0 votes

No, the contract cannot sign on behave of B.

A starts the transactions by sending necessary funds to the contract, and then the contract disperses funds according to the rules. So, A -> contract, contract -> B and possibly, contract -> C.

Although it's outside the question raised, it will possibly help you avoid refactoring later to observe the best practice of separating the two sends if B and/or C are untrusted contracts. You would just do the accounting in the deposit step, and then use a withdrawal pattern as B & C claim their entitlements (separate transactions).

Hope it helps.

answered Sep 11, 2018 by Christine
• 15,790 points

Related Questions In Blockchain

+1 vote
7 answers
0 votes
1 answer
0 votes
1 answer

How to prevent the smart contract from being modified and deployed in the blockchain network?

To expand on Matthew's answer, each state ...READ MORE

answered Jul 6, 2018 in Blockchain by aryya
• 7,460 points
808 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,451 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,922 views
+1 vote
5 answers

Where does the smart contracts stored and executed on blockchain?

Ethereum smart contracts are executed on EVM ...READ MORE

answered May 3, 2018 in Blockchain by Shashank
• 10,400 points
9,332 views
0 votes
1 answer

sellprice and buyprice fixing in smart contract.

It is due to the fact you ...READ MORE

answered Oct 17, 2018 in Blockchain by Christine
• 15,790 points
601 views
+4 votes
2 answers

How do I create a new block in Hyperledger Fabric?

This link might help you: https://github.com/hyperledger/fabric-sample ...READ MORE

answered Oct 11, 2018 in Blockchain by Sahu
2,654 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP