github.com/inklabsfoundation/inkchain@v0.17.1-0.20181025012015-c3cef8062f19/examples/xc/qtum/init.sh (about)

     1  #! /bin/bash
     2  
     3  source p_init.sh
     4  
     5  # === XCPlugin ===
     6  
     7  # .set Owner PlatformName  default "QTUM"
     8  #qcli sendtocontract $XCPluginHexAddress `solar encode contracts/XCPlugin.sol setPlatformName '["'${myPlatform}'"]'` 0 6000000 0.000001 $XCPluginOwner
     9  
    10  # .add credible xc Platform ("INK")
    11  qcli sendtocontract $XCPluginHexAddress `solar encode contracts/XCPlugin.sol addPlatform '["'${otherPlatform}'"]'` 0 300000 0.000001 $XCPluginOwner
    12  sleep 180
    13  
    14  # .add credible xc Platform's PublicKey
    15  qcli sendtocontract $XCPluginHexAddress `solar encode contracts/XCPlugin.sol addPublicKey '["'${otherPlatform}'","'$otherPlatformPubKey'"]'` 0 300000 0.000001 $XCPluginOwner
    16  qcli sendtocontract $XCPluginHexAddress `solar encode contracts/XCPlugin.sol addPublicKey '["'${otherPlatform}'","'$otherPlatformPubKey2'"]'` 0 300000 0.000001 $XCPluginOwner
    17  sleep 180
    18  
    19  #
    20  ## .set  credible xc Platform's weight, default 1
    21  ##qcli sendtocontract $XCPluginHexAddress `solar encode contracts/XCPlugin.sol setWeight '["'${otherPlatform}'",1]'` 0 6000000 0.000001 $XCPluginOwner
    22  #
    23  ## set XCPlugin contract caller.
    24  qcli sendtocontract $XCPluginHexAddress `solar encode contracts/XCPlugin.sol addCaller '["'$XCHexAddress'"]'` 0 300000 0.000001 $XCPluginOwner
    25  #
    26  ## === XC ===
    27  #
    28  ## .set INK contract address
    29  qcli sendtocontract $XCHexAddress `solar encode contracts/XC.sol setINK '["'$INKHexAddress'"]'` 0 300000 0.000001 $XCOwner
    30  ## .set XCPlugin contract address
    31  qcli sendtocontract $XCHexAddress `solar encode contracts/XC.sol setXCPlugin '["'$XCPluginHexAddress'"]'` 0 300000 0.000001 $XCOwner
    32  #
    33  ## .set Owner PlatformName  default "QTUM"
    34  ##qcli sendtocontract $XCHexAddress `solar encode contracts/XC.sol setPlatformName '["'${myPlatform}'"]'` 0 6000000 0.000001 $XCOwner
    35  #
    36  ## === start ===
    37  #
    38  qcli sendtocontract $XCPluginHexAddress `solar encode contracts/XCPlugin.sol start` 0 300000 0.000001 $XCPluginOwner
    39  qcli sendtocontract $XCHexAddress `solar encode contracts/XC.sol setStatus [3]` 0 300000 0.000001 $XCOwner