you can use this to call the contribute method:
contract.methods["contribute()"].sendTransaction({value: 2});
or
sendTransaction({ from: "0x111" , to: instance, value:1, data: web3.eth.abi.encodeFunctionSignature('contribute()')
| [ | |
| { | |
| "coordinates": null, | |
| "truncated": false, | |
| "created_at": "Tue Aug 28 21:16:23 +0000 2012", | |
| "favorited": false, | |
| "id_str": "240558470661799936", | |
| "in_reply_to_user_id_str": null, | |
| "entities": { | |
| "urls": [ |
| NSString *mockResponse = @"{\ | |
| \"account_balance\": \"304.34\",\ | |
| \"bank_account_number\": \"03168943233\",\ | |
| \"bank_account_type\": \"POSB\",\ | |
| }"; | |
| NSError *jsonError; | |
| NSData *objectData = [mockResponse dataUsingEncoding:NSUTF8StringEncoding]; | |
| NSDictionary *json = [NSJSONSerialization JSONObjectWithData:objectData | |
| options:NSJSONReadingMutableContainers |
| require 'spec_helper' | |
| describe 'Rails Transaction Demonstration' do | |
| it 'Should rollback due to any exception raised' do | |
| expect { | |
| ActiveRecord::Base.transaction do | |
| NotificationHistory.create!(transporter: 'should not see this') |
| require 'net/http' | |
| require 'json' | |
| require 'uri' | |
| # tokens can be obtained from https://api.slack.com/docs/oauth-test-tokens | |
| @token = '' | |
| def list_files | |
| ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago | |
| params = { |
| package main | |
| import ( | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "crypto/rand" | |
| "io" | |
| "io/ioutil" | |
| "log" | |
| "os" |