Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Poppins
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Patricio Kumagae
Poppins
Commits
a437e4ee
Commit
a437e4ee
authored
6 years ago
by
Patricio Kumagae
Browse files
Options
Downloads
Patches
Plain Diff
Corrijo error al validar cuenta
parent
de1b3828
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/templates/dapp/account_list.html
+3
-2
3 additions, 2 deletions
frontend/templates/dapp/account_list.html
with
3 additions
and
2 deletions
frontend/templates/dapp/account_list.html
+
3
−
2
View file @
a437e4ee
...
...
@@ -110,7 +110,7 @@
</div>
<div
class=
"modal-body"
>
<label>
Desde la consola de geth ejecutar los siguientes comandos:
</label>
<pre>
abi = [ { "anonymous": false, "inputs": [ { "indexed": false, "name": "amount", "type": "uint256" } ], "name": "proofOfControlWeiAmountChanged", "type": "event" }, { "constant": false, "inputs": [ { "name": "acc", "type": "address" }, { "name": "limit", "type": "uint256" } ], "name": "addBeneficiary", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "add", "type": "address" }, { "name": "password", "type": "bytes32" } ], "name": "addSuitor", "outputs": [ { "name": "", "type": "bool" } ], "payable": true, "stateMutability": "payable", "type": "function" }, { "constant": false, "inputs": [ { "name": "acc", "type": "address" }, { "name": "limit", "type": "uint256" } ], "name": "changeLimit", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "acc", "type": "address" } ], "name": "kickBeneficiary", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "acc", "type": "address" } ], "name": "kickDistributor", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "distr", "type": "address" }, { "indexed": true, "name": "ben", "type": "address" }, { "indexed": false, "name": "newLimit", "type": "uint256" } ], "name": "limitChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "suitor", "type": "address" } ], "name": "suitorApproved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "suitor", "type": "address" } ], "name": "suitorNotApproved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "kicked", "type": "address" } ], "name": "kickedDistributor", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "suitor", "type": "address" }, { "indexed": true, "name": "distr", "type": "address" } ], "name": "suitorAdded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "distr", "type": "address" }, { "indexed": true, "name": "added", "type": "address" }, { "indexed": false, "name": "limit", "type": "uint256" } ], "name": "addedBeneficiary", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "distr", "type": "address" }, { "indexed": true, "name": "kicked", "type": "address" } ], "name": "kickedBeneficiary", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "added", "type": "address" }, { "indexed": false, "name": "top", "type": "uint256" } ], "name": "addedDistributor", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "distr", "type": "address" }, { "indexed": false, "name": "amount", "type": "uint256" } ], "name": "replenished", "type": "event" }, { "constant": false, "inputs": [ { "name": "acc", "type": "address" }, { "name": "top", "type": "uint256" } ], "name": "addDistributor", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "key", "type": "string" } ], "name": "proveControl", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "acc", "type": "address" }, { "name": "amount", "type": "uint256" } ], "name": "replenish", "outputs": [ { "name": "", "type": "bool" } ], "payable": true, "stateMutability": "payable", "type": "function" }, { "constant": false, "inputs": [], "name": "replenishAll", "outputs": [ { "name": "", "type": "bool" } ], "payable": true, "stateMutability": "payable", "type": "function" }, { "constant": false, "inputs": [ { "name": "accs", "type": "address[]" }, { "name": "amounts", "type": "uint256[]" } ], "name": "replenishList", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function" }, { "constant": false, "inputs": [ { "name": "amount", "type": "uint256" } ], "name": "setProofOfControlWeiAmount", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "payable": true, "stateMutability": "payable", "type": "constructor" }, { "constant": true, "inputs": [], "name": "getBeneficiariesCount", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "acc", "type": "address" } ], "name": "getBeneficiaryLimit", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "acc", "type": "address" } ], "name": "getDistributorLimit", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getProofOfControlWeiAmount", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "key", "type": "string" } ], "name": "hash", "outputs": [ { "name": "", "type": "bytes32" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [ { "name": "add", "type": "address" } ], "name": "isBeneficiary", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "add", "type": "address" } ], "name": "isDistributor", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" } ]
<br
/><br
/>
var contractInstance = eth.contract(abi).at("
<label
id=
"label-contract-address"
></label>
")
<br/><br/>
eth.defaultAccount = "
<label
id=
"label-cuenta"
></label>
"
<br
/><br/>
personal.unlockAccount(eth.defaultAccount, "
<i><b>
PASSPHRASE DE LA CUENTA
</b></i>
") // es necesario desbloquear la cuenta con la passphrase, OJO SI EL ATTACH ES CON HTTP
<br/><br/>
var tx = contractInstance.proveControl.sendTransaction("
<label
id=
"label-clave"
></label>
", {gas:e
th.getBalance(eth.defaultAccount)
, gasPrice:1}) // efectivamente la transaccion
<br/><br/>
eth.getTransactionReceipt(tx) //esto puede devolver undefined, porque depende de si se sello el bloque con la transaccion
<pre>
abi = [ { "anonymous": false, "inputs": [ { "indexed": false, "name": "amount", "type": "uint256" } ], "name": "proofOfControlWeiAmountChanged", "type": "event" }, { "constant": false, "inputs": [ { "name": "acc", "type": "address" }, { "name": "limit", "type": "uint256" } ], "name": "addBeneficiary", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "add", "type": "address" }, { "name": "password", "type": "bytes32" } ], "name": "addSuitor", "outputs": [ { "name": "", "type": "bool" } ], "payable": true, "stateMutability": "payable", "type": "function" }, { "constant": false, "inputs": [ { "name": "acc", "type": "address" }, { "name": "limit", "type": "uint256" } ], "name": "changeLimit", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "acc", "type": "address" } ], "name": "kickBeneficiary", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "acc", "type": "address" } ], "name": "kickDistributor", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "distr", "type": "address" }, { "indexed": true, "name": "ben", "type": "address" }, { "indexed": false, "name": "newLimit", "type": "uint256" } ], "name": "limitChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "suitor", "type": "address" } ], "name": "suitorApproved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "suitor", "type": "address" } ], "name": "suitorNotApproved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "kicked", "type": "address" } ], "name": "kickedDistributor", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "suitor", "type": "address" }, { "indexed": true, "name": "distr", "type": "address" } ], "name": "suitorAdded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "distr", "type": "address" }, { "indexed": true, "name": "added", "type": "address" }, { "indexed": false, "name": "limit", "type": "uint256" } ], "name": "addedBeneficiary", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "distr", "type": "address" }, { "indexed": true, "name": "kicked", "type": "address" } ], "name": "kickedBeneficiary", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "added", "type": "address" }, { "indexed": false, "name": "top", "type": "uint256" } ], "name": "addedDistributor", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "distr", "type": "address" }, { "indexed": false, "name": "amount", "type": "uint256" } ], "name": "replenished", "type": "event" }, { "constant": false, "inputs": [ { "name": "acc", "type": "address" }, { "name": "top", "type": "uint256" } ], "name": "addDistributor", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "key", "type": "string" } ], "name": "proveControl", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "acc", "type": "address" }, { "name": "amount", "type": "uint256" } ], "name": "replenish", "outputs": [ { "name": "", "type": "bool" } ], "payable": true, "stateMutability": "payable", "type": "function" }, { "constant": false, "inputs": [], "name": "replenishAll", "outputs": [ { "name": "", "type": "bool" } ], "payable": true, "stateMutability": "payable", "type": "function" }, { "constant": false, "inputs": [ { "name": "accs", "type": "address[]" }, { "name": "amounts", "type": "uint256[]" } ], "name": "replenishList", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function" }, { "constant": false, "inputs": [ { "name": "amount", "type": "uint256" } ], "name": "setProofOfControlWeiAmount", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "payable": true, "stateMutability": "payable", "type": "constructor" }, { "constant": true, "inputs": [], "name": "getBeneficiariesCount", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "acc", "type": "address" } ], "name": "getBeneficiaryLimit", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "acc", "type": "address" } ], "name": "getDistributorLimit", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getProofOfControlWeiAmount", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "key", "type": "string" } ], "name": "hash", "outputs": [ { "name": "", "type": "bytes32" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [ { "name": "add", "type": "address" } ], "name": "isBeneficiary", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "add", "type": "address" } ], "name": "isDistributor", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" } ]
<br
/><br
/>
var contractInstance = eth.contract(abi).at("
<label
id=
"label-contract-address"
></label>
")
<br/><br/>
eth.defaultAccount = "
<label
id=
"label-cuenta"
></label>
"
<br
/><br/>
personal.unlockAccount(eth.defaultAccount, "
<i><b>
PASSPHRASE DE LA CUENTA
</b></i>
") // es necesario desbloquear la cuenta con la passphrase, OJO SI EL ATTACH ES CON HTTP
<br/><br/>
var
estimate = contractInstance.proveControl.estimateGas("
<label
id=
"label-clave1"
></label>
")
<br
/><br
/>
var
tx = contractInstance.proveControl.sendTransaction("
<label
id=
"label-clave
2
"
></label>
", {gas:e
stimate
, gasPrice:1}) // efectivamente la transaccion
<br/><br/>
eth.getTransactionReceipt(tx) //esto puede devolver undefined, porque depende de si se sello el bloque con la transaccion
</pre>
</div>
<div
class=
"modal-footer"
>
...
...
@@ -417,7 +417,8 @@
$
(
'
#modalInstrucciones
'
).
on
(
'
shown.bs.modal
'
,
function
(
e
)
{
$
(
'
#label-cuenta
'
).
html
(
$
(
'
#address-
'
+
$
(
e
.
relatedTarget
).
attr
(
'
id-account
'
)).
val
());
$
(
'
#label-clave
'
).
html
(
$
(
e
.
relatedTarget
).
attr
(
'
clave
'
));
$
(
'
#label-clave1
'
).
html
(
$
(
e
.
relatedTarget
).
attr
(
'
clave
'
));
$
(
'
#label-clave2
'
).
html
(
$
(
e
.
relatedTarget
).
attr
(
'
clave
'
));
$
(
'
#label-contract-address
'
).
html
(
$
(
'
#distillery_address
'
).
val
());
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment