diff --git a/examples b/examples index e1b938c3b1..779bf49ff4 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit e1b938c3b1bd6c95db87af63d6054b40bb732436 +Subproject commit 779bf49ff44a4f4deb1393bbd43d1079da75452a diff --git a/node b/node index 3100a78af1..797d57ad5a 160000 --- a/node +++ b/node @@ -1 +1 @@ -Subproject commit 3100a78af10b793aed3daa4acdeae19f0efd0d1a +Subproject commit 797d57ad5a68b48db8be15a14496e1c63187565f diff --git a/scripts/go-work-sync.sh b/scripts/go-work-sync.sh index c0f1dcc76e..8751ef0a0e 100755 --- a/scripts/go-work-sync.sh +++ b/scripts/go-work-sync.sh @@ -36,9 +36,10 @@ find . -type f -name 'go.mod' | while read -r modfile; do isChifra="[ "$moddir" == "./src/apps/chifra" ]" isGoMaker="[ "$moddir" == "./src/dev_tools/goMaker" ]" isNode="[ "$moddir" == "./node" ]" - isSimple="[ "$moddir" == "./example/simple" ]" + isFourbyte="[ "$moddir" == "./examples/four_bytes" ]" + isSimple="[ "$moddir" == "./examples/simple" ]" - if $isGoMaker || $isNode; then + if $isGoMaker || $isNode || $isFourbyte; then go get github.com/btcsuite/btcd 2> /dev/null fi diff --git a/sdk b/sdk index db43b60c90..2575151799 160000 --- a/sdk +++ b/sdk @@ -1 +1 @@ -Subproject commit db43b60c90bc9796c534dbdfa42f5eacd8e8d35e +Subproject commit 257515179918724b3c85b7a33ae0e7caa11bdc45 diff --git a/src/apps/chifra/internal/names/validate.go b/src/apps/chifra/internal/names/validate.go index 9a6b01705e..6c7ee129e9 100644 --- a/src/apps/chifra/internal/names/validate.go +++ b/src/apps/chifra/internal/names/validate.go @@ -83,7 +83,7 @@ func (opts *NamesOptions) validateNames() error { } if err := opts.Conn.IsContractAtLatest(opts.AutonameAddr); err != nil { if err == rpc.ErrNotAContract { - return validate.Usage("The address provided to the {0} option is not a token contract.", "--autoname") + return validate.Usage("The address provided to the {0} option is not a contract.", "--autoname") } // ignore this error... we'll catch it later } diff --git a/src/apps/chifra/pkg/base/types_wei.go b/src/apps/chifra/pkg/base/types_wei.go index 1ffc3f4c64..26867ffb86 100644 --- a/src/apps/chifra/pkg/base/types_wei.go +++ b/src/apps/chifra/pkg/base/types_wei.go @@ -94,7 +94,7 @@ func (w *Wei) Cmp(y *Wei) int { } func (w *Wei) MarshalText() (text []byte, err error) { - if w == nil { + if w == nil || len(text) == 0 { return []byte("0"), nil } return (*big.Int)(w).MarshalText() diff --git a/src/dev_tools/goMaker/go.mod b/src/dev_tools/goMaker/go.mod index 701a0d1237..e60ab83638 100644 --- a/src/dev_tools/goMaker/go.mod +++ b/src/dev_tools/goMaker/go.mod @@ -4,7 +4,7 @@ module github.com/TrueBlocks/trueblocks-core/goMaker go 1.22 require ( - github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923010605-e373a04d7cd4 + github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923025630-c4c09cafc138 github.com/gocarina/gocsv v0.0.0-20230123225133-763e25b40669 golang.org/x/text v0.16.0 ) diff --git a/src/dev_tools/goMaker/go.sum b/src/dev_tools/goMaker/go.sum index a1a0e80e01..251c7ae46c 100644 --- a/src/dev_tools/goMaker/go.sum +++ b/src/dev_tools/goMaker/go.sum @@ -1,5 +1,5 @@ -github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923010605-e373a04d7cd4 h1:Gfgni8y5qgzd4dUTglBicRFWsLF/cILzNfqVUXlqJyI= -github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923010605-e373a04d7cd4/go.mod h1:YKuaek8RSyh681TFMK6Ua8MsHtuY+c1VJWi78Y35+J8= +github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923025630-c4c09cafc138 h1:v/Wvrp9Ztzvp8g2IEcVc7CvUMWlz3sA+3PIIe0LKuLg= +github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923025630-c4c09cafc138/go.mod h1:YKuaek8RSyh681TFMK6Ua8MsHtuY+c1VJWi78Y35+J8= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k= diff --git a/src/dev_tools/indexManager/go.mod b/src/dev_tools/indexManager/go.mod index 81c3af37ef..de418ca874 100644 --- a/src/dev_tools/indexManager/go.mod +++ b/src/dev_tools/indexManager/go.mod @@ -5,7 +5,7 @@ go 1.22 replace github.com/TrueBlocks/trueblocks-core/sdk => ../../../sdk -require github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923010605-e373a04d7cd4 +require github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923025630-c4c09cafc138 require ( github.com/ethereum/go-ethereum v1.13.15 // indirect diff --git a/src/dev_tools/indexManager/go.sum b/src/dev_tools/indexManager/go.sum index ede6e201eb..90d8922625 100644 --- a/src/dev_tools/indexManager/go.sum +++ b/src/dev_tools/indexManager/go.sum @@ -1,5 +1,5 @@ -github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923010605-e373a04d7cd4 h1:Gfgni8y5qgzd4dUTglBicRFWsLF/cILzNfqVUXlqJyI= -github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923010605-e373a04d7cd4/go.mod h1:YKuaek8RSyh681TFMK6Ua8MsHtuY+c1VJWi78Y35+J8= +github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923025630-c4c09cafc138 h1:v/Wvrp9Ztzvp8g2IEcVc7CvUMWlz3sA+3PIIe0LKuLg= +github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923025630-c4c09cafc138/go.mod h1:YKuaek8RSyh681TFMK6Ua8MsHtuY+c1VJWi78Y35+J8= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/ethereum/go-ethereum v1.13.15 h1:U7sSGYGo4SPjP6iNIifNoyIAiNjrmQkz6EwQG+/EZWo= github.com/ethereum/go-ethereum v1.13.15/go.mod h1:TN8ZiHrdJwSe8Cb6x+p0hs5CxhJZPbqB7hHkaUXcmIU= diff --git a/src/dev_tools/sdkFuzzer/go.mod b/src/dev_tools/sdkFuzzer/go.mod index 7bd87f55da..ce01d35902 100644 --- a/src/dev_tools/sdkFuzzer/go.mod +++ b/src/dev_tools/sdkFuzzer/go.mod @@ -4,7 +4,7 @@ module github.com/TrueBlocks/trueblocks-core/sdkFuzzer go 1.22 require ( - github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923010605-e373a04d7cd4 + github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923025630-c4c09cafc138 github.com/TrueBlocks/trueblocks-sdk/v3 v3.5.0 ) diff --git a/src/dev_tools/sdkFuzzer/go.sum b/src/dev_tools/sdkFuzzer/go.sum index 105e628c39..481efc48d0 100644 --- a/src/dev_tools/sdkFuzzer/go.sum +++ b/src/dev_tools/sdkFuzzer/go.sum @@ -40,8 +40,8 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923010605-e373a04d7cd4 h1:Gfgni8y5qgzd4dUTglBicRFWsLF/cILzNfqVUXlqJyI= -github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923010605-e373a04d7cd4/go.mod h1:YKuaek8RSyh681TFMK6Ua8MsHtuY+c1VJWi78Y35+J8= +github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923025630-c4c09cafc138 h1:v/Wvrp9Ztzvp8g2IEcVc7CvUMWlz3sA+3PIIe0LKuLg= +github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923025630-c4c09cafc138/go.mod h1:YKuaek8RSyh681TFMK6Ua8MsHtuY+c1VJWi78Y35+J8= github.com/TrueBlocks/trueblocks-sdk/v3 v3.5.0 h1:bz0zv6lgjda4NHJSzm+tTEPY0oi04izxMTVwrd/ZVp4= github.com/TrueBlocks/trueblocks-sdk/v3 v3.5.0/go.mod h1:9uF00GPp50ck8gRnpvBn0wFKB+dlFaAP6ObddLqU6Os= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= diff --git a/src/dev_tools/testRunner/go.mod b/src/dev_tools/testRunner/go.mod index 9f06a681ea..fe73bc8857 100644 --- a/src/dev_tools/testRunner/go.mod +++ b/src/dev_tools/testRunner/go.mod @@ -6,7 +6,7 @@ go 1.22 replace github.com/TrueBlocks/trueblocks-core/sdk => ../../../sdk require ( - github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923010605-e373a04d7cd4 + github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923025630-c4c09cafc138 github.com/TrueBlocks/trueblocks-sdk/v3 v3.5.0 ) diff --git a/src/dev_tools/testRunner/go.sum b/src/dev_tools/testRunner/go.sum index 105e628c39..481efc48d0 100644 --- a/src/dev_tools/testRunner/go.sum +++ b/src/dev_tools/testRunner/go.sum @@ -40,8 +40,8 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923010605-e373a04d7cd4 h1:Gfgni8y5qgzd4dUTglBicRFWsLF/cILzNfqVUXlqJyI= -github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923010605-e373a04d7cd4/go.mod h1:YKuaek8RSyh681TFMK6Ua8MsHtuY+c1VJWi78Y35+J8= +github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923025630-c4c09cafc138 h1:v/Wvrp9Ztzvp8g2IEcVc7CvUMWlz3sA+3PIIe0LKuLg= +github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240923025630-c4c09cafc138/go.mod h1:YKuaek8RSyh681TFMK6Ua8MsHtuY+c1VJWi78Y35+J8= github.com/TrueBlocks/trueblocks-sdk/v3 v3.5.0 h1:bz0zv6lgjda4NHJSzm+tTEPY0oi04izxMTVwrd/ZVp4= github.com/TrueBlocks/trueblocks-sdk/v3 v3.5.0/go.mod h1:9uF00GPp50ck8gRnpvBn0wFKB+dlFaAP6ObddLqU6Os= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= diff --git a/src/other/four_bytes.tar.gz b/src/other/four_bytes.tar.gz deleted file mode 100644 index b1e531f4ab..0000000000 Binary files a/src/other/four_bytes.tar.gz and /dev/null differ diff --git a/src/other/tutorials/delegate_calls.txt b/src/other/tutorials/delegate_calls.txt deleted file mode 100644 index e8ed0f8fa1..0000000000 --- a/src/other/tutorials/delegate_calls.txt +++ /dev/null @@ -1,3 +0,0 @@ -How to tell if someone is front running - -chifra export --trace
| grep delegatecall diff --git a/src/other/tutorials/simple query to show block ranges.txt b/src/other/tutorials/simple query to show block ranges.txt deleted file mode 100644 index e8ed0f8fa1..0000000000 --- a/src/other/tutorials/simple query to show block ranges.txt +++ /dev/null @@ -1,3 +0,0 @@ -How to tell if someone is front running - -chifra export --trace | grep delegatecall diff --git a/src/other/tutorials/total_supply_history.txt b/src/other/tutorials/total_supply_history.txt deleted file mode 100644 index 79373d64d5..0000000000 --- a/src/other/tutorials/total_supply_history.txt +++ /dev/null @@ -1,5 +0,0 @@ -Charting the total supply of a token - -chifra tokens --parts totalSupply - -Weekly, Monthly, etc.