contract object
This commit is contained in:
		
							
								
								
									
										6
									
								
								dist/ethereum.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								dist/ethereum.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										6
									
								
								dist/ethereum.js.map
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								dist/ethereum.js.map
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										2
									
								
								dist/ethereum.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/ethereum.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										2
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								index.js
									
									
									
									
									
								
							| @@ -3,6 +3,6 @@ web3.providers.WebSocketProvider = require('./lib/websocket'); | ||||
| web3.providers.HttpRpcProvider = require('./lib/httprpc'); | ||||
| web3.providers.QtProvider = require('./lib/qt'); | ||||
| web3.providers.AutoProvider = require('./lib/autoprovider'); | ||||
| web3.abi = require('./lib/abi'); | ||||
| web3.contract = require('./lib/abi'); | ||||
|  | ||||
| module.exports = web3; | ||||
|   | ||||
							
								
								
									
										15
									
								
								lib/abi.js
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								lib/abi.js
									
									
									
									
									
								
							| @@ -148,8 +148,17 @@ var fromAbiOutput = function (json, methodName, output) { | ||||
|     return result; | ||||
| }; | ||||
|  | ||||
| module.exports = { | ||||
|     toAbiInput: toAbiInput, | ||||
|     fromAbiOutput: fromAbiOutput | ||||
| var load = function (json) { | ||||
|     var contract = {}; | ||||
|     json.forEach(function (method) { | ||||
|         contract[method.name] = function () { | ||||
|             var params = Array.prototype.slice.call(arguments); | ||||
|             return toAbiInput(json, method.name, params); | ||||
|         }; | ||||
|     }); | ||||
|  | ||||
|     return contract; | ||||
| }; | ||||
|  | ||||
| module.exports = load; | ||||
|  | ||||
|   | ||||
| @@ -86,9 +86,7 @@ var ethMethods = function () { | ||||
|     { name: 'uncle', call: uncleCall }, | ||||
|     { name: 'compilers', call: 'eth_compilers' }, | ||||
|     { name: 'lll', call: 'eth_lll' }, | ||||
|     { name: 'solidity', call: 'eth_solidity' }, | ||||
|     { name: 'contractCreate', call: 'eth_contractCreate' }, | ||||
|     { name: 'contractCall', call: 'eth_contractCall' } | ||||
|     { name: 'solidity', call: 'eth_solidity' } | ||||
|     ]; | ||||
|     return methods; | ||||
| }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user