github.com/iotexproject/iotex-core@v1.14.1-rc1/ioctl/cmd/action/xrc20const.go (about) 1 package action 2 3 import ( 4 "strings" 5 6 "github.com/ethereum/go-ethereum/accounts/abi" 7 "go.uber.org/zap" 8 9 "github.com/iotexproject/iotex-core/pkg/log" 10 ) 11 12 const _abiConst = `[ 13 { 14 "constant": false, 15 "inputs": [ 16 { 17 "name": "spender", 18 "type": "address" 19 }, 20 { 21 "name": "value", 22 "type": "uint256" 23 } 24 ], 25 "name": "approve", 26 "outputs": [ 27 { 28 "name": "", 29 "type": "bool" 30 } 31 ], 32 "payable": false, 33 "stateMutability": "nonpayable", 34 "type": "function" 35 }, 36 { 37 "constant": true, 38 "inputs": [], 39 "name": "totalSupply", 40 "outputs": [ 41 { 42 "name": "", 43 "type": "uint256" 44 } 45 ], 46 "payable": false, 47 "stateMutability": "view", 48 "type": "function" 49 }, 50 { 51 "constant": false, 52 "inputs": [ 53 { 54 "name": "from", 55 "type": "address" 56 }, 57 { 58 "name": "to", 59 "type": "address" 60 }, 61 { 62 "name": "value", 63 "type": "uint256" 64 } 65 ], 66 "name": "transferFrom", 67 "outputs": [ 68 { 69 "name": "", 70 "type": "bool" 71 } 72 ], 73 "payable": false, 74 "stateMutability": "nonpayable", 75 "type": "function" 76 }, 77 { 78 "constant": true, 79 "inputs": [ 80 { 81 "name": "who", 82 "type": "address" 83 } 84 ], 85 "name": "balanceOf", 86 "outputs": [ 87 { 88 "name": "", 89 "type": "uint256" 90 } 91 ], 92 "payable": false, 93 "stateMutability": "view", 94 "type": "function" 95 }, 96 { 97 "constant": false, 98 "inputs": [ 99 { 100 "name": "to", 101 "type": "address" 102 }, 103 { 104 "name": "value", 105 "type": "uint256" 106 } 107 ], 108 "name": "transfer", 109 "outputs": [ 110 { 111 "name": "", 112 "type": "bool" 113 } 114 ], 115 "payable": false, 116 "stateMutability": "nonpayable", 117 "type": "function" 118 }, 119 { 120 "constant": true, 121 "inputs": [ 122 { 123 "name": "owner", 124 "type": "address" 125 }, 126 { 127 "name": "spender", 128 "type": "address" 129 } 130 ], 131 "name": "allowance", 132 "outputs": [ 133 { 134 "name": "", 135 "type": "uint256" 136 } 137 ], 138 "payable": false, 139 "stateMutability": "view", 140 "type": "function" 141 }, 142 { 143 "anonymous": false, 144 "inputs": [ 145 { 146 "indexed": true, 147 "name": "owner", 148 "type": "address" 149 }, 150 { 151 "indexed": true, 152 "name": "spender", 153 "type": "address" 154 }, 155 { 156 "indexed": false, 157 "name": "value", 158 "type": "uint256" 159 } 160 ], 161 "name": "Approval", 162 "type": "event" 163 }, 164 { 165 "anonymous": false, 166 "inputs": [ 167 { 168 "indexed": true, 169 "name": "from", 170 "type": "address" 171 }, 172 { 173 "indexed": true, 174 "name": "to", 175 "type": "address" 176 }, 177 { 178 "indexed": false, 179 "name": "value", 180 "type": "uint256" 181 } 182 ], 183 "name": "Transfer", 184 "type": "event" 185 } 186 ]` 187 188 var _xrc20ABI abi.ABI 189 190 func init() { 191 var err error 192 _xrc20ABI, err = abi.JSON(strings.NewReader(_abiConst)) 193 if err != nil { 194 log.L().Panic("cannot get abi JSON data", zap.Error(err)) 195 } 196 }