diff --git a/abigen/main.go b/cmd/abigen/abigen.go similarity index 86% rename from abigen/main.go rename to cmd/abigen/abigen.go index 835b8537..58e8bbac 100644 --- a/abigen/main.go +++ b/cmd/abigen/abigen.go @@ -1,10 +1,9 @@ -package main +package abigen import ( "crypto/sha256" "encoding/hex" "encoding/json" - "flag" "fmt" "io/ioutil" "os" @@ -15,32 +14,14 @@ import ( "github.com/umbracle/ethgo/compiler" ) -const ( - version = "0.1.0" -) - -func main() { - var sources string - var pckg string - var output string - var name string - - flag.StringVar(&sources, "source", "", "List of abi files") - flag.StringVar(&pckg, "package", "main", "Name of the package") - flag.StringVar(&output, "output", "", "Output directory") - flag.StringVar(&name, "name", "", "name of the contract") - - flag.Parse() - +func Parse(sources string, pckg string, output string) error { config := &config{ Package: pckg, Output: output, - Name: name, } if sources == "" { - fmt.Println(version) - os.Exit(0) + return fmt.Errorf("no source") } for _, source := range strings.Split(sources, ",") { @@ -70,10 +51,10 @@ func main() { } } } + return nil } const ( - vyExt = 0 solExt = 1 abiExt = 2 jsonExt = 3 @@ -93,8 +74,6 @@ func process(sources string, config *config) (map[string]*compiler.Artifact, err ext = abiExt case ".sol": ext = solExt - case ".vy", ".py": - ext = vyExt case ".json": ext = jsonExt default: @@ -154,9 +133,6 @@ func processAbi(sources []string, config *config) (map[string]*compiler.Artifact // bin not found bin = []byte{} } - if len(sources) == 1 && config.Name != "" { - name = config.Name - } artifacts[strings.Title(name)] = &compiler.Artifact{ Abi: string(content), Bin: string(bin), diff --git a/abigen/gen.go b/cmd/abigen/gen.go similarity index 98% rename from abigen/gen.go rename to cmd/abigen/gen.go index 3a4d7e20..8a351135 100644 --- a/abigen/gen.go +++ b/cmd/abigen/gen.go @@ -1,4 +1,4 @@ -package main +package abigen import ( "bytes" @@ -10,13 +10,13 @@ import ( "text/template" "github.com/umbracle/ethgo/abi" + "github.com/umbracle/ethgo/cmd/version" "github.com/umbracle/ethgo/compiler" ) type config struct { Package string Output string - Name string } func cleanName(str string) string { @@ -144,6 +144,7 @@ func gen(artifacts map[string]*compiler.Artifact, config *config, hash string) e } input := map[string]interface{}{ "Hash": hash, + "Version": version.Version, "Ptr": strings.ToLower(string(name[0])), "Config": config, "Contract": artifact, @@ -174,6 +175,7 @@ func gen(artifacts map[string]*compiler.Artifact, config *config, hash string) e var templateAbiStr = `// Code generated by ethgo/abigen. DO NOT EDIT. // Hash: {{.Hash}} +// Version: {{.Version}} package {{.Config.Package}} import ( diff --git a/abigen/testdata/testdata.abi b/cmd/abigen/testdata/testdata.abi similarity index 100% rename from abigen/testdata/testdata.abi rename to cmd/abigen/testdata/testdata.abi diff --git a/abigen/testdata/testdata.go b/cmd/abigen/testdata/testdata.go similarity index 98% rename from abigen/testdata/testdata.go rename to cmd/abigen/testdata/testdata.go index 44a18ab3..684fa4b8 100644 --- a/abigen/testdata/testdata.go +++ b/cmd/abigen/testdata/testdata.go @@ -1,5 +1,6 @@ // Code generated by ethgo/abigen. DO NOT EDIT. // Hash: 3f1af52b391dcf1991b5cee7468a69f382cfa0f819eaff85474464c969fe7ea9 +// Version: 0.1.0 package testdata import ( diff --git a/abigen/testdata/testdata_artifacts.go b/cmd/abigen/testdata/testdata_artifacts.go similarity index 100% rename from abigen/testdata/testdata_artifacts.go rename to cmd/abigen/testdata/testdata_artifacts.go diff --git a/cmd/commands/abigen.go b/cmd/commands/abigen.go new file mode 100644 index 00000000..68e6a41e --- /dev/null +++ b/cmd/commands/abigen.go @@ -0,0 +1,53 @@ +package commands + +import ( + flag "github.com/spf13/pflag" + "github.com/umbracle/ethgo/cmd/abigen" +) + +// VersionCommand is the command to show the version of the agent +type AbigenCommand struct { + *baseCommand + + source string + pckg string + output string +} + +// Help implements the cli.Command interface +func (c *AbigenCommand) Help() string { + return `Usage: ethgo abigen + + Compute the abigen. +` + c.Flags().FlagUsages() +} + +// Synopsis implements the cli.Command interface +func (c *AbigenCommand) Synopsis() string { + return "Compute the abigen" +} + +func (c *AbigenCommand) Flags() *flag.FlagSet { + flags := c.baseCommand.Flags("abigen") + + flags.StringVar(&c.source, "source", "", "Source data") + flags.StringVar(&c.pckg, "package", "main", "Name of the package") + flags.StringVar(&c.output, "output", ".", "Output directory") + + return flags +} + +// Run implements the cli.Command interface +func (c *AbigenCommand) Run(args []string) int { + flags := c.Flags() + if err := flags.Parse(args); err != nil { + c.UI.Error(err.Error()) + return 1 + } + + if err := abigen.Parse(c.source, c.pckg, c.output); err != nil { + c.UI.Error(err.Error()) + return 1 + } + return 0 +} diff --git a/cmd/commands/commands.go b/cmd/commands/commands.go new file mode 100644 index 00000000..3afb1da1 --- /dev/null +++ b/cmd/commands/commands.go @@ -0,0 +1,42 @@ +package commands + +import ( + "os" + + "github.com/mitchellh/cli" + flag "github.com/spf13/pflag" +) + +func Commands() map[string]cli.CommandFactory { + ui := &cli.BasicUi{ + Reader: os.Stdin, + Writer: os.Stdout, + ErrorWriter: os.Stderr, + } + + baseCommand := &baseCommand{ + UI: ui, + } + + return map[string]cli.CommandFactory{ + "abigen": func() (cli.Command, error) { + return &AbigenCommand{ + baseCommand: baseCommand, + }, nil + }, + "version": func() (cli.Command, error) { + return &VersionCommand{ + UI: ui, + }, nil + }, + } +} + +type baseCommand struct { + UI cli.Ui +} + +func (b *baseCommand) Flags(name string) *flag.FlagSet { + flags := flag.NewFlagSet(name, 0) + return flags +} diff --git a/cmd/commands/version.go b/cmd/commands/version.go new file mode 100644 index 00000000..f073e2b2 --- /dev/null +++ b/cmd/commands/version.go @@ -0,0 +1,29 @@ +package commands + +import ( + "github.com/mitchellh/cli" + "github.com/umbracle/ethgo/cmd/version" +) + +// VersionCommand is the command to show the version of the agent +type VersionCommand struct { + UI cli.Ui +} + +// Help implements the cli.Command interface +func (c *VersionCommand) Help() string { + return `Usage: ethgo version + + Display the Ethgo version` +} + +// Synopsis implements the cli.Command interface +func (c *VersionCommand) Synopsis() string { + return "Display the Ethgo version" +} + +// Run implements the cli.Command interface +func (c *VersionCommand) Run(args []string) int { + c.UI.Output(version.GetVersion()) + return 0 +} diff --git a/cmd/go.mod b/cmd/go.mod new file mode 100644 index 00000000..f0a3d667 --- /dev/null +++ b/cmd/go.mod @@ -0,0 +1,34 @@ +module github.com/umbracle/ethgo/cmd + +go 1.17 + +require ( + github.com/mitchellh/cli v1.1.2 + github.com/umbracle/ethgo v0.0.0-20220303093617-1621d9ff042b +) + +require ( + github.com/Masterminds/goutils v1.1.0 // indirect + github.com/Masterminds/semver v1.5.0 // indirect + github.com/Masterminds/sprig v2.22.0+incompatible // indirect + github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 // indirect + github.com/bgentry/speakeasy v0.1.0 // indirect + github.com/fatih/color v1.7.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect + github.com/google/uuid v1.1.2 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/hashicorp/go-multierror v1.0.0 // indirect + github.com/huandu/xstrings v1.3.2 // indirect + github.com/imdario/mergo v0.3.11 // indirect + github.com/mattn/go-colorable v0.0.9 // indirect + github.com/mattn/go-isatty v0.0.3 // indirect + github.com/mitchellh/copystructure v1.0.0 // indirect + github.com/mitchellh/mapstructure v1.1.2 // indirect + github.com/mitchellh/reflectwalk v1.0.0 // indirect + github.com/posener/complete v1.1.1 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/umbracle/fastrlp v0.0.0-20211229195328-c1416904ae17 // indirect + github.com/valyala/fastjson v1.4.1 // indirect + golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect + golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 // indirect +) diff --git a/cmd/go.sum b/cmd/go.sum new file mode 100644 index 00000000..c6eb68d4 --- /dev/null +++ b/cmd/go.sum @@ -0,0 +1,186 @@ +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg= +github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= +github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Microsoft/go-winio v0.4.13 h1:Hmi80lzZuI/CaYmlJp/b+FjZdRZhKu9c2mDVqKlLWVs= +github.com/Microsoft/go-winio v0.4.13/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= +github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= +github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/containerd/continuity v0.0.0-20191214063359-1097c8bae83b h1:pik3LX++5O3UiNWv45wfP/WT81l7ukBJzd3uUiifbSU= +github.com/containerd/continuity v0.0.0-20191214063359-1097c8bae83b/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= +github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= +github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3 h1:ns/ykhmWi7G9O+8a448SecJU3nSMBXJfqQkl0upE1jI= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mitchellh/cli v1.1.2 h1:PvH+lL2B7IQ101xQL63Of8yFS2y+aDlsFcsqNc+u/Kw= +github.com/mitchellh/cli v1.1.2/go.mod h1:6iaV0fGdElS6dPBx0EApTxHrcWvmJphyh2n8YBLPPZ4= +github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.1.1 h1:GlxAyO6x8rfZYN9Tt0Kti5a/cP41iuiO2yYT0IJGY8Y= +github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= +github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= +github.com/umbracle/ethgo v0.0.0-20220303093617-1621d9ff042b h1:lPvOaqfylyQEx4EOHAg8+ZMVbgPBahN0CVQ4Y8gqh2I= +github.com/umbracle/ethgo v0.0.0-20220303093617-1621d9ff042b/go.mod h1:IRxrWYxMlmIezmLY5/GETr1UJfkD1+dj1SZ/afuzs/I= +github.com/umbracle/fastrlp v0.0.0-20211229195328-c1416904ae17 h1:ZZy8Rj2SqGcZn1hTcoLdwFBROzrf5KiuRwhp8G4nnfA= +github.com/umbracle/fastrlp v0.0.0-20211229195328-c1416904ae17/go.mod h1:c8J0h9aULj2i3umrfyestM6jCq0LK0U6ly6bWy96nd4= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.4.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s= +github.com/valyala/fastjson v1.4.1 h1:hrltpHpIpkaxll8QltMU8c3QZ5+qIiCL8yKqPFJI/yE= +github.com/valyala/fastjson v1.4.1/go.mod h1:nV6MsjxL2IMJQUoHDIrjEI7oLyeqK6aBD7EFWPsvP8o= +github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 h1:fHDIZ2oxGnUZRN6WgWFCbYBjH9uqVPRCUVUDhs0wnbA= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= diff --git a/cmd/main.go b/cmd/main.go new file mode 100644 index 00000000..e9aea80a --- /dev/null +++ b/cmd/main.go @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "os" + + "github.com/mitchellh/cli" + "github.com/umbracle/ethgo/cmd/commands" +) + +func main() { + os.Exit(Run(os.Args[1:])) +} + +// Run starts the cli +func Run(args []string) int { + commands := commands.Commands() + + cli := &cli.CLI{ + Name: "ethgo", + Args: args, + Commands: commands, + } + + exitCode, err := cli.Run() + if err != nil { + fmt.Fprintf(os.Stderr, "Error executing CLI: %s\n", err.Error()) + return 1 + } + + return exitCode +} diff --git a/cmd/version/version.go b/cmd/version/version.go new file mode 100644 index 00000000..fd456d73 --- /dev/null +++ b/cmd/version/version.go @@ -0,0 +1,30 @@ +package version + +import "fmt" + +var ( + // GitCommit is the git commit that was compiled. + GitCommit string + + // Version is the main version at the moment. + Version = "0.1.0" + + // VersionPrerelease is a marker for the version. + VersionPrerelease = "" +) + +// GetVersion returns a string representation of the version +func GetVersion() string { + version := Version + + release := VersionPrerelease + if release != "" { + version += fmt.Sprintf("-%s", release) + + if GitCommit != "" { + version += fmt.Sprintf(" (%s)", GitCommit) + } + } + + return version +} diff --git a/contract/builtin/ens/ens.go b/contract/builtin/ens/ens.go index c7f2f1ed..8f50aa10 100644 --- a/contract/builtin/ens/ens.go +++ b/contract/builtin/ens/ens.go @@ -1,5 +1,6 @@ // Code generated by ethgo/abigen. DO NOT EDIT. -// Hash: d644ffae9e5df06d8b503a99da12a04d43a389598849c4f582d8610d8f846672 +// Hash: c514a7355ba5a0b591945fc4b6594465c20a1a13b45a03a2d1779ee133d714a9 +// Version: 0.1.0 package ens import ( diff --git a/contract/builtin/ens/resolver.go b/contract/builtin/ens/resolver.go index f4690258..a4d6b841 100644 --- a/contract/builtin/ens/resolver.go +++ b/contract/builtin/ens/resolver.go @@ -1,5 +1,6 @@ // Code generated by ethgo/abigen. DO NOT EDIT. -// Hash: 4ebf20f18b6e2d8b4ff95adbefe3a7b58581d17adce4289fbfb8f7c6456f1d73 +// Hash: 0c04761c33a894f2ef98ca34c1107d52c1e79c1913d2e632ceec744a37453c33 +// Version: 0.1.0 package ens import ( diff --git a/contract/builtin/erc20/erc20.go b/contract/builtin/erc20/erc20.go index 7b2ab929..d60b6fe1 100644 --- a/contract/builtin/erc20/erc20.go +++ b/contract/builtin/erc20/erc20.go @@ -1,5 +1,6 @@ // Code generated by ethgo/abigen. DO NOT EDIT. -// Hash: 7f235b8ff9310f081828e9950d4cadb51a402689fdfbe8cb5a195535b3c6a391 +// Hash: 2f4ca06adf3ede4e375fbb39f8806c16a90078c56d3b7703325b97d8d194729b +// Version: 0.1.0 package erc20 import ( diff --git a/scripts/build-artifacts.sh b/scripts/build-artifacts.sh index 962c7355..515a235e 100755 --- a/scripts/build-artifacts.sh +++ b/scripts/build-artifacts.sh @@ -1,16 +1,17 @@ #!/usr/bin/env bash set -o errexit +cd cmd echo "--> Build ENS" -ENS_ARTIFACTS=./contract/builtin/ens/artifacts -go run abigen/*.go --source ${ENS_ARTIFACTS}/ENS.abi,${ENS_ARTIFACTS}/Resolver.abi --output ./contract/builtin/ens --package ens +ENS_ARTIFACTS=../contract/builtin/ens/artifacts +go run main.go abigen --source ${ENS_ARTIFACTS}/ENS.abi,${ENS_ARTIFACTS}/Resolver.abi --output ../contract/builtin/ens --package ens echo "--> Build ERC20" -ERC20_ARTIFACTS=./contract/builtin/erc20/artifacts -go run abigen/*.go --source ${ERC20_ARTIFACTS}/ERC20.abi --output ./contract/builtin/erc20 --package erc20 +ERC20_ARTIFACTS=../contract/builtin/erc20/artifacts +go run main.go abigen --source ${ERC20_ARTIFACTS}/ERC20.abi --output ../contract/builtin/erc20 --package erc20 echo "--> Build Testdata" -go run abigen/*.go --source ./abigen/testdata/testdata.abi --output ./abigen/testdata --package testdata +go run main.go abigen --source ./abigen/testdata/testdata.abi --output ./abigen/testdata --package testdata diff --git a/website/pages/_app.js b/website/pages/_app.js index b47de204..b3c2a1aa 100644 --- a/website/pages/_app.js +++ b/website/pages/_app.js @@ -6,11 +6,15 @@ require("prismjs/components/prism-go") import Head from 'next/head'; +const prod = process.env.NODE_ENV === 'production' + export default function Nextra({ Component, pageProps }) { return ( <> - + {prod && + + } diff --git a/website/pages/cli/abigen.mdx b/website/pages/cli/abigen.mdx new file mode 100644 index 00000000..f458c076 --- /dev/null +++ b/website/pages/cli/abigen.mdx @@ -0,0 +1,23 @@ + +# Abigen + +The `abigen` command generates bindings to interact with smart contracts using Go. It requires as input the ABI specification of the smart contract in JSON format. + +## Usage + +```shell +$ ethgo abigen --source ./erc20.json --package erc20 +``` + +## Options + +- `source`: Path of the ABI contract file. +- `package`: Name of the Go package. +- `output`: Output directory. It defaults to the current location. + +## Output + +It generates two output files. + +- `[name].go`: It contains the bindings for the contract. +- `[name]_artifacts.go`. It contains the artifacts for the contract (ABI and deploy binary). diff --git a/website/pages/cli/meta.json b/website/pages/cli/meta.json new file mode 100644 index 00000000..4300b38f --- /dev/null +++ b/website/pages/cli/meta.json @@ -0,0 +1,4 @@ +{ + "abigen": "Abigen", + "version": "Version" +} \ No newline at end of file diff --git a/website/pages/cli/version.mdx b/website/pages/cli/version.mdx new file mode 100644 index 00000000..4402bf47 --- /dev/null +++ b/website/pages/cli/version.mdx @@ -0,0 +1,10 @@ + +# Version + +The `version` command outputs the version of the Ethgo binary. + +## Usage + +```shell +$ ethgo version +``` diff --git a/website/pages/meta.json b/website/pages/meta.json index a64bade4..a89ead85 100644 --- a/website/pages/meta.json +++ b/website/pages/meta.json @@ -3,5 +3,6 @@ "jsonrpc": "JsonRPC", "abi": "Application Binary Interface", "signers": "Signers", - "integrations": "Integrations" + "integrations": "Integrations", + "cli": "Command Line Interface" } \ No newline at end of file diff --git a/website/theme.config.js b/website/theme.config.js index 2a80bd2a..8c20200f 100644 --- a/website/theme.config.js +++ b/website/theme.config.js @@ -8,7 +8,11 @@ export default { customSearch: null, // customizable, you can use algolia for example darkMode: true, footer: true, - footerText: `Powered by Umbracle`, + footerText: ( + <> + Powered by Umbracle + + ), footerEditLink: `Edit this page on GitHub`, floatTOC: true, logo: (