Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

contrib.smartcontract: Invoke smart contract methods #104

Closed
metachris opened this issue Nov 27, 2017 · 2 comments
Closed

contrib.smartcontract: Invoke smart contract methods #104

metachris opened this issue Nov 27, 2017 · 2 comments
Labels
HACKIT Hackable Issue for Hackathons

Comments

@metachris
Copy link
Contributor

Feature: Functionality for contrib.smartcontract to invoke SC methods.

I'm currently working on this. Using this issue for discussion, brainstorming and feedback.

As a reference: This was done for another project (imusify) like this: https://github.com/imusify/blockchain-middleware/blob/imusify2/imusify/imusmartcontract.py#L105

Thinking about a better way to integrate this -- in the above example it was a bit cumbersome with the wallet handling, waiting for the transactions to show up, and sometimes the wallet not showing correctly synced balances (this has been solved by the new neo-python updates).

@localhuman localhuman added the HACKIT Hackable Issue for Hackathons label Mar 16, 2018
@nettijoe96
Copy link

nettijoe96 commented Mar 17, 2018

Yeah there is definitely some developer issues in having transactions wait and balances not update.

  • One possibility is to have a local state that automatically updates after a transaction is sent to the network if the transaction will likely change the state of the blockchain. Bitcoin core does this with bitcoin-cli. In bitcoin core and everything forked from it (based on my tests) if you make a transaction, and send some bitcoin, the balance will change if you call ./bitcoin-cli getbalance (this is before the block is confirmed). Check out wallet/rpcwallet.cpp.
  • I am trying to think of the benefits and costs of keeping state changes locally until they are confirmed in a block. As the simplest example, it is a bit confusing to say that a balance changed because someone cannot distinguish between a state change and an unconfirmed transaction. So maybe the solution is to have the updated balance but say something like "unconfirmed." What are your thoughts?
  • The code that would have to be added is a way for the client to continually check the network and update one's personal wallet accordingly, which it already does. The code would also have to stop users from making any sort of tx that referenced unspent outputs of any sort from the previous unconfirmed contract/transaction until it is confirmed and in the blockchain. That could get a bit messy.

Thoughts?

@ixje
Copy link
Member

ixje commented Oct 1, 2019

Closing due to focus on NEO3

@ixje ixje closed this as completed Oct 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
HACKIT Hackable Issue for Hackathons
Projects
None yet
Development

No branches or pull requests

4 participants