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()')
| package main | |
| import ( | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "crypto/rand" | |
| "io" | |
| "io/ioutil" | |
| "log" | |
| "os" |
| 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 = { |
| 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') |
| 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 |
| [ | |
| { | |
| "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": [ |
#UI Caveats
http://stackoverflow.com/questions/19927542/ios7-backgroundimage-for-uisearchbar
//clear the transparent background when search bar promot
[self.searchDisplayController.searchBar setBackgroundImage:[self imageWithColor:[UIColor yourColor]]
forBarPosition:0
barMetrics:UIBarMetricsDefault];
| { | |
| "movies": [ | |
| { | |
| "id": "771313962", | |
| "title": "Avengers: Age of Ultron", | |
| "year": 2015, | |
| "mpaa_rating": "PG-13", | |
| "runtime": 141, | |
| "critics_consensus": "", | |
| "release_dates": { |
| // | |
| // PhotoTableViewCell.swift | |
| // codepath_wk1e1 | |
| // | |
| // Created by Victor Liew on 5/3/15. | |
| // Copyright (c) 2015 alcedo. All rights reserved. | |
| // | |
| import UIKit |
| https://gist.github.com/josevalim/fb706b1e933ef01e4fb6 | |
| https://gist.github.com/gonzalo-bulnes/7659739 | |
| https://github.com/plataformatec/devise/issues/2739 | |
| https://gist.github.com/danielgatis/5666941 | |
| http://stackoverflow.com/questions/20319961/restful-login-with-devise-rails-4 | |
| http://chasseurmic.github.io/chasseurmic/blog/2013/02/13/restful-api-authentication/ | |
| http://lucatironi.github.io/tutorial/2013/05/05/ruby_rails_rubymotion_ios_app_authentication_devise_tutorial_part_one/ | |
| http://blog.codebykat.com/2012/07/23/remote-api-authentication-with-rails-3-using-activeresource-and-devise/ | |
| http://codedecoder.wordpress.com/2013/01/08/devise-login-with-authentication_token/ |