How to run smart contract function using nethereum to return a result

0 votes

This is the function:

function getUserAtIndex(uint index)
    public
    constant
    returns(bytes32 userKey)
  {
    return userIndex[index];
  }

I've deployed the contract and can get the function using:

  var getUserAtIndex = contract.GetFunction("getUserAtIndex");
Oct 24, 2018 in Blockchain by digger
• 26,740 points
1,887 views

1 answer to this question.

0 votes

Try this:

var result = getUserAtIndex.CallAsync<byte[]>(123);
answered Oct 24, 2018 by Omkar
• 69,210 points

Related Questions In Blockchain

0 votes
1 answer
0 votes
1 answer

How do I send back ethers to the sender of the tokens in a smart contract?

Whenever a smart contract receives ether via ...READ MORE

answered May 30, 2018 in Blockchain by Perry
• 17,100 points
3,366 views
0 votes
1 answer

How is a request sent from an app to a smart contract?

Yes, the contract is distributed by every node ...READ MORE

answered Jun 4, 2018 in Blockchain by Perry
• 17,100 points
563 views
0 votes
1 answer

How to get the current state of a smart contract?

Hey, you gotta provide the contract code, and ...READ MORE

answered Aug 1, 2018 in Blockchain by Perry
• 17,100 points
900 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,691 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,232 views
+3 votes
2 answers

How to run ethereumjs using Node.JS

You need to install testrpc globally on ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,610 points
961 views
0 votes
1 answer

How to call a payable contract function from truffle console?

You can use a contract function, on ...READ MORE

answered Jan 24, 2019 in Blockchain by Omkar
• 69,210 points
2,310 views
+1 vote
4 answers

How to estimate the cost for deploying smart contract on mainnet?

Since you have already deployed the contract ...READ MORE

answered Apr 10, 2018 in Blockchain by Shashank
• 10,400 points
14,725 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