This Ether faucet is running on the {{.Network}} network. To prevent malicious actors from exhausting all available funds or accumulating enough Ether to mount long running spam attacks, requests are tied to GitHub accounts. Anyone having a GitHub account may request funds within the permitted limit of {{.Amount}} Ether(s) / {{.Period}}.
+
To request funds, simply create a GitHub Gist with your Ethereum address pasted into the contents (the file name doesn't matter), copy paste the gists URL into the above input box and fire away! You can track the current pending requests below the input field to see how much you have to wait until your turn comes.
+
+
+
+
+
+
+
+
diff --git a/cmd/faucet/website.go b/cmd/faucet/website.go
new file mode 100644
index 0000000000..32650fec40
--- /dev/null
+++ b/cmd/faucet/website.go
@@ -0,0 +1,235 @@
+// Code generated by go-bindata.
+// sources:
+// faucet.html
+// DO NOT EDIT!
+
+package main
+
+import (
+ "bytes"
+ "compress/gzip"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "os"
+ "path/filepath"
+ "strings"
+ "time"
+)
+
+func bindataRead(data []byte, name string) ([]byte, error) {
+ gz, err := gzip.NewReader(bytes.NewBuffer(data))
+ if err != nil {
+ return nil, fmt.Errorf("Read %q: %v", name, err)
+ }
+
+ var buf bytes.Buffer
+ _, err = io.Copy(&buf, gz)
+ clErr := gz.Close()
+
+ if err != nil {
+ return nil, fmt.Errorf("Read %q: %v", name, err)
+ }
+ if clErr != nil {
+ return nil, err
+ }
+
+ return buf.Bytes(), nil
+}
+
+type asset struct {
+ bytes []byte
+ info os.FileInfo
+}
+
+type bindataFileInfo struct {
+ name string
+ size int64
+ mode os.FileMode
+ modTime time.Time
+}
+
+func (fi bindataFileInfo) Name() string {
+ return fi.name
+}
+func (fi bindataFileInfo) Size() int64 {
+ return fi.size
+}
+func (fi bindataFileInfo) Mode() os.FileMode {
+ return fi.mode
+}
+func (fi bindataFileInfo) ModTime() time.Time {
+ return fi.modTime
+}
+func (fi bindataFileInfo) IsDir() bool {
+ return false
+}
+func (fi bindataFileInfo) Sys() interface{} {
+ return nil
+}
+
+var _faucetHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x58\xe1\x72\xdb\x36\x12\xfe\x2d\x3f\xc5\x86\x77\xad\xa5\xb1\x49\xca\x71\x26\xed\xc8\xa4\x3a\x99\x36\x97\xf6\xe6\xa6\xed\x5c\xd3\xb9\xeb\xb4\x9d\x1b\x90\x5c\x8a\xb0\x41\x80\x05\x16\x92\xd5\x8c\xde\xfd\x06\x00\x45\x51\x8a\x9d\xa4\x97\xde\x1f\x5b\x00\x16\xdf\x7e\xd8\x5d\xec\x2e\x98\x3d\xf9\xea\xbb\x2f\x5f\xff\xf4\xfd\x4b\x68\xa8\x15\xcb\xb3\xcc\xfd\x03\xc1\xe4\x2a\x8f\x50\x46\xcb\xb3\x49\xd6\x20\xab\x96\x67\x93\x49\xd6\x22\x31\x28\x1b\xa6\x0d\x52\x1e\x59\xaa\xe3\xcf\xa3\xc3\x42\x43\xd4\xc5\xf8\x9b\xe5\xeb\x3c\xfa\x77\xfc\xe3\x8b\xf8\x4b\xd5\x76\x8c\x78\x21\x30\x82\x52\x49\x42\x49\x79\xf4\xcd\xcb\x1c\xab\x15\x8e\xf6\x49\xd6\x62\x1e\xad\x39\x6e\x3a\xa5\x69\x24\xba\xe1\x15\x35\x79\x85\x6b\x5e\x62\xec\x07\x97\xc0\x25\x27\xce\x44\x6c\x4a\x26\x30\xbf\x8a\x96\x67\x0e\x87\x38\x09\x5c\xbe\x79\x93\x7c\x8b\xb4\x51\xfa\x6e\xb7\x5b\xc0\x2b\x4e\x5f\xdb\x02\xfe\xc6\x6c\x89\x94\xa5\x41\xc4\x4b\x0b\x2e\xef\xa0\xd1\x58\xe7\x91\xe3\x6c\x16\x69\x5a\x56\xf2\xd6\x24\xa5\x50\xb6\xaa\x05\xd3\x98\x94\xaa\x4d\xd9\x2d\xbb\x4f\x05\x2f\x4c\x4a\x1b\x4e\x84\x3a\x2e\x94\x22\x43\x9a\x75\xe9\x75\x72\x9d\x7c\x96\x96\xc6\xa4\xc3\x5c\xd2\x72\x99\x94\xc6\x44\xa0\x51\xe4\x91\xa1\xad\x40\xd3\x20\x52\x04\xe9\xf2\x7f\xd3\x5b\x2b\x49\x31\xdb\xa0\x51\x2d\xa6\xcf\x92\xcf\x92\xb9\x57\x39\x9e\x7e\xb7\x56\xa7\xd6\x94\x9a\x77\x04\x46\x97\x1f\xac\xf7\xf6\x37\x8b\x7a\x9b\x5e\x27\x57\xc9\x55\x3f\xf0\x7a\x6e\x4d\xb4\xcc\xd2\x00\xb8\xfc\x28\xec\x58\x2a\xda\xa6\x4f\x93\x67\xc9\x55\xda\xb1\xf2\x8e\xad\xb0\xda\x6b\x72\x4b\xc9\x7e\xf2\x4f\xd3\xfb\x98\x0f\x6f\x4f\x5d\xf8\x67\x28\x6b\x55\x8b\x92\x92\x5b\x93\x3e\x4d\xae\x3e\x4f\xe6\xfb\x89\xb7\xf1\xbd\x02\xe7\x34\xa7\x6a\x92\xac\x51\x13\x2f\x99\x88\x4b\x94\x84\x1a\xde\xb8\xd9\x49\xcb\x65\xdc\x20\x5f\x35\xb4\x80\xab\xf9\xfc\x93\x9b\x87\x66\xd7\x4d\x98\xae\xb8\xe9\x04\xdb\x2e\xa0\x16\x78\x1f\xa6\x98\xe0\x2b\x19\x73\xc2\xd6\x2c\x20\x20\xfb\x85\x9d\xd7\xd9\x69\xb5\xd2\x68\x4c\xaf\xac\x53\x86\x13\x57\x72\xe1\x22\x8a\x11\x5f\xe3\x43\xb2\xa6\x63\xf2\xad\x0d\xac\x30\x4a\x58\xc2\x13\x22\x85\x50\xe5\x5d\x98\xf3\xd7\x78\x7c\x88\x52\x09\xa5\x17\xb0\x69\x78\xbf\x0d\xbc\x22\xe8\x34\xf6\xf0\xd0\xb1\xaa\xe2\x72\xb5\x80\xe7\x5d\x7f\x1e\x68\x99\x5e\x71\xb9\x80\xf9\x61\x4b\x96\xee\xcd\x98\xa5\x21\x63\x9d\x4d\xb2\x42\x55\x5b\xef\xc3\x8a\xaf\xa1\x14\xcc\x98\x3c\x3a\x31\xb1\xcf\x44\x47\x02\x2e\x01\x31\x2e\xf7\x4b\x47\x6b\x5a\x6d\x22\xf0\x8a\xf2\x28\x90\x88\x0b\x45\xa4\xda\x05\x5c\x39\x7a\xfd\x96\x13\x3c\x11\x8b\x55\x7c\xf5\x74\xbf\x38\xc9\x9a\xab\x3d\x08\xe1\x3d\xc5\xde\x3f\x83\x67\xa2\x65\xc6\xf7\x7b\x6b\x06\x35\x8b\x0b\x46\x4d\x04\x4c\x73\x16\x37\xbc\xaa\x50\xe6\x11\x69\x8b\x2e\x8e\xf8\x12\xc6\x79\x6f\x9f\xf6\x5e\x58\x6a\x50\xba\x73\x12\x56\x7d\x12\x84\x53\xd8\x15\xa7\xc6\x16\x31\x13\xf4\x28\x78\x96\x36\x57\xfb\x23\xa5\x15\x5f\xf7\x16\x19\xfd\x3c\x31\xce\xe3\xe7\xff\x1c\xfa\x1f\xaa\xae\x0d\x52\x3c\x32\xc7\x48\x98\xcb\xce\x52\xbc\xd2\xca\x76\xc3\xfa\x24\xf3\xb3\xc0\xab\x3c\x5a\x71\x43\x11\xd0\xb6\xeb\x6d\x17\x0d\x47\x52\xba\x8d\x9d\xeb\xb4\x12\x11\x74\x82\x95\xd8\x28\x51\xa1\xce\xa3\xde\x26\xaf\xb8\x21\xf8\xf1\x9f\xff\x80\xde\xc1\x5c\xae\x60\xab\xac\x86\x97\xd4\xa0\x46\xdb\x02\xab\x2a\x17\xdc\x49\x92\x8c\x74\xfb\x48\x7f\x9b\x5d\x5c\x90\x3c\x48\x4d\xb2\xc2\x12\xa9\x41\xb0\x20\x09\x05\xc9\xb8\xc2\x9a\x59\x31\x30\x0e\x42\x11\x28\x59\x0a\x5e\xde\xe5\x91\xb1\x45\xcb\x69\x3a\x8b\x96\xaf\xf8\x1a\xa1\xc5\x40\xe6\x49\x96\x06\xd1\x03\x8d\xd4\xf1\x18\x2c\x76\x70\xc0\x07\xfa\xe5\x24\x68\x49\x75\x0b\xb8\x7e\x3a\x8a\xd8\x87\x5c\xf6\xfc\xc4\x65\xd7\x0f\x0a\x77\x4c\xa2\x00\xff\x37\x36\x2d\x13\xfb\xdf\xfb\xb3\x1f\xce\x70\xba\x29\x76\xf7\x73\xa0\x36\xdc\xf3\xf9\x0d\xa8\x35\xea\x5a\xa8\xcd\x02\x98\x25\x75\x03\x2d\xbb\x1f\x72\xdd\xf5\x7c\x3e\xe6\xed\xea\x3f\x2b\x04\xfa\xf0\xd0\xf8\x9b\x45\x43\x66\x08\x8b\xb0\xe4\xff\xba\xe8\xa8\x50\x1a\xac\x4e\xac\xe1\x34\xba\x70\xf7\x52\x23\x8b\x1f\x6c\xfc\x10\xf7\x5a\xa9\x21\x7d\x8c\x69\xf4\xd0\xa3\x4c\x17\x2d\x33\xd2\x07\xb9\x49\x46\xd5\x1f\xba\xfe\xda\x95\xf7\xc7\x6e\x7f\x88\x4f\x77\xf6\x0e\x51\x87\xda\xe2\x22\x05\xfc\x30\x4b\xa9\xfa\x08\xcd\x15\x23\x56\x30\x83\x1f\xa2\xde\x67\xf9\x83\x7a\x3f\xfc\x58\xfd\x0d\x32\x4d\x05\xb2\xc7\x13\xd4\x88\x40\x6d\x65\x35\x3a\xbf\xbf\x48\x1f\x4b\xc0\x4a\xbe\x46\x6d\x38\x6d\x3f\x94\x01\x56\x07\x0a\x61\x7c\x4c\x21\x4b\x49\xbf\x3b\xd6\xfe\x0f\x97\xfb\x7d\xe5\xe8\x7a\xf9\xb5\xda\x40\xa5\xd0\x00\x35\xdc\x80\x2b\x26\x5f\x64\x69\x73\x3d\x88\x74\xcb\xd7\x6e\xc1\x1b\x15\xea\x50\x4f\xb8\x01\x6d\xa5\xcf\xa3\x4a\x02\x35\x78\x5c\x8a\x64\xf8\x95\xc0\x6b\xe5\xca\xf9\x1a\x25\x41\xcb\x04\x2f\xb9\xb2\x06\x58\x49\x4a\x1b\xa8\xb5\x6a\x01\xef\x1b\x66\x0d\x39\x20\x97\x3e\xd8\x9a\x71\xe1\xef\x92\x77\x29\x28\x0d\xac\x2c\x6d\x6b\x5d\x3b\x22\x57\x80\x52\xd9\x55\xd3\x73\x21\x05\xad\xb2\x92\x40\x28\xb9\x1a\xf8\x98\x8e\xb5\xc0\x88\x58\x79\x67\x2e\x61\x9f\x15\x80\x69\x04\xe2\x58\xb9\x5d\x7d\x55\x60\x65\xe9\xb6\x9b\x04\x5e\xc8\xad\x92\x08\x0d\x5b\x7b\x22\x27\x02\xd0\xb2\xed\x1e\xa8\xe7\xb5\xe1\xd4\xf0\x70\xf0\x0e\x75\xeb\xfa\xcb\x0a\x04\x6f\x39\x81\xaa\x21\x33\xa4\x95\x5c\xb9\x67\xc9\x0b\xcf\x70\xb7\x0b\x94\xa7\x66\x06\xa9\x33\xd5\xf7\xa8\xb9\xaa\x76\x3b\xd7\xba\x78\xd1\x24\x4b\xbb\xb1\xc5\xd5\xb1\xc2\x4b\x30\xbc\xed\xc4\x16\x4a\x8d\x8c\x10\x18\x64\xec\xe4\x41\xe1\xca\x63\x12\xea\xba\x6f\x49\x23\x20\xa6\x57\xee\xb9\xf6\x1f\x56\x28\x4b\x8b\x42\x30\x79\xe7\xaa\xcd\x50\x12\xb3\x94\x2d\xfd\x51\x1e\x2e\x86\xd0\x31\xe3\xce\xc5\x25\x29\x7f\xd4\xfe\x7d\x66\x60\xea\x46\x35\x17\xe8\x9f\x70\x3e\x7a\xe4\xb9\xb3\x93\xeb\xb3\x67\x97\x50\xaa\x6e\x1b\x76\xfb\x7d\x8e\x9a\xf1\xf5\x77\x80\x62\x85\x5a\x23\x84\xe2\x5e\xa8\x7b\x60\xb2\x82\x9a\x6b\x04\xb6\x61\xdb\x27\xf0\x93\xb2\x50\x32\x09\xa4\x59\x79\x17\x74\x5b\xad\x5d\x18\x75\x28\x5d\xa9\x38\x38\xb6\x40\xa1\x36\x5e\x24\xa0\xd5\x1c\x85\xf7\xb2\x41\x84\x46\x6d\xa0\xb5\xa5\x3f\xa0\x73\x2f\xba\x85\x0d\xe3\x04\x56\x12\x17\xe1\xdc\x64\xb5\x84\x52\xb5\x68\x46\x5e\x78\xf0\xfa\x0d\xbf\xfa\x1f\x87\x37\x82\x5f\x4e\x53\x78\x25\x54\xc1\x04\xac\x5d\xc6\x28\x84\xbb\x54\x0a\x5c\x33\x72\x74\x06\x43\x8c\xac\x71\x91\xe2\xed\xe8\xaf\x94\xdb\xbf\x66\xda\x45\x2e\xb6\x1d\x41\xde\x77\xb8\x6e\xce\xa0\x5e\xbb\xbe\xbd\xd7\xf1\x15\xd6\x5c\x06\xcb\xd6\x56\x96\xae\x01\x07\x6a\x18\x41\x68\x29\x0c\x30\x6f\x71\xb0\x5a\x40\x6f\xee\x80\x30\xe0\x79\x39\xc8\x87\xed\xd3\x59\xdf\x71\x07\xb9\xc4\xa0\xac\xa6\x7f\xff\xe1\xbb\x6f\x13\x43\x9a\xcb\x15\xaf\xb7\xd3\x37\x56\x8b\x05\xfc\x75\x1a\xfd\xc5\x37\x62\xb3\x9f\xe7\xbf\x26\x6b\x26\x2c\xee\x66\xb3\xf0\x4c\xb8\x39\xe6\xc7\xa0\x45\x6a\x94\xf7\x85\xc6\x52\x49\x89\x25\x81\xed\x94\xec\xe9\x80\x50\xc6\xec\x39\x1d\x24\x1e\xa0\xc5\x6b\x98\xee\x0d\xf3\x09\x3c\x85\x3c\x87\xf9\x7e\xad\xe7\x0c\x39\x48\xdc\xc0\xbf\xb0\xf8\x41\x95\x77\x48\xd3\x68\x63\xdc\xb5\x88\xe0\x02\x84\x2a\x99\xc3\x4b\x1a\x65\x08\x2e\x20\x4a\x59\xc7\xa3\xc0\x7a\xb2\x03\x14\x06\xdf\x0f\xf6\x41\x58\xe1\xcd\x15\x98\x5e\x5c\x04\x8f\xed\x8d\xaa\x64\x8b\xc6\xb0\x15\x8e\x4f\xe8\x73\xe3\x70\x14\x67\x88\xd6\xac\x20\x07\x6f\xfc\x8e\x69\x83\x41\x24\x71\xf5\xb8\xd7\xe2\xcd\xe1\xc5\xf2\x1c\xa4\x15\x62\xd8\x3f\xd1\xe8\x82\xb9\x17\xdb\x9d\x1d\x89\x27\x21\x75\x3d\xc9\x73\x70\xc5\xc9\xf9\xa8\x3a\xec\x74\x8e\x0d\x65\x74\x96\xb8\xfa\x78\xd8\x31\x1b\xe0\xde\x42\xc3\xea\x7d\x70\x58\x9d\xe2\x61\xf5\x08\xa0\xef\x5a\xde\x85\x17\xba\x9c\x11\x9c\x9f\x78\x04\x4d\xda\xb6\x40\xfd\x2e\xb8\xd0\xb5\xf4\x70\xde\xd4\xdf\x48\x1a\xed\xbd\x84\xab\xe7\xb3\x47\xd0\x51\x6b\xf5\x28\xb8\x54\xb4\x9d\xbe\x11\x6c\xeb\xb2\x2e\x9c\x93\xea\xbe\xf4\x4d\xc6\xf9\x25\x38\x5d\x0b\x18\x10\x2e\xfd\xe3\x60\x01\xe7\x7e\x74\xbe\x7b\x44\x9b\xb1\x65\xe9\xf2\xf1\xc7\xe8\xeb\x31\x06\x8d\xfd\xf8\x51\x9d\x43\x7e\x3d\x52\x0a\x9f\x7e\x0a\x6f\xad\x1e\x87\xa0\x8b\xe1\xbe\x50\x40\x0e\x51\xd4\xc3\x4f\x6a\xa5\x61\xea\x16\x79\x3e\xbf\x01\x9e\x8d\x61\x12\x81\x72\x45\xcd\x0d\xf0\x8b\x8b\x03\xd2\x64\x0f\x73\x91\x43\xe4\xfa\xe8\x8c\xaa\xa5\xef\x67\x42\xd3\xf3\x4b\x54\xb0\xf2\xce\x3d\xc9\x64\xb5\x70\xd9\x6e\x7a\x7e\x28\x86\xa3\x3a\x78\x71\x44\xf9\x67\xfe\x6b\x62\x0d\x6a\x5f\xb9\x2e\x20\x4a\x3a\xb9\xfa\xc2\xf0\xdf\x31\x7f\xfe\xec\x7c\x76\x03\x07\xcc\xd8\xcd\x2e\xa0\x74\x2f\x92\x1b\x08\x5d\xbd\xef\xad\x60\x78\x8f\xf8\x51\xa1\x74\x85\x3a\xd6\xac\xe2\xd6\x2c\xe0\x59\x77\x7f\xf3\x8b\xeb\x04\x5d\x89\xf0\x1d\xa0\xe7\xdd\x69\x5c\x3e\xc4\x65\xdf\x64\x5c\x40\x94\xa5\x4e\x68\xbf\x65\x38\xe5\xf8\xcb\x09\x3c\xd0\xbb\xc2\xf0\x5d\xa3\x9f\x6f\x79\x55\x09\x74\x24\xbc\xc2\xf0\x01\xaa\xb2\xda\x27\xae\x69\x18\x4f\x4f\x79\x10\x6f\x71\x96\x58\xc9\xef\xa7\xb3\xb8\x97\xd9\x8f\x2f\xe1\xdc\xb8\xfc\x5c\x99\xf3\x59\xd2\xd8\x96\x49\xfe\x3b\x4e\x5d\x23\x3c\x0b\xbc\x1d\x63\xd7\xdd\x0e\xde\xde\x8d\x2e\xda\xf0\x32\x9b\x25\x0d\xb5\x62\x1a\x65\xe4\xbf\xce\x38\x72\x83\x8b\x3d\x4a\x98\x3e\x8e\xc8\xdd\x71\x0e\x2d\x85\x32\x78\x52\x23\xc0\x20\xbd\xe6\x2d\x2a\x4b\xd3\xa1\x8e\x5c\xba\xd7\xe2\x7c\x76\x03\xa1\x2e\x1d\x10\xc2\xdd\xfd\xe3\x08\xbb\xbe\xbc\xbd\x34\xae\x83\xe7\xa6\x01\x06\x1b\x2c\x8c\xaf\x10\xd0\xef\xf1\xb5\x38\xd4\xdc\x17\xdf\x7f\x33\xaa\xbb\x03\xea\xd4\x1f\x6f\xf4\x99\x31\x4b\xc3\xb7\xaa\x2c\x0d\xdf\xe1\xff\x1b\x00\x00\xff\xff\x97\x3f\x1d\xc4\x98\x17\x00\x00")
+
+func faucetHtmlBytes() ([]byte, error) {
+ return bindataRead(
+ _faucetHtml,
+ "faucet.html",
+ )
+}
+
+func faucetHtml() (*asset, error) {
+ bytes, err := faucetHtmlBytes()
+ if err != nil {
+ return nil, err
+ }
+
+ info := bindataFileInfo{name: "faucet.html", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
+ a := &asset{bytes: bytes, info: info}
+ return a, nil
+}
+
+// Asset loads and returns the asset for the given name.
+// It returns an error if the asset could not be found or
+// could not be loaded.
+func Asset(name string) ([]byte, error) {
+ cannonicalName := strings.Replace(name, "\\", "/", -1)
+ if f, ok := _bindata[cannonicalName]; ok {
+ a, err := f()
+ if err != nil {
+ return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
+ }
+ return a.bytes, nil
+ }
+ return nil, fmt.Errorf("Asset %s not found", name)
+}
+
+// MustAsset is like Asset but panics when Asset would return an error.
+// It simplifies safe initialization of global variables.
+func MustAsset(name string) []byte {
+ a, err := Asset(name)
+ if err != nil {
+ panic("asset: Asset(" + name + "): " + err.Error())
+ }
+
+ return a
+}
+
+// AssetInfo loads and returns the asset info for the given name.
+// It returns an error if the asset could not be found or
+// could not be loaded.
+func AssetInfo(name string) (os.FileInfo, error) {
+ cannonicalName := strings.Replace(name, "\\", "/", -1)
+ if f, ok := _bindata[cannonicalName]; ok {
+ a, err := f()
+ if err != nil {
+ return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
+ }
+ return a.info, nil
+ }
+ return nil, fmt.Errorf("AssetInfo %s not found", name)
+}
+
+// AssetNames returns the names of the assets.
+func AssetNames() []string {
+ names := make([]string, 0, len(_bindata))
+ for name := range _bindata {
+ names = append(names, name)
+ }
+ return names
+}
+
+// _bindata is a table, holding each asset generator, mapped to its name.
+var _bindata = map[string]func() (*asset, error){
+ "faucet.html": faucetHtml,
+}
+
+// AssetDir returns the file names below a certain
+// directory embedded in the file by go-bindata.
+// For example if you run go-bindata on data/... and data contains the
+// following hierarchy:
+// data/
+// foo.txt
+// img/
+// a.png
+// b.png
+// then AssetDir("data") would return []string{"foo.txt", "img"}
+// AssetDir("data/img") would return []string{"a.png", "b.png"}
+// AssetDir("foo.txt") and AssetDir("notexist") would return an error
+// AssetDir("") will return []string{"data"}.
+func AssetDir(name string) ([]string, error) {
+ node := _bintree
+ if len(name) != 0 {
+ cannonicalName := strings.Replace(name, "\\", "/", -1)
+ pathList := strings.Split(cannonicalName, "/")
+ for _, p := range pathList {
+ node = node.Children[p]
+ if node == nil {
+ return nil, fmt.Errorf("Asset %s not found", name)
+ }
+ }
+ }
+ if node.Func != nil {
+ return nil, fmt.Errorf("Asset %s not found", name)
+ }
+ rv := make([]string, 0, len(node.Children))
+ for childName := range node.Children {
+ rv = append(rv, childName)
+ }
+ return rv, nil
+}
+
+type bintree struct {
+ Func func() (*asset, error)
+ Children map[string]*bintree
+}
+var _bintree = &bintree{nil, map[string]*bintree{
+ "faucet.html": &bintree{faucetHtml, map[string]*bintree{}},
+}}
+
+// RestoreAsset restores an asset under the given directory
+func RestoreAsset(dir, name string) error {
+ data, err := Asset(name)
+ if err != nil {
+ return err
+ }
+ info, err := AssetInfo(name)
+ if err != nil {
+ return err
+ }
+ err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
+ if err != nil {
+ return err
+ }
+ err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
+ if err != nil {
+ return err
+ }
+ err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
+ if err != nil {
+ return err
+ }
+ return nil
+}
+
+// RestoreAssets restores an asset under the given directory recursively
+func RestoreAssets(dir, name string) error {
+ children, err := AssetDir(name)
+ // File
+ if err != nil {
+ return RestoreAsset(dir, name)
+ }
+ // Dir
+ for _, child := range children {
+ err = RestoreAssets(dir, filepath.Join(name, child))
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func _filePath(dir, name string) string {
+ cannonicalName := strings.Replace(name, "\\", "/", -1)
+ return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
+}
+
diff --git a/cmd/puppeth/faucet/faucet.html b/cmd/puppeth/faucet/faucet.html
deleted file mode 100644
index 24cd9ca306..0000000000
--- a/cmd/puppeth/faucet/faucet.html
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-
-
-
-
- {{.Network}}: GitHub Faucet
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{{.Network}} GitHub Authenticated Faucet
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
How does this work?
-
This Ether faucet is running on the {{.Network}} network. To prevent malicious actors from exhausting all available funds or accumulating enough Ether to mount long running spam attacks, requests are tied to GitHub accounts. Anyone having a GitHub account may request funds within the permitted limit of {{.Amount}} Ether(s) / {{.Period}}.
-
To request funds, simply create a GitHub Gist with your Ethereum address pasted into the contents (the file name doesn't matter), copy paste the gists URL into the above input box and fire away! You can track the current pending requests below the input field to see how much you have to wait until your turn comes.
-
-
-
-
-
-
-
-
diff --git a/cmd/puppeth/faucet/website.go b/cmd/puppeth/faucet/website.go
deleted file mode 100644
index 5fb8a2ea01..0000000000
--- a/cmd/puppeth/faucet/website.go
+++ /dev/null
@@ -1,235 +0,0 @@
-// Code generated by go-bindata.
-// sources:
-// faucet.html
-// DO NOT EDIT!
-
-package main
-
-import (
- "bytes"
- "compress/gzip"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "path/filepath"
- "strings"
- "time"
-)
-
-func bindataRead(data []byte, name string) ([]byte, error) {
- gz, err := gzip.NewReader(bytes.NewBuffer(data))
- if err != nil {
- return nil, fmt.Errorf("Read %q: %v", name, err)
- }
-
- var buf bytes.Buffer
- _, err = io.Copy(&buf, gz)
- clErr := gz.Close()
-
- if err != nil {
- return nil, fmt.Errorf("Read %q: %v", name, err)
- }
- if clErr != nil {
- return nil, err
- }
-
- return buf.Bytes(), nil
-}
-
-type asset struct {
- bytes []byte
- info os.FileInfo
-}
-
-type bindataFileInfo struct {
- name string
- size int64
- mode os.FileMode
- modTime time.Time
-}
-
-func (fi bindataFileInfo) Name() string {
- return fi.name
-}
-func (fi bindataFileInfo) Size() int64 {
- return fi.size
-}
-func (fi bindataFileInfo) Mode() os.FileMode {
- return fi.mode
-}
-func (fi bindataFileInfo) ModTime() time.Time {
- return fi.modTime
-}
-func (fi bindataFileInfo) IsDir() bool {
- return false
-}
-func (fi bindataFileInfo) Sys() interface{} {
- return nil
-}
-
-var _faucetHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x59\x6d\x6f\xe3\x36\x12\xfe\xec\xfc\x8a\x59\xdd\xb5\xb1\x91\x48\x4a\x36\x8b\x6d\xe1\x48\x2e\x16\xed\xde\xb6\x87\x43\x5b\x5c\xb7\xb8\x2b\xda\xe2\x40\x49\x23\x8b\x1b\x8a\x54\xc9\xa1\x1d\x37\xf0\x7f\x3f\x90\x94\x65\xd9\x49\x2e\x69\x6f\xbf\x64\x4d\x72\xf8\xcc\x33\x1c\x72\x5e\xb4\xd9\x8b\xaf\xbe\xfb\xf2\xfd\x4f\xdf\xbf\x85\x86\x5a\xb1\x38\xc9\xdc\x3f\x20\x98\x5c\xe6\x11\xca\x68\x71\x02\x90\x35\xc8\x2a\xf7\x03\x20\x6b\x91\x18\x94\x0d\xd3\x06\x29\x8f\x2c\xd5\xf1\xe7\xd1\x78\xa9\x21\xea\x62\xfc\xcd\xf2\x55\x1e\xfd\x3b\xfe\xf1\x4d\xfc\xa5\x6a\x3b\x46\xbc\x10\x18\x41\xa9\x24\xa1\xa4\x3c\xfa\xe6\x6d\x8e\xd5\x12\x0f\x76\x4a\xd6\x62\x1e\xad\x38\xae\x3b\xa5\x69\x24\xbc\xe6\x15\x35\x79\x85\x2b\x5e\x62\xec\x07\xe7\xc0\x25\x27\xce\x44\x6c\x4a\x26\x30\xbf\x8c\x16\x27\x01\x89\x38\x09\x5c\xdc\xdd\x25\xdf\x22\xad\x95\xbe\xd9\x6e\xe7\xf0\x8e\xd3\xd7\xb6\x80\xbf\x31\x5b\x22\x65\x69\x10\x39\x39\x99\x4c\x32\xc1\xe5\x0d\x34\x1a\xeb\x3c\x72\xbc\xcd\x3c\x4d\xcb\x4a\x7e\x30\x49\x29\x94\xad\x6a\xc1\x34\x26\xa5\x6a\x53\xf6\x81\xdd\xa6\x82\x17\x26\xa5\x35\x27\x42\x1d\x17\x4a\x91\x21\xcd\xba\xf4\x2a\xb9\x4a\x3e\x4b\x4b\x63\xd2\x61\x2e\x69\xb9\x4c\x4a\x63\x22\xd0\x28\xf2\xc8\xd0\x46\xa0\x69\x10\x29\x82\xb4\xb7\xf8\x8f\x6b\xae\x95\xa4\x98\xad\xd1\xa8\x16\xd3\x57\xc9\x67\xc9\x85\x57\x3a\x9e\xfe\xdf\x7a\x9d\xc1\xa6\xd4\xbc\x23\x30\xba\x7c\xb6\xde\x0f\xbf\x59\xd4\x9b\xf4\x2a\xb9\x4c\x2e\xfb\x81\xd7\xf3\xc1\x44\x8b\x2c\x0d\x80\xbd\x51\x7f\x1a\x3d\x96\x8a\x36\xe9\xcb\xe4\x55\x72\x99\x76\xac\xbc\x61\x4b\xac\x76\xba\xdc\x52\xb2\x9b\xfc\x88\x9a\x1f\xf3\xe4\x87\x63\x47\x1e\xaa\xfb\x73\x87\xd8\xaa\x16\x25\x25\x1f\x4c\xfa\x32\xb9\xfc\x3c\xb9\xd8\x4d\xdc\xc7\xef\xed\x71\xae\x0b\xb6\x01\x24\x2b\xd4\xc4\x4b\x26\xe2\x12\x25\xa1\x86\xbb\x7e\x01\xa0\xe5\x32\x6e\x90\x2f\x1b\x9a\xc3\xe5\xc5\xc5\x27\xd7\x8f\xad\xac\x9a\xfd\x52\xc5\x4d\x27\xd8\x66\x0e\xb5\xc0\xdb\xfd\x34\x13\x7c\x29\x63\x4e\xd8\x9a\x39\x04\x4d\xbb\xc5\xed\x8e\x49\xa7\xd5\x52\xa3\x31\x23\x0a\x9d\x32\x9c\xb8\x92\x73\x77\xe9\x18\xf1\x15\x3e\xbe\xcb\x74\x4c\x3e\xb8\x95\x15\x46\x09\x4b\xf8\x00\xc9\x42\xa8\xf2\x66\x3f\xef\xdf\xff\xb1\xb1\xa5\x12\x4a\xcf\x61\xdd\xf0\x11\xc4\xf6\x64\x32\x99\x40\xa7\x11\xee\xdc\xaf\x09\x74\xac\xaa\xb8\x5c\xce\xe1\x75\x77\x7b\x1d\xa6\x5a\xa6\x97\x5c\xce\xe1\xc2\x8f\x7b\xc6\x59\x3a\x1c\x7f\x96\x86\xd0\xe7\x7e\x16\xaa\xda\xf4\xd7\xad\xe2\x2b\x28\x05\x33\x26\x8f\x8e\x7c\x13\xed\x9c\x36\x96\x71\x91\x8c\x71\xd9\xaf\x4e\x26\x93\xf1\xa2\x56\xeb\x08\xbc\xc2\x3c\x0a\x74\xe2\x42\x11\xa9\x76\x0e\x97\x8e\xe8\x80\x78\x1f\x55\xc4\x62\x19\x5f\xbe\x3c\x90\x70\xd1\xfa\x72\x87\x47\x78\x4b\xb1\xf7\xeb\xe0\xd1\x68\x91\xf1\x1d\x42\xcd\xa0\x66\x71\xc1\xa8\x89\x80\x69\xce\xe2\x86\x57\x15\xca\x3c\x22\x6d\xd1\x5d\x4a\xbe\x80\x71\x28\xdd\x45\xd2\x37\x96\x1a\x94\xce\x6c\xc2\xaa\x8f\xab\x70\x0c\xbb\xe4\xd4\xd8\x22\x66\x82\x1e\x05\xcf\xd2\xe6\xf2\xc0\xba\xb4\xe2\xab\xfd\xc4\x30\x7c\xe0\xc4\x16\xde\x7f\x93\x07\xce\xe3\x73\xe8\x7f\xa8\xba\x36\x48\xf1\xcb\x9d\xec\x81\x30\x97\x9d\xa5\x78\xa9\x95\xed\x86\xf5\x49\xe6\x67\x81\x57\x79\xb4\xe4\x86\x22\xa0\x4d\xd7\x9f\x62\x34\x18\xa7\x74\x1b\x3b\x87\x6a\x25\x22\xe8\x04\x2b\xb1\x51\xa2\x42\x9d\x47\xfd\xe9\xbc\xe3\x86\xe0\xc7\x7f\xfe\x03\x7a\xb7\x73\xb9\x84\x8d\xb2\x1a\xde\x52\x83\x1a\x6d\x0b\xac\xaa\xdc\x73\x48\x92\x64\xa4\xdb\xbf\x8d\xfb\xec\xe2\x82\xe4\x5e\x6a\x92\x15\x96\x48\x0d\x82\x05\x49\x28\x48\xc6\x15\xd6\xcc\x8a\x81\x71\x10\x8a\x40\xc9\x52\xf0\xf2\x26\x8f\x8c\x2d\x5a\x4e\xd3\x59\xb4\x78\xc7\x57\x08\x2d\x06\x32\x2f\xb2\x34\x88\xee\x69\xa4\x8e\xc7\x70\x62\xc1\x03\xe3\xdf\xc1\x1b\xfb\xf9\x27\xae\x32\xa9\x6e\x0e\x57\x2f\xc3\x3d\xbe\xef\x86\xde\x55\xaf\x8f\x7c\x76\xf5\xa0\x70\xc7\x24\x0a\xf0\x7f\x63\xd3\x32\xb1\xfb\xbd\x33\xfe\xf0\x19\x1c\x3e\x96\x20\xe9\x9e\xf0\xc0\x70\x08\x07\x17\xd7\xa0\x56\xa8\x6b\xa1\xd6\x73\x60\x96\xd4\x35\xb4\xec\x76\x88\x9e\x57\x17\x17\xbb\x67\xb8\x3b\x24\x62\x85\x40\x7f\x4f\x34\xfe\x66\xd1\x90\x19\xee\x47\x58\xf2\x7f\xdd\x35\xa9\x50\x1a\xac\x8e\x4e\xc5\xa9\x74\x2f\xc0\x4b\xdd\x63\x7d\xf8\x08\x1e\x33\xa5\x56\x6a\x1c\x6e\x46\xa2\x81\x41\xaf\x70\x14\x2e\xa3\x45\x46\xfa\xbe\xbc\xdb\x51\xfd\xa1\x80\xa1\x5d\x85\xf1\x58\xbc\x08\xf7\xd8\x1d\x4d\x87\xa8\x43\x6a\x73\x37\x0a\xfc\x30\x4b\xa9\xfa\x18\x14\x2a\x46\xac\x60\x06\x9f\xc3\xc3\x27\x90\x3d\x0f\x3f\xfc\x68\x44\x1a\x64\x9a\x0a\x64\x8f\x07\xb9\x11\x93\xda\xca\x6a\x74\x22\xfe\x09\x7e\x34\x26\x56\xf2\x15\x6a\xc3\x69\xf3\x5c\x2a\x58\xed\xb9\x84\xf1\xc3\x5c\xb2\x94\xf4\x13\xb7\xf5\xd1\x70\x71\x10\x39\xee\xdf\xe5\xa7\x22\xc6\xc3\x2f\xe0\xf1\xcc\x77\xb5\xf8\x5a\xad\xa1\x52\x68\x80\x1a\x6e\xc0\xe5\xad\x2f\xb2\xb4\xb9\x3a\x12\xec\x16\xef\xdd\xb2\xf7\x00\xd4\x21\x81\x71\x03\xda\x4a\x1f\xae\x95\x04\x6a\xf0\x30\xf7\xc9\xf0\x2b\x81\xf7\xca\x15\x15\x2b\x94\x04\x2d\x13\xbc\xe4\xca\x1a\x60\x25\x29\x6d\xa0\xd6\xaa\x05\xbc\x6d\x98\x35\xe4\x80\x5c\x90\x62\x2b\xc6\x85\x7f\x93\xde\xff\xa0\x34\xb0\xb2\xb4\xad\x75\xd5\x92\x5c\x02\x4a\x65\x97\x4d\xcf\x85\x14\xb4\xca\x4a\x02\xa1\xe4\x72\xe0\x63\x3a\xd6\x02\x23\x62\xe5\x8d\x39\x87\x5d\xcc\x01\xa6\x11\x88\x63\xe5\x76\xf5\xc9\x87\x95\xa5\xdb\x6e\x12\x78\x23\x37\x4a\x22\x34\x6c\xe5\x89\x1c\x09\x40\xcb\x36\x3b\xa0\x9e\xd7\x9a\x53\xc3\x83\xe1\x1d\xea\xd6\x55\xc7\x15\x08\xde\x72\x02\x55\xbb\x92\x54\x2b\xb9\x74\xad\xd5\x1b\xcf\x70\xbb\x0d\x94\xa7\x66\x06\xa9\x3b\xaa\xef\x51\x73\x55\x6d\xb7\xae\x7c\xf2\xa2\x49\x96\x76\xf7\xcf\x5d\x1d\xaa\x3d\x07\xc3\xdb\x4e\x6c\xa0\xd4\xc8\x08\x81\x41\xc6\x8e\x1a\x23\x97\x8b\x93\x50\x4e\xf8\xb2\x3a\x02\x62\x7a\xe9\xda\xcf\xff\xb0\x42\x59\x9a\x17\x82\xc9\x1b\x97\xda\x86\xfc\x9b\xa5\x6c\xe1\x0d\x7a\x38\xf3\x42\xc7\x8c\xb3\x8e\x4b\x52\xde\xe0\xbe\xd7\x34\x30\x75\xa3\x9a\x0b\xf4\xed\xa8\xbf\x49\xf2\xd4\x9d\x96\xeb\x15\x66\xe7\x50\xaa\x6e\x13\x76\xfb\x7d\x8e\x9a\xf1\xc9\x7e\x80\x62\x85\x5a\x21\x84\x4a\xa2\x50\xb7\xc0\x64\x05\x35\xd7\x08\x6c\xcd\x36\x2f\xe0\x27\x65\xa1\x64\x12\x48\xb3\xf2\x26\xe8\xb6\x5a\xbb\xcb\xd4\xa1\x74\xf9\x68\xef\xde\x02\x85\x5a\x7b\x91\x80\x56\x73\x14\xde\xd7\x06\x11\x1a\xb5\x86\xd6\x96\xde\x40\xe7\x64\x74\x0b\x6b\xc6\x09\xac\x24\x2e\x82\xdd\x64\xb5\x84\x52\xb5\x68\x8e\x7d\xf1\x58\xa9\x75\x34\xe8\x7f\x8e\x9b\xac\x9d\x54\x9a\xc2\x3b\xa1\x0a\x26\x60\xe5\xc2\x4d\x21\xdc\x9b\x53\xe0\x8a\xa1\x03\xb3\x0c\x31\xb2\xc6\x5d\x21\x7f\xb4\xfe\xad\xf5\x10\x2b\xa6\xdd\xad\xc6\xb6\x23\xc8\xfb\x1a\xdc\xcd\x19\xd4\x2b\xd7\x7c\xec\x35\x7d\x85\x35\x97\xe1\xc8\x6b\x2b\x4b\xd7\x34\x00\x35\x8c\x20\x14\x36\x06\x98\x77\x05\x58\x2d\xa0\xf7\x43\x00\x19\x69\x0a\xa2\x90\x0f\x08\xd3\xd9\xa8\x17\x09\xe2\x89\x41\x59\x4d\xff\xfe\xc3\x77\xdf\x26\x86\x34\x97\x4b\x5e\x6f\xa6\x77\x56\x8b\x39\xfc\x75\x1a\xfd\xc5\x57\x85\xb3\x9f\x2f\x7e\x4d\x56\x4c\x58\xdc\xce\x66\x43\xaf\x73\x7d\x8f\x2c\x83\x16\xa9\x51\xde\x63\x1a\x4b\x25\x25\x96\x04\xb6\x53\xb2\x57\x06\x42\x19\xb3\xb3\x79\x2f\xf1\x08\x41\x5e\xc3\x74\x77\x58\x9f\xc0\x4b\xc8\x73\xb8\x18\xaf\xef\x4c\x80\x1c\x24\xae\xe1\x5f\x58\xfc\xa0\xca\x1b\xa4\x69\xb4\x36\xee\x15\x45\x70\x06\x42\x95\xcc\x01\x27\x8d\x32\x04\x67\x10\xa5\xac\xe3\xd1\x6c\xdf\x48\x6d\x01\x85\xc1\x67\xa2\x3e\x1b\x74\xdf\x62\x06\xfe\x67\x67\x83\x6f\x87\x83\x57\xb2\x45\x63\xd8\x12\xc7\xf6\xfb\x28\x7b\x68\xa4\x3b\xab\xd6\x2c\x21\x07\xef\xa5\x8e\x69\x83\x41\x2e\x71\x45\xc1\x48\x6d\x38\x32\x2f\x9b\xe7\x20\xad\x10\x87\x48\x00\x1a\xdd\x03\x19\xef\xd8\x9e\xdc\xdf\x9e\x84\xf0\xf8\x22\xcf\xc1\x25\x49\xe7\xdb\xea\x18\xc9\x5d\x8e\x90\xdd\x67\x89\xcb\xd6\xfb\x7d\xb3\x43\xf8\x87\xd1\xb1\x7a\x1e\x3c\x56\xc7\xf8\x58\x3d\xa9\xc0\x17\x5e\x4f\xe3\x87\x72\x6d\x04\xef\x27\x9e\x44\x97\xb6\x2d\x50\x3f\x0d\x1f\xaa\xb0\x1e\xde\x7b\xed\x1b\x49\x23\x84\x73\xb8\x7c\x3d\x7b\x52\x1b\x6a\xad\x9e\x50\x26\x15\x6d\xa6\x77\x82\x6d\x5c\x66\x80\x53\x52\xdd\x97\xbe\x64\x3a\x3d\x07\xa7\x7b\x0e\x03\xce\xb9\xef\x96\xe6\x70\xea\x47\xa7\xdb\x27\xb5\x1b\x5b\x96\x2e\x7b\xfc\xff\xfa\x7b\xa4\x81\x41\x3f\x7e\x06\x87\x21\x3b\x1c\x90\x80\x4f\x3f\x85\x7b\xab\x0f\x5d\x79\xf7\x7c\xfa\x64\x07\x39\x44\xd1\xf5\xc1\x6a\xad\x34\x4c\x9d\x08\xcf\x2f\xae\x81\x67\x63\xc8\x44\xa0\x5c\x52\x73\x0d\xfc\xec\xec\x18\x15\x06\xcc\xb3\x1c\x22\xd7\x66\x64\x54\x2d\x7c\xc9\x16\x8a\xbb\x5f\xa2\x82\x95\x37\xae\xa1\x95\xd5\xdc\x45\xe9\xe9\xe9\x3e\xbb\x8f\x12\xfb\xd9\x81\x15\x3f\xf3\x5f\x13\x6b\x50\xfb\x54\x7c\x06\x51\xd2\xc9\xe5\x17\x86\xff\x8e\xf9\xeb\x57\xa7\xb3\x6b\xd8\x63\xc6\x6e\x76\x0e\xa5\xeb\xe3\xae\xfb\x6f\x44\xbe\x86\x84\xa1\x8b\xf3\xa3\x42\xe9\x0a\x75\xac\x59\xc5\xad\x99\xc3\xab\xee\xf6\xfa\x17\x57\x04\xbb\x2c\xe7\x8b\x5f\xcf\xbb\xd3\xb8\x78\x88\xcb\xae\x76\x3a\x83\x28\x4b\x9d\xd0\x6e\xcb\x60\xe5\xf8\xeb\x14\x3c\x50\xb6\xc3\xf0\xb9\xa8\x9f\x6f\x79\x55\x09\x74\x24\xbc\xc2\xf0\x55\xb0\xb2\xda\x47\xd4\x69\x18\x4f\x8f\x79\x10\x6f\x71\x96\x58\xc9\x6f\xa7\xb3\xb8\x97\xd9\x8d\xcf\xe1\xd4\xb8\x54\x52\x99\xd3\x59\xd2\xd8\x96\x49\xfe\x3b\x4e\x5d\x0f\x30\x0b\xbc\x1d\x63\x57\xd0\x1f\xb9\x7e\x7b\xef\xc5\x0e\xad\xed\x2c\x69\xa8\x15\xd3\x28\x23\xff\x09\xcc\x11\x1d\xdc\xed\x11\xc3\xf4\x23\x57\xd7\x7f\x86\x9b\x0c\x51\xbe\x14\xca\xe0\x51\x8e\x03\x83\xf4\x9e\xb7\xa8\x2c\x4d\x87\x3c\x78\xee\x1a\xef\x8b\xd9\xf5\x3e\xb5\x8e\x72\x45\x88\x03\x7f\x0a\x65\xbb\x4f\xd4\x6f\x8d\xeb\x69\xb8\x69\x80\xc1\x1a\x0b\xe3\x33\x1b\xf4\x3b\x7d\x89\x11\x4a\x89\x37\xdf\x7f\x73\x58\x4e\x0c\xf0\xd3\x99\x2b\x5a\xc6\x1f\xa3\xb3\x34\x7c\x27\xcc\xd2\xf0\xdf\x29\xff\x0d\x00\x00\xff\xff\xe0\xb5\x70\x41\x5f\x19\x00\x00")
-
-func faucetHtmlBytes() ([]byte, error) {
- return bindataRead(
- _faucetHtml,
- "faucet.html",
- )
-}
-
-func faucetHtml() (*asset, error) {
- bytes, err := faucetHtmlBytes()
- if err != nil {
- return nil, err
- }
-
- info := bindataFileInfo{name: "faucet.html", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
- a := &asset{bytes: bytes, info: info}
- return a, nil
-}
-
-// Asset loads and returns the asset for the given name.
-// It returns an error if the asset could not be found or
-// could not be loaded.
-func Asset(name string) ([]byte, error) {
- cannonicalName := strings.Replace(name, "\\", "/", -1)
- if f, ok := _bindata[cannonicalName]; ok {
- a, err := f()
- if err != nil {
- return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
- }
- return a.bytes, nil
- }
- return nil, fmt.Errorf("Asset %s not found", name)
-}
-
-// MustAsset is like Asset but panics when Asset would return an error.
-// It simplifies safe initialization of global variables.
-func MustAsset(name string) []byte {
- a, err := Asset(name)
- if err != nil {
- panic("asset: Asset(" + name + "): " + err.Error())
- }
-
- return a
-}
-
-// AssetInfo loads and returns the asset info for the given name.
-// It returns an error if the asset could not be found or
-// could not be loaded.
-func AssetInfo(name string) (os.FileInfo, error) {
- cannonicalName := strings.Replace(name, "\\", "/", -1)
- if f, ok := _bindata[cannonicalName]; ok {
- a, err := f()
- if err != nil {
- return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
- }
- return a.info, nil
- }
- return nil, fmt.Errorf("AssetInfo %s not found", name)
-}
-
-// AssetNames returns the names of the assets.
-func AssetNames() []string {
- names := make([]string, 0, len(_bindata))
- for name := range _bindata {
- names = append(names, name)
- }
- return names
-}
-
-// _bindata is a table, holding each asset generator, mapped to its name.
-var _bindata = map[string]func() (*asset, error){
- "faucet.html": faucetHtml,
-}
-
-// AssetDir returns the file names below a certain
-// directory embedded in the file by go-bindata.
-// For example if you run go-bindata on data/... and data contains the
-// following hierarchy:
-// data/
-// foo.txt
-// img/
-// a.png
-// b.png
-// then AssetDir("data") would return []string{"foo.txt", "img"}
-// AssetDir("data/img") would return []string{"a.png", "b.png"}
-// AssetDir("foo.txt") and AssetDir("notexist") would return an error
-// AssetDir("") will return []string{"data"}.
-func AssetDir(name string) ([]string, error) {
- node := _bintree
- if len(name) != 0 {
- cannonicalName := strings.Replace(name, "\\", "/", -1)
- pathList := strings.Split(cannonicalName, "/")
- for _, p := range pathList {
- node = node.Children[p]
- if node == nil {
- return nil, fmt.Errorf("Asset %s not found", name)
- }
- }
- }
- if node.Func != nil {
- return nil, fmt.Errorf("Asset %s not found", name)
- }
- rv := make([]string, 0, len(node.Children))
- for childName := range node.Children {
- rv = append(rv, childName)
- }
- return rv, nil
-}
-
-type bintree struct {
- Func func() (*asset, error)
- Children map[string]*bintree
-}
-var _bintree = &bintree{nil, map[string]*bintree{
- "faucet.html": &bintree{faucetHtml, map[string]*bintree{}},
-}}
-
-// RestoreAsset restores an asset under the given directory
-func RestoreAsset(dir, name string) error {
- data, err := Asset(name)
- if err != nil {
- return err
- }
- info, err := AssetInfo(name)
- if err != nil {
- return err
- }
- err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
- if err != nil {
- return err
- }
- err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
- if err != nil {
- return err
- }
- err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
- if err != nil {
- return err
- }
- return nil
-}
-
-// RestoreAssets restores an asset under the given directory recursively
-func RestoreAssets(dir, name string) error {
- children, err := AssetDir(name)
- // File
- if err != nil {
- return RestoreAsset(dir, name)
- }
- // Dir
- for _, child := range children {
- err = RestoreAssets(dir, filepath.Join(name, child))
- if err != nil {
- return err
- }
- }
- return nil
-}
-
-func _filePath(dir, name string) string {
- cannonicalName := strings.Replace(name, "\\", "/", -1)
- return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
-}
-
diff --git a/cmd/puppeth/module_faucet.go b/cmd/puppeth/module_faucet.go
index 4a75d06388..44016c53e9 100644
--- a/cmd/puppeth/module_faucet.go
+++ b/cmd/puppeth/module_faucet.go
@@ -40,7 +40,7 @@ RUN \
apk add --update git go make gcc musl-dev ca-certificates linux-headers && \
mkdir -p $GOPATH/src/github.com/ethereum && \
(cd $GOPATH/src/github.com/ethereum && git clone --depth=1 https://github.com/ethereum/go-ethereum) && \
- go build -v github.com/ethereum/go-ethereum/cmd/puppeth/faucet && \
+ go build -v github.com/ethereum/go-ethereum/cmd/faucet && \
apk del git go make gcc musl-dev linux-headers && \
rm -rf $GOPATH && rm -rf /var/cache/apk/*