mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Made snippet work as is.
This commit is contained in:
parent
a20e03135b
commit
d5e536a4fb
@ -23,10 +23,10 @@ name as the contract) is executed once.
|
|||||||
From ``web3.js``, i.e. the JavaScript
|
From ``web3.js``, i.e. the JavaScript
|
||||||
API, this is done as follows::
|
API, this is done as follows::
|
||||||
|
|
||||||
var source = <<Need to specify some source including contract name for the data param below.>>
|
// Need to specify some source including contract name for the data param below
|
||||||
|
var source = "contract CONTRACT_NAME { function CONTRACT_NAME(unit a, uint b) {} }";
|
||||||
|
|
||||||
// The json abi array generated by the compiler
|
// The json abi array generated by the compiler
|
||||||
|
|
||||||
var abiArray = [
|
var abiArray = [
|
||||||
{
|
{
|
||||||
"inputs":[
|
"inputs":[
|
||||||
@ -50,7 +50,7 @@ API, this is done as follows::
|
|||||||
var contractInstance = MyContract.new(
|
var contractInstance = MyContract.new(
|
||||||
10,
|
10,
|
||||||
11,
|
11,
|
||||||
{from: myAccount, gas: 1000000, data = MyContract.CONTRACT_NAME.code}
|
{from: myAccount, gas: 1000000}
|
||||||
);
|
);
|
||||||
|
|
||||||
.. index:: constructor;arguments
|
.. index:: constructor;arguments
|
||||||
|
Loading…
Reference in New Issue
Block a user