From cb4e0b55f20f7129dbf014c5691c8654d14b66e4 Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Tue, 13 Feb 2024 07:59:48 -0500 Subject: [PATCH] README updates (#5) --- .github/.goreleaser.yml | 6 ++--- .github/workflows/release.yml | 45 ++++++++++++++++------------------- Makefile | 2 +- README.md | 41 ++++++++++++++++++------------- 4 files changed, 49 insertions(+), 45 deletions(-) diff --git a/.github/.goreleaser.yml b/.github/.goreleaser.yml index a79c3e2..8028c09 100644 --- a/.github/.goreleaser.yml +++ b/.github/.goreleaser.yml @@ -43,7 +43,7 @@ release: ## Build from source ``` - $ go install github.com/0xsequence/czip/cmd/czip-compressor + $ go install github.com/0xsequence/czip/cmd/czip-compressor@latest ``` ## Download binaries @@ -59,7 +59,7 @@ brews: - name: czip-compressor ids: - czip-compressor - tap: + repository: owner: 0xsequence name: homebrew-tap token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" @@ -69,4 +69,4 @@ brews: commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}" homepage: "https://github.com/0xsequence/czip" description: "czip: EVM Calldata Zip" - license: "MIT" + license: "Apache-2.0" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3bed104..83bd139 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,32 +5,27 @@ on: tags: - "v*" -# on: -# push: -# branches: -# - "**" - jobs: - # goreleaser: - # runs-on: ubuntu-latest - # steps: - # - name: Checkout - # uses: actions/checkout@v3 - # with: - # fetch-depth: 0 - # - name: Set up Go - # uses: actions/setup-go@v3 - # with: - # go-version: 1.22 - # - name: Run GoReleaser - # uses: goreleaser/goreleaser-action@v3 - # with: - # distribution: goreleaser - # version: latest - # args: release -f .github/.goreleaser.yml --clean - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.22 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + with: + distribution: goreleaser + version: latest + args: release -f .github/.goreleaser.yml --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} docker: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 1b63469..99997ad 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ build-czip-compressor: @cd compressor; make build build-decompressor: - @huffc ./src/decompressor.huff -e paris -b > ./build/decompressor + @mkdir -p build; huffc ./src/decompressor.huff -e paris -b > ./build/decompressor test: build-czip-compressor @forge test diff --git a/README.md b/README.md index c641c87..1023c59 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,20 @@ A companion `czip-compressor` tool is provided to compress calldata. It is a sim ## Install -TODO +``` +$ brew tap 0xsequence/tap +$ brew install czip-compressor +$ czip-compressor +``` + +or + +`$ docker run ghcr.io/0xsequence/czip-compressor` + +or + +`$ go install github.com/0xsequence/czip/compressor/cmd/czip-compressor@latest` + ## Usage @@ -189,44 +202,40 @@ The following benchmarking transactions are from the Arbitrum network, they show ![Sending ETH cost comparation](https://ipfs.io/ipfs/QmbJ3rZRdUyie8bpF7tbDHK5acqU7ncigsNLqJvW6qZViu?filename=Compressed%20ETH%20transactions%20-%20Sequence%20wallet.svg) -``` Send ETH uncompressed (1st): -0xa0efbb458309f1ccc14035a53e20c36155d722b1c5d991bfa7c43a21174ec468 +[0xa0efbb458309f1ccc14035a53e20c36155d722b1c5d991bfa7c43a21174ec468](https://arbiscan.io/tx/0xa0efbb458309f1ccc14035a53e20c36155d722b1c5d991bfa7c43a21174ec468) Send ETH compressed + write storage (1st): -0x9a34d5787b0dd6fba248ebeb407d51526445b496f45f2b4f6ff1d56875f04f7c +[0x9a34d5787b0dd6fba248ebeb407d51526445b496f45f2b4f6ff1d56875f04f7c](https://arbiscan.io/tx/0x9a34d5787b0dd6fba248ebeb407d51526445b496f45f2b4f6ff1d56875f04f7c) Send ETH compressed (1st): -0x6197b0770cdb3efcdb252bf3932ff9964e3467906a7ac1de6361e2d9fe1bb84e +[0x6197b0770cdb3efcdb252bf3932ff9964e3467906a7ac1de6361e2d9fe1bb84e](https://arbiscan.io/tx/0x6197b0770cdb3efcdb252bf3932ff9964e3467906a7ac1de6361e2d9fe1bb84e) Send ETH uncompressed (2nd): -0x7b519df3f10a0e0ae507d6d18d775f1ed80e65c76df06e5632f402903cd9afb8 +[0x7b519df3f10a0e0ae507d6d18d775f1ed80e65c76df06e5632f402903cd9afb8](https://arbiscan.io/tx/0x7b519df3f10a0e0ae507d6d18d775f1ed80e65c76df06e5632f402903cd9afb8) Send ETH compressed + write storage (2nd): -0x1680bae9b790bb54d522ebc033da92cb5261b73c27058767c55011957083ea41 +[0x1680bae9b790bb54d522ebc033da92cb5261b73c27058767c55011957083ea41](https://arbiscan.io/tx/0x1680bae9b790bb54d522ebc033da92cb5261b73c27058767c55011957083ea41) Send ETH compressed + write storage (2nd): -0x1ccc93227065df0b9d6acc64504280ad7e55b5823b90111a0b6477c881291de4 -``` +[0x1ccc93227065df0b9d6acc64504280ad7e55b5823b90111a0b6477c881291de4](https://arbiscan.io/tx/0x1ccc93227065df0b9d6acc64504280ad7e55b5823b90111a0b6477c881291de4) ![Sending ETH cost comparation](https://ipfs.io/ipfs/QmNXyKPgcba7a4bFAMzRsQS3GSgykSD2FkpD9Qpk2FE2oV?filename=Compressed%20ERC20%20transactions%20-%20Sequence%20wallet.svg) -``` Send ERC20 uncompressed: -0x0559ea8161e9cfed3298091d1f7626fe551bd40a38d2ff65d2340a52203e582a +[0x0559ea8161e9cfed3298091d1f7626fe551bd40a38d2ff65d2340a52203e582a](https://arbiscan.io/tx/0x0559ea8161e9cfed3298091d1f7626fe551bd40a38d2ff65d2340a52203e582a) Send ERC20 compressed + write storage: -0xbbf1d0250c37155f2da1d72cc01ff68fb5ccd4b4834a4accf53caf9374e64e3b +[0xbbf1d0250c37155f2da1d72cc01ff68fb5ccd4b4834a4accf53caf9374e64e3b](https://arbiscan.io/tx/0xbbf1d0250c37155f2da1d72cc01ff68fb5ccd4b4834a4accf53caf9374e64e3b) Send ERC20 compressed: -0x07e3b4de0b2cd3c8c531e90f32afc7a5dc3691b399ae4ab33d833b3e10741d05 +[0x07e3b4de0b2cd3c8c531e90f32afc7a5dc3691b399ae4ab33d833b3e10741d05](https://arbiscan.io/tx/0x07e3b4de0b2cd3c8c531e90f32afc7a5dc3691b399ae4ab33d833b3e10741d05) Approve ERC20 uncompressed: -0x03c5f3d5c5a556439215c751a0d84b838266e9ec2481f862a912943e1bc309d6 +[0x03c5f3d5c5a556439215c751a0d84b838266e9ec2481f862a912943e1bc309d6](https://arbiscan.io/tx/0x03c5f3d5c5a556439215c751a0d84b838266e9ec2481f862a912943e1bc309d6) Aprove ERC20 compressed: -0x7186dcf623d6bf5436691d28c649215900c4c71c2061863b0388786e07299428 -``` +[0x7186dcf623d6bf5436691d28c649215900c4c71c2061863b0388786e07299428](https://arbiscan.io/tx/0x7186dcf623d6bf5436691d28c649215900c4c71c2061863b0388786e07299428) ## Decompressor contract