Repository navigation
Expand file tree
/
Copy pathmix.exs
More file actions
176 lines (163 loc) · 5.35 KB
/
Copy pathmix.exs
File metadata and controls
176 lines (163 loc) · 5.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
defmodule Ethers.MixProject do
use Mix.Project
@version "1.0.0"
@source_url "https://github.com/ExWeb3/elixir_ethers"
def project do
[
app: :ethers,
version: @version,
elixir: "~> 1.18",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
name: "Ethers",
source_url: @source_url,
deps: deps(),
test_coverage: [tool: ExCoveralls],
description:
"A comprehensive Web3 library for interacting with smart contracts on Ethereum using Elixir.",
package: package(),
docs: docs(),
aliases: aliases(),
dialyzer: dialyzer()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger, :ethereumex]
]
end
def cli do
[
preferred_envs: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test,
test_prepare: :test
]
]
end
defp package do
[
licenses: ["Apache-2.0"],
links: %{
"GitHub" => @source_url,
"Changelog" => Path.join(@source_url, "/blob/main/CHANGELOG.md")
},
maintainers: ["Alisina Bahadori"],
files: ~w(lib priv guides mix.exs README* LICENSE* CHANGELOG* usage-rules.md)
]
end
defp docs do
source_ref =
if String.ends_with?(@version, "-dev") do
"main"
else
"v#{@version}"
end
[
main: "getting-started",
extras: [
"guides/getting-started.md": [title: "Getting Started"],
"guides/tour.livemd": [title: "Interactive Tour"],
"guides/cheatsheet.cheatmd": [title: "Cheatsheet"],
"guides/contracts.md": [title: "Contracts"],
"guides/transactions.md": [title: "Transactions"],
"guides/events.md": [title: "Events"],
"guides/signing.md": [title: "Signing and Verification"],
"guides/eip-712.md": [title: "EIP-712 Typed Data"],
"guides/siwe.md": [title: "Sign-In with Ethereum"],
"guides/typed-arguments.md": [title: "Typed Arguments"],
"guides/configuration.md": [title: "Configuration"],
"guides/upgrading.md": [title: "Upgrading"],
"CHANGELOG.md": [title: "Changelog"]
],
groups_for_extras: [
Introduction: ~w(guides/getting-started.md guides/tour.livemd guides/cheatsheet.cheatmd),
Guides: ~w(guides/contracts.md guides/transactions.md guides/events.md guides/signing.md
guides/eip-712.md guides/siwe.md guides/typed-arguments.md guides/configuration.md),
About: ~w(guides/upgrading.md CHANGELOG.md)
],
source_url: @source_url,
source_ref: source_ref,
nest_modules_by_prefix: [
Ethers.Contracts
],
groups_for_modules: [
Transactions: [
"Ethers.Transaction",
~r/^Ethers\.Transaction\..*$/
],
"Builtin Contracts": [
~r/^Ethers\.Contracts\.(?:(?!EventFilters$|Errors\.).)*$/
],
"Builtin EventFilters": [
~r/^Ethers\.Contracts\.[A-Za-z0-9.]+\.EventFilters$/
],
Signer: [
~r/^Ethers\.Signer\.[A-Za-z0-9.]+$/,
~r/^Ethers\.Signer$/
],
"RPC Client": [
"Ethers.RpcClient.Adapter"
],
"Sign-In with Ethereum": [
"Ethers.Siwe",
"Ethers.Siwe.Message"
],
"Typed Data": [
"Ethers.TypedData",
"Ethers.TypedData.Schema",
"Ethers.TypedData.Domain",
"Ethers.TypedData.Field"
],
"Builtin Contract Errors": [
~r/^Ethers\.Contracts\..*$/
]
],
# The changelog and the upgrade guide name functions which no longer exist
skip_undefined_reference_warnings_on: ["CHANGELOG.md", "guides/upgrading.md"],
# Ethereumex does not document its client module
skip_code_autolink_to: ["Ethereumex.HttpClient"],
logo: "assets/exdoc_logo.png",
before_closing_head_tag: &before_closing_head_tag/1,
markdown_processor: {ExDoc.Markdown.Earmark, footnotes: true}
]
end
# Points agents at the generated llms.txt index (see https://llmstxt.org).
defp before_closing_head_tag(:html),
do: ~s(<link rel="describedby" type="text/plain" href="llms.txt">)
defp before_closing_head_tag(_), do: ""
def dialyzer do
[flags: [:error_handling, :extra_return, :underspecs, :unknown, :unmatched_returns]]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.3", only: [:dev, :test], runtime: false},
{:ethereumex, "~> 0.10 and >= 0.10.7"},
{:ex_abi, "~> 0.8.0"},
{:ex_doc, "~> 0.32", only: :dev, runtime: false},
{:ex_keccak, "~> 0.7.5"},
{:ex_rlp, "~> 0.6.0"},
{:ex_secp256k1, "~> 0.7", optional: true},
{:excoveralls, "~> 0.10", only: :test},
{:idna, "~> 7.1 or ~> 8.0"},
{:jason, "~> 1.4"},
{:makeup_syntect, "~> 0.1", only: :dev, runtime: false},
{:plug, ">= 1.0.0", only: :test},
{:req, "~> 0.5"}
]
end
def aliases do
[
test_prepare: ["run test/test_prepare.exs"],
test: ["test_prepare", "test"]
]
end
end