Commit Graph

197 Commits

Author SHA1 Message Date
DaniPopes 944ed05556
fix(abigen): handle all struct field types (#2289)
* fix(abigen): handle all struct field types

* typo
2023-03-21 10:38:23 -07:00
DaniPopes ef7fb0fecf
fix: feature resolution (#2274)
* fix: feature resolution

* docs: add comment explaining resolver
2023-03-17 11:34:00 -07:00
DaniPopes 439a0c7de0
chore(deps): bump and use workspace dependencies (#2222)
* chore: update all deps

* chore: update dependabot

* chore: separate ethers package from workspace

* chore: package metadata

* chore: use package.*.workspace = true

* fix: docs.rs build

* chore: update examples manifests

* chore: use workspace dependencies for ethers-* crates

* fix: test

* chore: use workspace dependencies for all dependencies

* chore: pin rust-crypto

* chore: add license field to example crates

* fixes

* more fixes

* fix: test

* last fixes

* fix: wasm

* fix: docs.rs build

* fix

* fix: wasm-pack error

see also https://github.com/rustwasm/wasm-pack/issues/1238

* fix: wasm deps and example

* ci: update

* fix: wasm tests

* fix: eip712 tests

* fix: windows ci

* fix

* chore: update docsrs metadata

* chore: bump version to match crates.io

* chore: rm bad release.toml config

* chore: rm release.toml

bad configuration

* chore: add exclude to workspace

* fix: middleware

* fix: solc feature flags

* chore: run cargo upgrade

* chore: update deps

* chore: update remaining deps

* undo fix

* update lock

* bump yubi

* fix: update coins-* and fix spki breaking changes
2023-03-16 12:28:35 -07:00
DaniPopes c9a7b4acaf
refactor(abigen): keep and use parsed spans (#2247)
* order

* refactor(abigen): keep and use spans

* chore: use getters instead of making fields public

* fix: tests

* docs: update abigen documentation

* chore: clippy
2023-03-13 12:49:32 -07:00
Georgios Konstantopoulos 941d3908d9 (cargo-release) version 2.0.0 2023-03-13 12:38:25 -07:00
DaniPopes f9086e703c
fix: docsrs builds final (#2235)
* fix

* fix: middleware

* fix: update rustc flags

* docs: add comment
2023-03-08 14:58:44 -08:00
DaniPopes da743fc8b2
ci/test: improve CI jobs and tests (#2189)
* ci: move to scripts directory

* nits

* ci: improve main CI jobs

* fix: install script

* fix

* fix: use curl for windows installation

* fix: wasm typo

* tests: move to single binary

* chore: clippy

* chore: clippy

* chore: clippy

* fix: test command

* fix: quote tests

* update script

* fix: action exclude

* fix: dev deps

* fix: only run wasm in own job

* ci: add aarch64 targets

* test: rm useless test

* ci: update security audit

* ci: add deny CI

* chore: rm unused audit.toml

* chore: update geth.rs

* ci: remove unusable targets

* fix: install script path

* fix: wasm

* improve script

* fix: failing ci

* fix: contract tests

* ci: improve install script

* update middleware tests

* move integration etherscan tests to tests/ dir

* fix: eip2930 access_list field name

* add pendingtransaction must_use

* add random anvil comment

* ci: add miri job

* ci: simplify

* fixci

* Revert "add pendingtransaction must_use"

This reverts commit 770b21b4a3.

* fix: macos script

* fix: use curl in script

* unused ci

* update script

* fix wasm

* rm_miri

* fix: signer test

* fix: wasm ci

* fix: ipc test

* fix: live celo tests

* fix: abi online source test

* fix: windows paths in test

* chore: update serial_test

* ci: run live tests separately

* fix: provider tests

* fix: unused var

* fix: feature

* fix merge

* fix: etherscan key tests

* ci: rm duplicate audit

* fix: split etherscan test ci

* fix: etherscan test

* fix: generate multiple unused ports

* fix: source test

* fix: udeps

* rm unused
2023-02-28 17:26:27 -07:00
James Prestwich ded611e714
feature: contract revert trait (#2182)
* feature: contract revert trait

* fix: proper link to abigen in docs

* fix: don't borrow Bytes, better valid_slector

* fix: mattsse's nits

* opt: hardcode selector for Error(string)

* fix: add docstring to RevertString

* docs: enhance docs on ContractRevert

* chore: add doc on decoding error reverts as strings

* docs: more docstring on ContractRevert

* fix: fix try_into invocation

---------

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2023-02-28 00:59:32 -07:00
DaniPopes 1861b98896
chore: move etherscan api key env var matching to Chain enum (#2204)
* fix: mainnet, optimism blocktimes

* chore: move etherscan api key env var matching to Chain enum

* docs: missing exhaustiveness comment
2023-02-27 13:14:36 -07:00
DaniPopes 203e350940
docs: fix broken links, update documentation (#2203)
* docs: fix broken links

* docs: update READMEs and module-level documentation
2023-02-27 13:03:17 -07:00
DaniPopes 3732de844c
fix(abigen): builtin trait derives (#2170)
* fix(abigen): builtin trait derives

* refactor: EthDisplay

* feat(derive): improve type detection

* chore: cleanup

* chore: edition 2021

* chore: clippy

* chore: use unreachable
2023-02-20 16:27:43 -08:00
Mathis c21362b696
Make order of types in shared_types deterministic (#2169)
* Add missing development dependencies to flake.nix

* Use BTreeMap/Set for deterministic shared types

Fixes an issue where the order of types in the generated shared_types is
not always deterministic.
2023-02-20 16:18:31 -08:00
DaniPopes 6336e96995
refactor(abigen): derives, struct expansion (#2160)
* refactor: abigen derives

* refactor: struct expansion

* refactor: structs 2

* chore: abigen derives and visibility

* refactor: abigen docs

* refactor: structs 3

* chore: doc

* chore: structs conditional default

* refactor: method expansion

* refactor: final doc

* refactor: expansions, add docs, extra From impl

* refactor: final struct expansion

* feat(types): implement bytes::Bytes static methods

* feat: use static Bytes for bytecode

* merge artifact

* refactor: event input expansion

* refactor: common expand params

* refactor: method params expansion

* refactor: struct fields expansion

* refactor: types array expansion

* mergings

* cleanup

* flatten

* selector fmt

* chore: clippy

* refactor: common, imports
2023-02-19 16:53:29 -08:00
frankie 9733b16afc
Include deployed bytecode in abigen output (#2163)
* test

* sanity check
2023-02-18 12:53:39 -08:00
DaniPopes f9ced12fee
refactor(abigen): solidity types expansion (#2131)
* refactor: event input expansion

* refactor: common expand params

* refactor: method params expansion

* refactor: struct fields expansion

* refactor: types array expansion

* clippy
2023-02-13 17:15:28 -08:00
James Prestwich 0c16eb971d
Prestwich/event no lifetime (#2105)
* refactor(breaking): remove lifetime from Event

* fix: example updated to use new event
2023-02-13 17:14:38 -08:00
Paul Lange bfe3ba9d5f
contracts: allow upper case acronyms lint (#2128) 2023-02-10 11:52:55 -08:00
Jacob Turner b08c1e29b8
[fix]: Use pascal casing for type names in structs generated by abigen (#2130)
* [fix]: Use pascal casing for type names in structs generated by abigen

* [fix]: Revert the downversioning changes
2023-02-10 11:50:09 -08:00
georgewhewell c0fd8326f0
chore(clippy): fix bare urls in abigen (#2133) 2023-02-10 11:49:27 -08:00
DaniPopes fd02bbc418
refactor(abigen): inline docs (#2090)
* refactor: abigen docs

* chore: doc

* refactor: final doc

* mergings

* fix: unremove Default
2023-01-30 21:28:57 -08:00
DaniPopes 93e1850646
refactor/feat(abigen,types): add bytes::Bytes static methods, refactor struct declaration (#2089)
* refactor: final struct expansion

* feat(types): implement bytes::Bytes static methods

* feat: use static Bytes for bytecode

* chore: add rustfmt skip directive

* clippy
2023-01-30 12:12:35 -08:00
Matthias Seitz d3ad5478ae
feat(abi): add helper functions to access solidity types (#2081) 2023-01-27 13:12:32 -05:00
Matthias Seitz 8ecd566930
fix: add missing pub for tuple structs (#2080) 2023-01-27 13:07:27 -05:00
Georgios Konstantopoulos f2099a8eaa
chore: fix clippy (#2059) 2023-01-16 18:11:27 -08:00
Georgios Konstantopoulos 10b18e0d58 chore: do not expose util module 2023-01-13 11:10:31 -08:00
Georgios Konstantopoulos 219004efcb fix(abigen): add back mod util 2023-01-13 11:09:13 -08:00
DaniPopes c2d7b8321f
refactor(abigen): source (#2016)
* rm parse_address

* refactor: sources

* add comments, support <chain>:<address>

* fix doc

* chore: clippy

* fmt

* fix

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2023-01-13 10:59:44 -08:00
DaniPopes d1e934791d
refactor(abigen): Abigen, ContractBindings (#2019)
* use format_ident

* lib.rs

* refactor: ContractBindings

* refactor: from_file

* add write_fmt

* mv

* error msg

* revert mod docs
2023-01-13 10:23:59 -08:00
Nick 9e559aefeb
fix(abigen): ensure correct ABI in `From` impl (#2036)
* fix(abigen): ensure correct ABI in `From` impl

`new` creates a `Contract` with the correct ABI, but the `From` impl
simply wraps the source `Contract`, which could have a completely
different ABI. In effect this was an unsafe cast, and indeed was
observed to trigger a "method not found (this should never happen)"
panic for subsequent method lookups. Implementing `From` in terms of
`new` fixes this, at the cost of an extra `Arc::clone()` (which I can't
see how to eliminate without piercing the `ethers::contract::Contract`
public API).

* Remove unnecessary `async` from test

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
2023-01-13 10:18:17 -08:00
DaniPopes 79f27e2366
docs(abigen): rename `event_derives` to `derives` (#2018)
* chore: rename event_derives to derives

Misleading name, `event_derives` implies that only Solidity events'
structs would apply, while this is not true

* last derive

* mv

* docs

* docs

* last doc
2023-01-13 10:17:32 -08:00
DaniPopes 0187bedd11
feat(abigen): use prettyplease (#2027) 2023-01-09 07:17:22 +02:00
DaniPopes 96f4723c13
fix(abigen): tests (#2015)
* fix: methods tests

* fix: remaining paths in tests
2023-01-06 11:30:34 +02:00
Matthias Seitz 6ac3e75c6a
fix: use full path of i256 (#2000) 2023-01-03 15:12:47 +02:00
DaniPopes d272318483
chore: update all rust editions to 2021 (#1979) 2022-12-30 14:48:29 +02:00
DaniPopes d8d4eac3ad
fix(contract): add setter for MultiBindings' rustfmt (#1948) 2022-12-22 21:05:00 +02:00
Genysys 91cd6ccce8
feat: adds bscscan as abi source (#1955) 2022-12-19 17:54:24 +02:00
joshieDo 92e726921a
chore: add celo chain (#1932)
* add celo chain

* add missing chain case

* clippy & fmt
2022-12-07 21:37:11 -08:00
Matthias Seitz 3dfc04f9fe
chore(clippy): make clippy happy (#1923) 2022-12-05 22:05:33 -08:00
Matthias Seitz 556821f077
chore: generate selector as hex in docs (#1924) 2022-12-05 22:05:24 -08:00
Dan Cline 80d887b67e
docs: update MRSV to 1.64 (#1926)
* IntoFuture was implemented in #1826, which means the MSRV should now
   be 1.64
2022-12-05 22:04:48 -08:00
Matthias Seitz 0ce6b107d6
fix: make version detection infallible (#1916) 2022-12-01 06:14:51 -08:00
Matthias Seitz 17addcfd91
fix(abigen): rm wrong brackets (#1914) 2022-11-30 13:14:40 -08:00
Georgios Konstantopoulos 758a0e5b6e (cargo-release) version 1.0.2 2022-11-27 12:27:56 -08:00
Matthias Seitz c542844424
fix: handle non existing Cargo.toml edge case (#1886) 2022-11-23 07:35:55 -08:00
Will Smith 9d75e5f178
Fix: use cwd manifest (#1869)
* fix(abigen): make compatible with older rust versions

* Update ethers-contract/ethers-contract-abigen/src/multi.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* fix: linting

* fix(abigen): use active cargo.toml over crate cargo.toml

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2022-11-17 11:23:10 -08:00
Will Smith a525659f5d
fix(abigen): make compatible with older rust versions (#1868)
* fix(abigen): make compatible with older rust versions

* Update ethers-contract/ethers-contract-abigen/src/multi.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* fix: linting

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2022-11-17 10:43:41 -08:00
Georgios Konstantopoulos 74bf6fbb04 chore: fmt / clippy 2022-11-15 13:36:25 -08:00
Will Smith d47e34dc5b
fix: generated crate not using generated version (#1852)
* fix: generated crate not using generated version

* add docs

* wip: add base testcases

* fix: str formatting

* fix: add missing comma

* fix: tests and file loading

* fix: strip whitespaces

* fix: case where we are using specified crate

* linting: remove extra ref

* refactor: use toml parser over regex

* fix: add case for path and ethers-contract

* fix: add missing comma

* feat: don't check for path

* remove build-dep fallback
2022-11-15 13:00:12 -08:00
Matthias Seitz 3b52c2fc7e
fix: improve overloaded param diff matching (#1853) 2022-11-11 14:25:31 -08:00
DaniPopes fb88215a87
fix: rustdoc errors (#1808)
* fix: rustdoc warnings

* fix: partially re-run abigen for multicall_contract

* fix

* fix test

* fix: rustdoc nightly warnings
2022-11-07 15:43:23 -08:00