github.com/inklabsfoundation/inkchain@v0.17.1-0.20181025012015-c3cef8062f19/examples/xc/qtum/test/unlock_2.sh (about) 1 #! /bin/bash 2 3 source p_init.sh 4 5 # voter(bytes32,address,address,uint256,bytes32 ,bytes32,bytes32,uint8) 6 fromPlatform="494e4b0000000000000000000000000000000000000000000000000000000000" 7 fromAccount="4230a12f5b0693dd88bb35c79d7e56a68614b199" 8 toAccount="db39e7c2a4009e69804c1d9737db29a133c80e5d" 9 value=100000 10 txid="2ba06c917766ac7fe5711da6642593e1941eff10c35ebe0cae700cb4beda39d0" 11 #sign="d0dbd5c9f1fc491bfdf4b2c9c751608168388f1c15a90767ad88bc63504a5e8a7b347c21c8d537d18949d667d8ae6d2e8d7c61973342c13048722dccc692048001" 12 #d0dbd5c9f1fc491bfdf4b2c9c751608168388f1c15a90767ad88bc63504a5e8a 13 #7b347c21c8d537d18949d667d8ae6d2e8d7c61973342c13048722dccc6920480 14 #01 15 r="d0dbd5c9f1fc491bfdf4b2c9c751608168388f1c15a90767ad88bc63504a5e8a" 16 s="7b347c21c8d537d18949d667d8ae6d2e8d7c61973342c13048722dccc6920480" 17 v=28 18 19 # balanceOf 20 qcli callcontract $INKHexAddress `solar encode contracts/INK.sol balanceOf '["'$toAccount'"]'` 21 22 qcli sendtocontract $XCPluginHexAddress `solar encode contracts/XCPlugin.sol voteProposal '["'$fromPlatform'","'$fromAccount'","'$toAccount'",'$value',"'$txid'","'$r'","'$s'",'$v']'` 0 6000000 0.000001 $XCPluginOwner 23 sleep 180 24 #2488a4d8a028c56cc1bab54dfa2b186897f765757877ab638214a8719e06da777fbc930b59d48817eb3230f577b1a66076597a3d8c1370f53cd692d4a6c63d8800 25 r1="2488a4d8a028c56cc1bab54dfa2b186897f765757877ab638214a8719e06da77" 26 s1="7fbc930b59d48817eb3230f577b1a66076597a3d8c1370f53cd692d4a6c63d88" 27 v1=27 28 qcli sendtocontract $XCPluginHexAddress `solar encode contracts/XCPlugin.sol voteProposal '["'$fromPlatform'","'$fromAccount'","'$toAccount'",'$value',"'$txid'","'$r1'","'$s1'",'$v1']'` 0 6000000 0.000001 $XCPluginOwner 29 sleep 180 30 31 qcli sendtocontract $XCHexAddress `solar encode contracts/XC.sol unlock '["'$txid'","'$fromPlatform'","'$fromAccount'","'$toAccount'",'$value']'` 0 6000000 0.000001 $XCPluginOwner 32 sleep 180 33 34 # balanceOf 35 qcli callcontract $INKHexAddress `solar encode contracts/INK.sol balanceOf '["'$toAccount'"]'`