github.com/inklabsfoundation/inkchain@v0.17.1-0.20181025012015-c3cef8062f19/examples/xc/qtum/bak/deploy.sh (about) 1 #! /bin/bash 2 3 echo ' ############################' 4 echo ' # 1: INK #' 5 echo ' # 2: XCPlugin #' 6 echo ' # 3: XC #' 7 echo ' ############################' 8 echo ' # (default:All) Enter [1~3]:' 9 read aNum 10 11 case ${aNum} in 12 '') 13 echo "###################################################" 14 echo "# START #" 15 echo "###################################################" 16 echo "### 1)Transfer 3 QTUM to the contract account. ###" 17 echo "Please enter a release contract account:" 18 read deployAccount 19 sh qtum-cli.sh sendtoaddress ${deployAccount} 3 20 echo "### 2)Preparation of INK contract bytecode. ###" 21 22 INKBytecode=`cat ../contracts/src/INK/INK.bin` 23 echo "INK Bytecode:${INKBytecode:0:16}..." 24 25 echo "### 3)Deployment of INK contract. ###" 26 sh qtum-cli.sh createcontract ${INKBytecode} 2500000 0.00000049 ${deployAccount} 27 28 echo "###################################################" 29 echo "# END #" 30 echo "###################################################" 31 32 echo "###################################################" 33 echo "# START #" 34 echo "###################################################" 35 echo "### 1)Transfer 3 QTUM to the contract account. ###" 36 echo "Please enter the platform name:" 37 read platform 38 echo "Please enter a release contract account:" 39 read deployAccount 40 sh qtum-cli.sh sendtoaddress ${deployAccount} 3 41 echo "### 2)Preparation of XCPlugin contract bytecode. ###" 42 43 XCPluginBytecode=`cat ../contracts/src/XCPlugin/XCPlugin.bin && docker run --rm -v ${PWD}:/ethabi cryptominder/ethabi:latest encode params -v string ${platform} --lenient` 44 echo "XCPlugin Bytecode:${XCPluginBytecode:0:16}..." 45 46 echo "### 3)Deployment of XCPlugin contract. ###" 47 sh qtum-cli.sh createcontract ${XCPluginBytecode} 2500000 0.00000049 ${deployAccount} 48 49 echo "###################################################" 50 echo "# END #" 51 echo "###################################################" 52 53 echo "###################################################" 54 echo "# START #" 55 echo "###################################################" 56 echo "### 1)Transfer 3 QTUM to the contract account. ###" 57 echo "Please enter the platform name:" 58 read platform 59 echo "Please enter a release contract account:" 60 read deployAccount 61 sh qtum-cli.sh sendtoaddress ${deployAccount} 3 62 echo "### 2)Preparation of XC contract bytecode. ###" 63 64 XCBytecode=`cat ../contracts/src/XC/XC.bin && docker run --rm -v ${PWD}:/ethabi cryptominder/ethabi:latest encode params -v string ${platform} --lenient` 65 echo "XC Bytecode:${XCBytecode:0:16}..." 66 67 echo "### 3)Deployment of XC contract. ###" 68 sh qtum-cli.sh createcontract ${XCBytecode} 2500000 0.00000049 ${deployAccount} 69 70 echo "###################################################" 71 echo "# END #" 72 echo "###################################################" 73 ;; 74 1) 75 echo "###################################################" 76 echo "# START #" 77 echo "###################################################" 78 echo "### 1)Transfer 3 QTUM to the contract account. ###" 79 echo "Please enter a release contract account:" 80 read deployAccount 81 sh qtum-cli.sh sendtoaddress ${deployAccount} 3 82 echo "### 2)Preparation of INK contract bytecode. ###" 83 84 INKBytecode=`cat ../contracts/src/INK/INK.bin` 85 echo "INK Bytecode:${INKBytecode:0:16}..." 86 87 echo "### 3)Deployment of INK contract. ###" 88 sh qtum-cli.sh createcontract ${INKBytecode} 2500000 0.00000049 ${deployAccount} 89 90 echo "###################################################" 91 echo "# END #" 92 echo "###################################################" 93 ;; 94 2) 95 echo "###################################################" 96 echo "# START #" 97 echo "###################################################" 98 echo "### 1)Transfer 3 QTUM to the contract account. ###" 99 echo "Please enter the platform name:" 100 read platform 101 echo "Please enter a release contract account:" 102 read deployAccount 103 sh qtum-cli.sh sendtoaddress ${deployAccount} 3 104 echo "### 2)Preparation of XCPlugin contract bytecode. ###" 105 106 XCPluginBytecode=`cat ../contracts/src/XCPlugin/XCPlugin.bin && docker run --rm -v ${PWD}:/ethabi cryptominder/ethabi:latest encode params -v string ${platform} --lenient` 107 echo "XCPlugin Bytecode:${XCPluginBytecode:0:16}..." 108 109 echo "### 3)Deployment of XCPlugin contract. ###" 110 sh qtum-cli.sh createcontract ${XCPluginBytecode} 2500000 0.00000049 ${deployAccount} 111 112 echo "###################################################" 113 echo "# END #" 114 echo "###################################################" 115 ;; 116 3) 117 echo "###################################################" 118 echo "# START #" 119 echo "###################################################" 120 echo "### 1)Transfer 3 QTUM to the contract account. ###" 121 echo "Please enter the platform name:" 122 read platform 123 echo "Please enter a release contract account:" 124 read deployAccount 125 sh qtum-cli.sh sendtoaddress ${deployAccount} 3 126 echo "### 2)Preparation of XC contract bytecode. ###" 127 128 XCBytecode=`cat ../contracts/src/XC/XC.bin && docker run --rm -v ${PWD}:/ethabi cryptominder/ethabi:latest encode params -v string ${platform} --lenient` 129 echo "XC Bytecode:${XCBytecode:0:16}..." 130 131 echo "### 3)Deployment of XC contract. ###" 132 sh qtum-cli.sh createcontract ${XCBytecode} 2500000 0.00000049 ${deployAccount} 133 134 echo "###################################################" 135 echo "# END #" 136 echo "###################################################" 137 ;; 138 *) 139 echo "###################################################" 140 echo "# ~^@^~ #" 141 echo "###################################################" 142 ;; 143 esac