forked from AElfProject/aelf-web-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aelf_test.sql
80 lines (71 loc) · 2.46 KB
/
aelf_test.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
Navicat MySQL Data Transfer
Source Server : hzz780
Source Server Type : MySQL
Source Server Version : 100309
Source Host : localhost:3306
Source Schema : aelf_test
Target Server Type : MySQL
Target Server Version : 100309
File Encoding : 65001
Date: 13/09/2018 19:23:46
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for address_contracts
-- ----------------------------
DROP TABLE IF EXISTS `address_contracts`;
CREATE TABLE `address_contracts` (
`address` varchar(255) NOT NULL,
`contract_address` varchar(255) NOT NULL,
PRIMARY KEY (`address`,`contract_address`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for blocks_0
-- ----------------------------
DROP TABLE IF EXISTS `blocks_0`;
CREATE TABLE `blocks_0` (
`block_hash` varchar(255) NOT NULL,
`pre_block_hash` varchar(255) NOT NULL,
`chain_id` varchar(255) NOT NULL,
`block_height` int(255) NOT NULL,
`tx_count` int(11) NOT NULL,
`merkle_root_tx` varchar(255) NOT NULL,
`merkle_root_state` varchar(255) NOT NULL,
`time` varchar(255) NOT NULL COMMENT '直接转存节点来的',
PRIMARY KEY (`block_hash`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for contract_aelf20
-- ----------------------------
DROP TABLE IF EXISTS `contract_aelf20`;
CREATE TABLE `contract_aelf20` (
`contract_address` varchar(255) NOT NULL,
`tx_id` varchar(255) NOT NULL,
`symbol` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`total_supply` bigint(20) NOT NULL,
`decimals` int(11) DEFAULT NULL,
PRIMARY KEY (`contract_address`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for transactions_0
-- ----------------------------
DROP TABLE IF EXISTS `transactions_0`;
CREATE TABLE `transactions_0` (
`tx_id` varchar(255) NOT NULL,
`params_to` varchar(255) NOT NULL DEFAULT '-1' COMMENT 'target address',
`chain_id` varchar(255) NOT NULL,
`block_height` int(11) NOT NULL,
`address_from` varchar(255) NOT NULL,
`address_to` varchar(255) NOT NULL COMMENT 'contract address',
`params` text NOT NULL,
`method` varchar(255) NOT NULL,
`block_hash` varchar(255) NOT NULL,
`increment_id` bigint(20) NOT NULL,
`quantity` bigint(20) NOT NULL,
`tx_status` varchar(255) NOT NULL,
PRIMARY KEY (`tx_id`,`params_to`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET FOREIGN_KEY_CHECKS = 1;