Skip to content

Instantly share code, notes, and snippets.

View luren5's full-sized avatar

路人-戊 luren5

View GitHub Profile
@luren5
luren5 / doc.MD
Last active August 25, 2017 11:25
接口文档

列表内容说明: 列表内容是目前为止,域链浏览器、钱包客户端在应用层(基于以太坊链)开发过程中总结的接口需求,需要 L0 帮忙确认以下接口需求哪些可以提供,哪些不能提供,如果不能提供,是否可以有相应的解决办法(eg: 接口组合使用),以便在详细接口提供之前我们可以并行的进行结构调整。

根据 地址 获取交易列表 不支持(自动维护)

获取发布但未打包交易列表: 以太坊中的 pending 状态交易 此接口通过 websocket 实时推送,无需输入有新的交易即推送,消息格式如下

{
@luren5
luren5 / Ballot.sol
Last active November 11, 2019 10:34
pragma solidity ^0.4.13;
contract Ballot {
// 投票人结构体
struct Voter {
bytes32 name;
bool voted; // 是否已经投过票
uint vote; // 投给谁了
uint givenRightTime; // 被授权时间
uint votetime; // 投票时间
pragma solidity ^0.4.0;
contract SimpleAuction {
// Parameters of the auction. Times are either
// absolute unix timestamps (seconds since 1970-01-01)
// or time periods in seconds.
address public beneficiary;
uint public auctionStart;
uint public biddingTime;
pragma solidity ^0.4.13;
contract Ballot {
// 投票人结构体
struct Voter {
bytes32 name;
bool voted; // 是否已经投过票
uint vote; // 投给谁了
uint givenRightTime; // 被授权时间
uint votetime; // 投票时间
@luren5
luren5 / dynamic_schedule
Created July 1, 2015 07:30
动态课表demo
<html>
<head>
<title>动态课表演示</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<link href="http://share.hgdonline.net/assets/css/bootstrap.min.css" type="text/css" rel="stylesheet">
</head>
<body>
<h1><center>动态课表demo</center></h1>
<div class="">
@luren5
luren5 / dumpdDB
Last active August 29, 2015 14:19
#dbbackup.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import time
import sys
#db config
username = ""