Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Token-Factory
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bitsoko services
Token-Factory
Commits
b9f511b8
Commit
b9f511b8
authored
Jul 17, 2016
by
Simon de la Rouviere
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new HumanStandardToken.sol. Switch to factory asap.
parent
c8d37519
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
185 additions
and
168 deletions
+185
-168
HumanStandardToken.sol
contracts/HumanStandardToken.sol
+4
-2
HumanStandardToken.sol.js
environments/development/contracts/HumanStandardToken.sol.js
+2
-2
HumanStandardToken.sol.js
environments/test/contracts/HumanStandardToken.sol.js
+65
-0
StandardToken.sol.js
environments/test/contracts/StandardToken.sol.js
+65
-0
Standard_Token.sol.js
environments/test/contracts/Standard_Token.sol.js
+0
-60
Standard_Token_Factory.sol.js
environments/test/contracts/Standard_Token_Factory.sol.js
+0
-60
Token.sol.js
environments/test/contracts/Token.sol.js
+49
-44
No files found.
contracts/HumanStandardToken.sol
View file @
b9f511b8
...
...
@@ -49,10 +49,12 @@ contract HumanStandardToken is StandardToken {
/* Approves and then calls the receiving contract */
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
//call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually so one doesn't have to include a contract in here just for this.
//receiveApproval(address _from, uint256 _value, address _tokenContract, bytes _extraData)
_spender.call(bytes4(bytes32(sha3("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData);
Approval(msg.sender, _spender, _value);
//it is assumed that when does this that the call *should* succeed, otherwise one would use vanilla approve instead.
if(!_spender.call(bytes4(bytes32(sha3("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData)) { throw; }
return true;
}
}
environments/development/contracts/HumanStandardToken.sol.js
View file @
b9f511b8
This diff is collapsed.
Click to expand it.
environments/test/contracts/HumanStandardToken.sol.js
0 → 100644
View file @
b9f511b8
This diff is collapsed.
Click to expand it.
environments/test/contracts/StandardToken.sol.js
0 → 100644
View file @
b9f511b8
// Factory "morphs" into a Pudding class.
// The reasoning is that calling load in each context
// is cumbersome.
(
function
()
{
var
contract_data
=
{
abi
:
[{
"constant"
:
false
,
"inputs"
:[{
"name"
:
"_spender"
,
"type"
:
"address"
},{
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"approve"
,
"outputs"
:[{
"name"
:
"success"
,
"type"
:
"bool"
}],
"type"
:
"function"
},{
"constant"
:
true
,
"inputs"
:[],
"name"
:
"totalSupply"
,
"outputs"
:[{
"name"
:
""
,
"type"
:
"uint256"
}],
"type"
:
"function"
},{
"constant"
:
false
,
"inputs"
:[{
"name"
:
"_from"
,
"type"
:
"address"
},{
"name"
:
"_to"
,
"type"
:
"address"
},{
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"transferFrom"
,
"outputs"
:[{
"name"
:
"success"
,
"type"
:
"bool"
}],
"type"
:
"function"
},{
"constant"
:
true
,
"inputs"
:[{
"name"
:
"_owner"
,
"type"
:
"address"
}],
"name"
:
"balanceOf"
,
"outputs"
:[{
"name"
:
"balance"
,
"type"
:
"uint256"
}],
"type"
:
"function"
},{
"constant"
:
false
,
"inputs"
:[{
"name"
:
"_to"
,
"type"
:
"address"
},{
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"transfer"
,
"outputs"
:[{
"name"
:
"success"
,
"type"
:
"bool"
}],
"type"
:
"function"
},{
"constant"
:
true
,
"inputs"
:[{
"name"
:
"_owner"
,
"type"
:
"address"
},{
"name"
:
"_spender"
,
"type"
:
"address"
}],
"name"
:
"allowance"
,
"outputs"
:[{
"name"
:
"remaining"
,
"type"
:
"uint256"
}],
"type"
:
"function"
},{
"anonymous"
:
false
,
"inputs"
:[{
"indexed"
:
true
,
"name"
:
"_from"
,
"type"
:
"address"
},{
"indexed"
:
true
,
"name"
:
"_to"
,
"type"
:
"address"
},{
"indexed"
:
false
,
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"Transfer"
,
"type"
:
"event"
},{
"anonymous"
:
false
,
"inputs"
:[{
"indexed"
:
true
,
"name"
:
"_owner"
,
"type"
:
"address"
},{
"indexed"
:
true
,
"name"
:
"_spender"
,
"type"
:
"address"
},{
"indexed"
:
false
,
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"Approval"
,
"type"
:
"event"
}],
binary
:
"6060604052610321806100126000396000f3606060405236156100565760e060020a6000350463095ea7b3811461005857806318160ddd146100c357806323b872dd146100cc57806370a0823114610230578063a9059cbb14610256578063dd62ed3e146102e8575b005b61024c60043560243533600160a060020a03908116600081815260016020908152604080832094871680845294825282208590556060858152919392917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a35060015b92915050565b61024c60025481565b61024c600435602435604435600160a060020a03831660009081526020819052604081205482901080159061011f575060016020908152604080832033600160a060020a03168452909152812054829010155b801561012b5750600082115b1561022957816000600050600085600160a060020a03168152602001908152602001600020600082828250540192505081905550816000600050600086600160a060020a03168152602001908152602001600020600082828250540392505081905550816001600050600086600160a060020a03168152602001908152602001600020600050600033600160a060020a0316815260200190815260200160002060008282825054039250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060015b9392505050565b600160a060020a03600435166000908152602081905260409020545b6060908152602090f35b61024c60043560243533600160a060020a03166000908152602081905260408120548290108015906102885750600082115b1561031c57604080822080548490039055600160a060020a03808516808452918320805485019055606084815233909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602090a35060016100bd565b61024c600435602435600160a060020a038083166000908152600160209081526040808320938516835292905220546100bd565b6100bd56"
,
unlinked_binary
:
"6060604052610321806100126000396000f3606060405236156100565760e060020a6000350463095ea7b3811461005857806318160ddd146100c357806323b872dd146100cc57806370a0823114610230578063a9059cbb14610256578063dd62ed3e146102e8575b005b61024c60043560243533600160a060020a03908116600081815260016020908152604080832094871680845294825282208590556060858152919392917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a35060015b92915050565b61024c60025481565b61024c600435602435604435600160a060020a03831660009081526020819052604081205482901080159061011f575060016020908152604080832033600160a060020a03168452909152812054829010155b801561012b5750600082115b1561022957816000600050600085600160a060020a03168152602001908152602001600020600082828250540192505081905550816000600050600086600160a060020a03168152602001908152602001600020600082828250540392505081905550816001600050600086600160a060020a03168152602001908152602001600020600050600033600160a060020a0316815260200190815260200160002060008282825054039250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060015b9392505050565b600160a060020a03600435166000908152602081905260409020545b6060908152602090f35b61024c60043560243533600160a060020a03166000908152602081905260408120548290108015906102885750600082115b1561031c57604080822080548490039055600160a060020a03808516808452918320805485019055606084815233909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602090a35060016100bd565b61024c600435602435600160a060020a038083166000908152600160209081526040808320938516835292905220546100bd565b6100bd56"
,
address
:
""
,
generated_with
:
"2.0.9"
,
contract_name
:
"StandardToken"
};
function
Contract
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"StandardToken error: Please call load() first before creating new instance of this contract."
);
}
Contract
.
Pudding
.
apply
(
this
,
arguments
);
};
Contract
.
load
=
function
(
Pudding
)
{
Contract
.
Pudding
=
Pudding
;
Pudding
.
whisk
(
contract_data
,
Contract
);
// Return itself for backwards compatibility.
return
Contract
;
}
Contract
.
new
=
function
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"StandardToken error: Please call load() first before calling new()."
);
}
return
Contract
.
Pudding
.
new
.
apply
(
Contract
,
arguments
);
};
Contract
.
at
=
function
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"StandardToken error: Please call load() first before calling at()."
);
}
return
Contract
.
Pudding
.
at
.
apply
(
Contract
,
arguments
);
};
Contract
.
deployed
=
function
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"StandardToken error: Please call load() first before calling deployed()."
);
}
return
Contract
.
Pudding
.
deployed
.
apply
(
Contract
,
arguments
);
};
if
(
typeof
module
!=
"undefined"
&&
typeof
module
.
exports
!=
"undefined"
)
{
module
.
exports
=
Contract
;
}
else
{
// There will only be one version of Pudding in the browser,
// and we can use that.
window
.
StandardToken
=
Contract
;
}
})();
environments/test/contracts/Standard_Token.sol.js
deleted
100644 → 0
View file @
c8d37519
// Factory "morphs" into a Pudding class.
// The reasoning is that calling load in each context
// is cumbersome.
var
contract_data
=
{
abi
:
[{
"constant"
:
false
,
"inputs"
:[{
"name"
:
"_spender"
,
"type"
:
"address"
},{
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"approve"
,
"outputs"
:[{
"name"
:
"success"
,
"type"
:
"bool"
}],
"type"
:
"function"
},{
"constant"
:
true
,
"inputs"
:[],
"name"
:
"totalSupply"
,
"outputs"
:[{
"name"
:
"_total"
,
"type"
:
"uint256"
}],
"type"
:
"function"
},{
"constant"
:
false
,
"inputs"
:[{
"name"
:
"_from"
,
"type"
:
"address"
},{
"name"
:
"_to"
,
"type"
:
"address"
},{
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"transferFrom"
,
"outputs"
:[{
"name"
:
"success"
,
"type"
:
"bool"
}],
"type"
:
"function"
},{
"constant"
:
true
,
"inputs"
:[{
"name"
:
"_owner"
,
"type"
:
"address"
}],
"name"
:
"balanceOf"
,
"outputs"
:[{
"name"
:
"balance"
,
"type"
:
"uint256"
}],
"type"
:
"function"
},{
"constant"
:
false
,
"inputs"
:[{
"name"
:
"_to"
,
"type"
:
"address"
},{
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"transfer"
,
"outputs"
:[{
"name"
:
"success"
,
"type"
:
"bool"
}],
"type"
:
"function"
},{
"constant"
:
true
,
"inputs"
:[{
"name"
:
"_owner"
,
"type"
:
"address"
},{
"name"
:
"_spender"
,
"type"
:
"address"
}],
"name"
:
"allowance"
,
"outputs"
:[{
"name"
:
"remaining"
,
"type"
:
"uint256"
}],
"type"
:
"function"
},{
"inputs"
:[{
"name"
:
"_initial_amount"
,
"type"
:
"uint256"
}],
"type"
:
"constructor"
},{
"anonymous"
:
false
,
"inputs"
:[{
"indexed"
:
true
,
"name"
:
"_from"
,
"type"
:
"address"
},{
"indexed"
:
true
,
"name"
:
"_to"
,
"type"
:
"address"
},{
"indexed"
:
false
,
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"Transfer"
,
"type"
:
"event"
},{
"anonymous"
:
false
,
"inputs"
:[{
"indexed"
:
true
,
"name"
:
"_owner"
,
"type"
:
"address"
},{
"indexed"
:
true
,
"name"
:
"_spender"
,
"type"
:
"address"
},{
"indexed"
:
false
,
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"Approval"
,
"type"
:
"event"
}],
binary
:
"6060604052604051602080610337833950608060405251600160a060020a03331660009081526020819052604090208190556002819055506102f2806100456000396000f3606060405236156100565760e060020a6000350463095ea7b3811461005857806318160ddd146100c357806323b872dd146100d157806370a0823114610207578063a9059cbb14610227578063dd62ed3e146102b9575b005b6100c760043560243533600160a060020a03908116600081815260016020908152604080832094871680845294825282208590556060858152919392917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a35060015b92915050565b6002545b6060908152602090f35b6100c7600435602435604435600160a060020a038316600090815260208190526040812054829010801590610124575060016020908152604080832033600160a060020a03168452909152812054829010155b80156101305750600082115b1561020057600160a060020a03808416808352602083815260408420805486019055606085815291928716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a3816000600050600086600160a060020a03168152602001908152602001600020600082828250540392505081905550816001600050600086600160a060020a03168152602001908152602001600020600050600033600160a060020a03168152602001908152602001600020600082828250540392505081905550600190505b9392505050565b600160a060020a03600435166000908152602081905260409020546100c7565b6100c760043560243533600160a060020a03166000908152602081905260408120548290108015906102595750600082115b156102ed57604080822080548490039055600160a060020a03808516808452918320805485019055606084815233909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602090a35060016100bd565b6100c7600435602435600160a060020a038083166000908152600160209081526040808320938516835292905220546100bd565b6100bd56"
,
address
:
"0xa70a9eaca9a576d598158b289270e184524cc65a"
,
generated_with
:
"2.0.2"
,
contract_name
:
"Standard_Token"
};
function
Contract
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"Standard_Token error: Please call load() first before creating new instance of this contract."
);
}
Contract
.
Pudding
.
apply
(
this
,
arguments
);
};
Contract
.
load
=
function
(
Pudding
)
{
Contract
.
Pudding
=
Pudding
;
Pudding
.
whisk
(
contract_data
,
Contract
);
// Return itself for backwards compatibility.
return
Contract
;
}
Contract
.
new
=
function
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"Standard_Token error: Please call load() first before calling new()."
);
}
return
Contract
.
Pudding
.
new
.
apply
(
Contract
,
arguments
);
};
Contract
.
at
=
function
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"Standard_Token error: lease call load() first before calling at()."
);
}
return
Contract
.
Pudding
.
at
.
apply
(
Contract
,
arguments
);
};
Contract
.
deployed
=
function
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"Standard_Token error: Please call load() first before calling deployed()."
);
}
return
Contract
.
Pudding
.
deployed
.
apply
(
Contract
,
arguments
);
};
if
(
typeof
module
!=
"undefined"
&&
typeof
module
.
exports
!=
"undefined"
)
{
module
.
exports
=
Contract
;
}
else
{
// There will only be one version of Pudding in the browser,
// and we can use that.
window
.
Standard_Token
=
Contract
;
}
environments/test/contracts/Standard_Token_Factory.sol.js
deleted
100644 → 0
View file @
c8d37519
// Factory "morphs" into a Pudding class.
// The reasoning is that calling load in each context
// is cumbersome.
var
contract_data
=
{
abi
:
[{
"constant"
:
false
,
"inputs"
:[{
"name"
:
"_initialAmount"
,
"type"
:
"uint256"
}],
"name"
:
"createStandardToken"
,
"outputs"
:[{
"name"
:
""
,
"type"
:
"address"
}],
"type"
:
"function"
},{
"constant"
:
true
,
"inputs"
:[{
"name"
:
""
,
"type"
:
"address"
},{
"name"
:
""
,
"type"
:
"uint256"
}],
"name"
:
"created"
,
"outputs"
:[{
"name"
:
""
,
"type"
:
"address"
}],
"type"
:
"function"
},{
"constant"
:
false
,
"inputs"
:[],
"name"
:
"createdByMe"
,
"outputs"
:[{
"name"
:
""
,
"type"
:
"address[]"
}],
"type"
:
"function"
}],
binary
:
"6060604052610598806100126000396000f3606060405260e060020a600035046305215b2f81146100315780635f8dead314610107578063dc3f65d314610143575b005b6101bb600435600080808360606103378061026183390180828152602001915050604051809103906000f0915081905080600160a060020a031663a9059cbb33866040518360e060020a0281526004018083600160a060020a03168152602001828152602001925050506020604051808303816000876161da5a03f11561000257505050600160a060020a033316835260208390526040832080546001810180835582818380158290116102225781836000526020600020918201910161022291905b8082111561025d578a81556001016100f4565b6101bb60043560243560006020819052828152604090208054829081101561000257506000908152602090200154600160a060020a0316905081565b6101d860006060818152600160a060020a03331682526020828152604092839020805460a09281028301909452608084815292939091828280156101b157602002820191906000526020600020905b8154600160a060020a0316815260019190910190602001808311610192575b5050505050905090565b60408051600160a060020a03929092168252519081900360200190f35b60405180806020018281038252838181518152602001915080519060200190602002808383829060006004602084601f0104600f02600301f1509050019250505060405180910390f35b50505091909060005260206000209001600050805473ffffffffffffffffffffffffffffffffffffffff191683179055509150805050919050565b5090566060604052604051602080610337833950608060405251600160a060020a03331660009081526020819052604090208190556002819055506102f2806100456000396000f3606060405236156100565760e060020a6000350463095ea7b3811461005857806318160ddd146100c357806323b872dd146100d157806370a0823114610207578063a9059cbb14610227578063dd62ed3e146102b9575b005b6100c760043560243533600160a060020a03908116600081815260016020908152604080832094871680845294825282208590556060858152919392917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a35060015b92915050565b6002545b6060908152602090f35b6100c7600435602435604435600160a060020a038316600090815260208190526040812054829010801590610124575060016020908152604080832033600160a060020a03168452909152812054829010155b80156101305750600082115b1561020057600160a060020a03808416808352602083815260408420805486019055606085815291928716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a3816000600050600086600160a060020a03168152602001908152602001600020600082828250540392505081905550816001600050600086600160a060020a03168152602001908152602001600020600050600033600160a060020a03168152602001908152602001600020600082828250540392505081905550600190505b9392505050565b600160a060020a03600435166000908152602081905260409020546100c7565b6100c760043560243533600160a060020a03166000908152602081905260408120548290108015906102595750600082115b156102ed57604080822080548490039055600160a060020a03808516808452918320805485019055606084815233909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602090a35060016100bd565b6100c7600435602435600160a060020a038083166000908152600160209081526040808320938516835292905220546100bd565b6100bd56"
,
address
:
"0x4725673a3ee23b2615858172dd1929a48edab7d0"
,
generated_with
:
"2.0.2"
,
contract_name
:
"Standard_Token_Factory"
};
function
Contract
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"Standard_Token_Factory error: Please call load() first before creating new instance of this contract."
);
}
Contract
.
Pudding
.
apply
(
this
,
arguments
);
};
Contract
.
load
=
function
(
Pudding
)
{
Contract
.
Pudding
=
Pudding
;
Pudding
.
whisk
(
contract_data
,
Contract
);
// Return itself for backwards compatibility.
return
Contract
;
}
Contract
.
new
=
function
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"Standard_Token_Factory error: Please call load() first before calling new()."
);
}
return
Contract
.
Pudding
.
new
.
apply
(
Contract
,
arguments
);
};
Contract
.
at
=
function
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"Standard_Token_Factory error: lease call load() first before calling at()."
);
}
return
Contract
.
Pudding
.
at
.
apply
(
Contract
,
arguments
);
};
Contract
.
deployed
=
function
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"Standard_Token_Factory error: Please call load() first before calling deployed()."
);
}
return
Contract
.
Pudding
.
deployed
.
apply
(
Contract
,
arguments
);
};
if
(
typeof
module
!=
"undefined"
&&
typeof
module
.
exports
!=
"undefined"
)
{
module
.
exports
=
Contract
;
}
else
{
// There will only be one version of Pudding in the browser,
// and we can use that.
window
.
Standard_Token_Factory
=
Contract
;
}
environments/test/contracts/Token.sol.js
View file @
b9f511b8
...
...
@@ -2,59 +2,64 @@
// The reasoning is that calling load in each context
// is cumbersome.
var
contract_data
=
{
abi
:
[{
"constant"
:
false
,
"inputs"
:[{
"name"
:
"_spender"
,
"type"
:
"address"
},{
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"approve"
,
"outputs"
:[{
"name"
:
"success"
,
"type"
:
"bool"
}],
"type"
:
"function"
},{
"constant"
:
true
,
"inputs"
:[],
"name"
:
"totalSupply"
,
"outputs"
:[{
"name"
:
"supply"
,
"type"
:
"uint256"
}],
"type"
:
"function"
},{
"constant"
:
false
,
"inputs"
:[{
"name"
:
"_from"
,
"type"
:
"address"
},{
"name"
:
"_to"
,
"type"
:
"address"
},{
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"transferFrom"
,
"outputs"
:[{
"name"
:
"success"
,
"type"
:
"bool"
}],
"type"
:
"function"
},{
"constant"
:
true
,
"inputs"
:[{
"name"
:
"_owner"
,
"type"
:
"address"
}],
"name"
:
"balanceOf"
,
"outputs"
:[{
"name"
:
"balance"
,
"type"
:
"uint256"
}],
"type"
:
"function"
},{
"constant"
:
false
,
"inputs"
:[{
"name"
:
"_to"
,
"type"
:
"address"
},{
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"transfer"
,
"outputs"
:[{
"name"
:
"success"
,
"type"
:
"bool"
}],
"type"
:
"function"
},{
"constant"
:
true
,
"inputs"
:[{
"name"
:
"_owner"
,
"type"
:
"address"
},{
"name"
:
"_spender"
,
"type"
:
"address"
}],
"name"
:
"allowance"
,
"outputs"
:[{
"name"
:
"remaining"
,
"type"
:
"uint256"
}],
"type"
:
"function"
},{
"anonymous"
:
false
,
"inputs"
:[{
"indexed"
:
true
,
"name"
:
"_from"
,
"type"
:
"address"
},{
"indexed"
:
true
,
"name"
:
"_to"
,
"type"
:
"address"
},{
"indexed"
:
false
,
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"Transfer"
,
"type"
:
"event"
},{
"anonymous"
:
false
,
"inputs"
:[{
"indexed"
:
true
,
"name"
:
"_owner"
,
"type"
:
"address"
},{
"indexed"
:
true
,
"name"
:
"_spender"
,
"type"
:
"address"
},{
"indexed"
:
false
,
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"Approval"
,
"type"
:
"event"
}],
binary
:
"6060604052605d8060106000396000f360606040523615604f5760e060020a6000350463095ea7b38114605157806318160ddd14605157806323b872dd14605157806370a08231146051578063a9059cbb146051578063dd62ed3e146051575b005b60006060908152602090f3"
,
address
:
""
,
generated_with
:
"2.0.2"
,
contract_name
:
"Token"
};
function
Contract
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"Token error: Please call load() first before creating new instance of this contract."
);
}
(
function
()
{
var
contract_data
=
{
abi
:
[{
"constant"
:
false
,
"inputs"
:[{
"name"
:
"_spender"
,
"type"
:
"address"
},{
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"approve"
,
"outputs"
:[{
"name"
:
"success"
,
"type"
:
"bool"
}],
"type"
:
"function"
},{
"constant"
:
true
,
"inputs"
:[],
"name"
:
"totalSupply"
,
"outputs"
:[{
"name"
:
"supply"
,
"type"
:
"uint256"
}],
"type"
:
"function"
},{
"constant"
:
false
,
"inputs"
:[{
"name"
:
"_from"
,
"type"
:
"address"
},{
"name"
:
"_to"
,
"type"
:
"address"
},{
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"transferFrom"
,
"outputs"
:[{
"name"
:
"success"
,
"type"
:
"bool"
}],
"type"
:
"function"
},{
"constant"
:
true
,
"inputs"
:[{
"name"
:
"_owner"
,
"type"
:
"address"
}],
"name"
:
"balanceOf"
,
"outputs"
:[{
"name"
:
"balance"
,
"type"
:
"uint256"
}],
"type"
:
"function"
},{
"constant"
:
false
,
"inputs"
:[{
"name"
:
"_to"
,
"type"
:
"address"
},{
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"transfer"
,
"outputs"
:[{
"name"
:
"success"
,
"type"
:
"bool"
}],
"type"
:
"function"
},{
"constant"
:
true
,
"inputs"
:[{
"name"
:
"_owner"
,
"type"
:
"address"
},{
"name"
:
"_spender"
,
"type"
:
"address"
}],
"name"
:
"allowance"
,
"outputs"
:[{
"name"
:
"remaining"
,
"type"
:
"uint256"
}],
"type"
:
"function"
},{
"anonymous"
:
false
,
"inputs"
:[{
"indexed"
:
true
,
"name"
:
"_from"
,
"type"
:
"address"
},{
"indexed"
:
true
,
"name"
:
"_to"
,
"type"
:
"address"
},{
"indexed"
:
false
,
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"Transfer"
,
"type"
:
"event"
},{
"anonymous"
:
false
,
"inputs"
:[{
"indexed"
:
true
,
"name"
:
"_owner"
,
"type"
:
"address"
},{
"indexed"
:
true
,
"name"
:
"_spender"
,
"type"
:
"address"
},{
"indexed"
:
false
,
"name"
:
"_value"
,
"type"
:
"uint256"
}],
"name"
:
"Approval"
,
"type"
:
"event"
}],
binary
:
"6060604052605d8060106000396000f360606040523615604f5760e060020a6000350463095ea7b38114605157806318160ddd14605157806323b872dd14605157806370a08231146051578063a9059cbb146051578063dd62ed3e146051575b005b60006060908152602090f3"
,
unlinked_binary
:
"6060604052605d8060106000396000f360606040523615604f5760e060020a6000350463095ea7b38114605157806318160ddd14605157806323b872dd14605157806370a08231146051578063a9059cbb146051578063dd62ed3e146051575b005b60006060908152602090f3"
,
address
:
""
,
generated_with
:
"2.0.9"
,
contract_name
:
"Token"
};
Contract
.
Pudding
.
apply
(
this
,
arguments
);
};
function
Contract
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"Token error: Please call load() first before creating new instance of this contract."
);
}
Contract
.
load
=
function
(
Pudding
)
{
Contract
.
Pudding
=
Pudding
;
Contract
.
Pudding
.
apply
(
this
,
arguments
);
}
;
Pudding
.
whisk
(
contract_data
,
Contract
);
Contract
.
load
=
function
(
Pudding
)
{
Contract
.
Pudding
=
Pudding
;
// Return itself for backwards compatibility.
return
Contract
;
}
Pudding
.
whisk
(
contract_data
,
Contract
);
Contract
.
new
=
function
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"Token error: Please call load() first before calling new()."
);
// Return itself for backwards compatibility.
return
Contract
;
}
return
Contract
.
Pudding
.
new
.
apply
(
Contract
,
arguments
);
};
Contract
.
new
=
function
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"Token error: Please call load() first before calling new()."
);
}
Contract
.
at
=
function
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"Token error: lease call load() first before calling at()."
);
}
return
Contract
.
Pudding
.
new
.
apply
(
Contract
,
arguments
);
};
return
Contract
.
Pudding
.
at
.
apply
(
Contract
,
arguments
);
};
Contract
.
at
=
function
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"Token error: Please call load() first before calling at()."
);
}
Contract
.
deployed
=
function
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"Token error: Please call load() first before calling deployed()."
);
}
return
Contract
.
Pudding
.
at
.
apply
(
Contract
,
arguments
);
};
return
Contract
.
Pudding
.
deployed
.
apply
(
Contract
,
arguments
);
};
Contract
.
deployed
=
function
()
{
if
(
Contract
.
Pudding
==
null
)
{
throw
new
Error
(
"Token error: Please call load() first before calling deployed()."
);
}
return
Contract
.
Pudding
.
deployed
.
apply
(
Contract
,
arguments
);
};
if
(
typeof
module
!=
"undefined"
&&
typeof
module
.
exports
!=
"undefined"
)
{
module
.
exports
=
Contract
;
}
else
{
// There will only be one version of Pudding in the browser,
// and we can use that.
window
.
Token
=
Contract
;
}
if
(
typeof
module
!=
"undefined"
&&
typeof
module
.
exports
!=
"undefined"
)
{
module
.
exports
=
Contract
;
}
else
{
// There will only be one version of Pudding in the browser,
// and we can use that.
window
.
Token
=
Contract
;
}
})();
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment