github.com/n1ghtfa1l/go-vnt@v0.6.4-alpha.6/core/wavm/tests/erc20.json (about)

     1  {
     2       "env": {
     3            "previousHash": "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
     4            "currentNumber": 257,
     5            "currentGasLimit": 4000000,
     6            "currentDifficulty": 256,
     7            "currentTimestamp": 1546273000,
     8            "currentCoinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
     9       },
    10       "exec": {
    11            "address": "0xcccccccccccccccccccccccccccccccccccccccc",
    12            "value": 0,
    13            "gas": 4000000,
    14            "caller": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    15            "origin": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    16            "gasPrice": 1000000
    17       },
    18       "pre": {
    19            "0xcccccccccccccccccccccccccccccccccccccccc": {
    20                 "balance": "0xDE0B6B3A7640000",
    21                 "code": "",
    22                 "nonce": "0x00",
    23                 "storage": {}
    24            },
    25            "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa": {
    26                 "balance": "0xDE0B6B3A7640000",
    27                 "code": "",
    28                 "nonce": "0x00",
    29                 "storage": {}
    30            }
    31       },
    32       "testcase": [{
    33            "code": "erc20/TokenERC20.compress",
    34            "abi": "erc20/abi.json",
    35            "initcase": {
    36                 "needinit": true,
    37                 "input": [{
    38                      "data": "1000000000000",
    39                      "type": "uint256"
    40                 }, {
    41                      "data": "bitcoin",
    42                      "type": "string"
    43                 }, {
    44                      "data": "BTC",
    45                      "type": "string"
    46                 }]
    47            },
    48            "tests": [{
    49                 "function": "transfer",
    50                 "input": [{
    51                      "data": "0x02",
    52                      "type": "address"
    53                 }, {
    54                      "data": "10000",
    55                      "type": "uint256"
    56                 }],
    57                 "wanted": {
    58                      "data": "true",
    59                      "type": "bool"
    60                 }
    61            }, {
    62                 "function": "GetTotalSupply",
    63                 "input": [],
    64                 "wanted": {
    65                      "data": "100000000000000000000",
    66                      "type": "uint256"
    67                 }
    68            }, {
    69                 "function": "GetDecimals",
    70                 "input": [],
    71                 "wanted": {
    72                      "data": "8",
    73                      "type": "uint256"
    74                 }
    75            }, {
    76                 "function": "GetTokenName",
    77                 "input": [],
    78                 "wanted": {
    79                      "data": "bitcoin",
    80                      "type": "string"
    81                 }
    82            }, {
    83                 "function": "GetSymbol",
    84                 "input": [],
    85                 "wanted": {
    86                      "data": "BTC",
    87                      "type": "string"
    88                 }
    89            }, {
    90                 "function": "GetAmount",
    91                 "input": [{
    92                      "data": "0x02",
    93                      "type": "address"
    94                 }],
    95                 "wanted": {
    96                      "data": "10000",
    97                      "type": "uint256"
    98                 }
    99            }, {
   100                 "function": "GetAmount",
   101                 "input": [{
   102                      "data": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
   103                      "type": "address"
   104                 }],
   105                 "wanted": {
   106                      "data": "99999999999999990000",
   107                      "type": "uint256"
   108                 }
   109            }, {
   110                 "function": "GetAmount",
   111                 "input": [{
   112                      "data": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
   113                      "type": "address"
   114                 }],
   115                 "wanted": {
   116                      "data": "0",
   117                      "type": "uint256"
   118                 }
   119            }]
   120       }]
   121  }