Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Infer DAI token from Ethereum chain ID #3071

Merged
merged 2 commits into from
Aug 21, 2020
Merged

Infer DAI token from Ethereum chain ID #3071

merged 2 commits into from
Aug 21, 2020

Conversation

thomaseizinger
Copy link
Contributor

@thomaseizinger thomaseizinger commented Aug 20, 2020

We are going to use this to avoid including the token contract address in the orders that we are sending around.

This introduces the ethereum::Address type into our config::File
struct. Unfortunately, this opens a can of worms with a bug in
the serde-hex library. See 0 for more details.

We work around this by removing the dependency on serde-hex from our
Ethereum deserialization code and instead hand-roll everything for
our usecase.

This also has the advantage that we can now again just use our structs
directly in the route handlers of warp instead of serde_json::Value.
See 1 for more on this.

cnd/src/config.rs Show resolved Hide resolved
comit/src/ethereum.rs Show resolved Hide resolved
@thomaseizinger thomaseizinger added the no-mergify Stop mergify to merge this automatically label Aug 21, 2020
@thomaseizinger
Copy link
Contributor Author

thomaseizinger commented Aug 21, 2020

@D4nte and @tcharding I pushed three follow-up commits that were necessary to fix the e2e tests and also to include the ropsten address :)

This introduces the ethereum::Address type into our config::File
struct. Unfortunately, this opens a can of worms with a bug in
the serde-hex library. See [0] for more details.

We work around this by removing the dependency on serde-hex from our
Ethereum deserialization code and instead hand-roll everything for
our usecase.

This also has the advantage that we can now again just use our structs
directly in the route handlers of warp instead of serde_json::Value.
See [1] for more on this.

[0]: fspmarshall/serde-hex#8
[1]: #2405
With the addition of the [tokens] section, cnd fails to start up
in `--dev` mode if the config file provided doesn't define a contract
address.
@thomaseizinger thomaseizinger removed the no-mergify Stop mergify to merge this automatically label Aug 21, 2020
@mergify
Copy link
Contributor

mergify bot commented Aug 21, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 21, 2020

@bors bors bot merged commit 01a1733 into dev Aug 21, 2020
@mergify mergify bot deleted the infer-dai-address branch August 21, 2020 02:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants