-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
74 lines (57 loc) · 2.67 KB
/
Makefile
File metadata and controls
74 lines (57 loc) · 2.67 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
VERSION := $(shell cat AUTONITY_VERSION)
AUTONITY := build/autonity
ABIDIR := $(AUTONITY)/params/generated
SRCDIR := $(AUTONITY)/autonity/solidity/contracts
OUTDIR := autonity/contracts
abigen = hatch run generate:pyabigen \
--src $(word 1,$(1)) \
--devdoc $(word 2,$(1)) \
--userdoc $(word 3,$(1)) \
$(word 4,$(1))
gentargets = $(shell find $(SRCDIR) -name $(1).sol) \
$(addprefix $(ABIDIR)/$(1),.docdev .docuser .abi) \
pyproject.toml
all: $(OUTDIR)/accountability.py \
$(OUTDIR)/acu.py \
$(OUTDIR)/autonity.py \
$(OUTDIR)/auctioneer.py \
$(OUTDIR)/inflation_controller.py \
$(OUTDIR)/liquid_logic.py \
$(OUTDIR)/omission_accountability.py \
$(OUTDIR)/oracle.py \
$(OUTDIR)/stabilization.py \
$(OUTDIR)/supply_control.py \
$(OUTDIR)/upgrade_manager.py
$(OUTDIR)/accountability.py: $(call gentargets,Accountability)
$(call abigen,$^) --exclude distributeRewards,finalize,handleAccusation,handleEvent,handleInnocenceProof,handleMisbehaviour,setCommittee,setEpochPeriod >$@
$(OUTDIR)/acu.py: $(call gentargets,ACU)
$(call abigen,$^) --exclude setOperator,setOracle,update >$@
$(OUTDIR)/auctioneer.py: $(call gentargets,Auctioneer)
$(call abigen,$^) --exclude paidInterest,setOperator,setOracle,setStabilization >$@
$(OUTDIR)/autonity.py: $(call gentargets,Autonity)
$(call abigen,$^) --version $(VERSION) \
--exclude autobond,computeCommittee,finalize,finalizeInitialization,jail,jailbound,slash,slashAndJail >$@
$(OUTDIR)/inflation_controller.py: $(call gentargets,InflationController)
$(call abigen,$^) >$@
$(OUTDIR)/liquid_logic.py: $(call gentargets,LiquidLogic)
$(call abigen,$^) --exclude burn,lock,lockFrom,mint,redistribute,setCommissionRate,unlock >$@
$(OUTDIR)/omission_accountability.py: $(call gentargets,OmissionAccountability)
$(call abigen,$^) --exclude distributeProposerRewards,finalize,setCommittee,setEpochBlock,setOperator >$@
$(OUTDIR)/oracle.py: $(call gentargets,Oracle)
$(call abigen,$^) --exclude distributeRewards,finalize,setOperator,setVoters,updateVotersAndSymbol,vote >$@
$(OUTDIR)/stabilization.py: $(call gentargets,Stabilization)
$(call abigen,$^) --exclude liquidate,setACU,setAuctioneer,setOperator,setOracle,setSupplyControl >$@
$(OUTDIR)/supply_control.py: $(call gentargets,SupplyControl)
$(call abigen,$^) --exclude burn,mint,setOperator,setStabilizer >$@
$(OUTDIR)/upgrade_manager.py: $(call gentargets,UpgradeManager)
$(call abigen,$^) --exclude setOperator >$@
$(ABIDIR)/%.abi $(ABIDIR)/%.docdev $(ABIDIR)/%.docuser: $(AUTONITY) AUTONITY_VERSION
cd $< && \
git fetch origin && \
git checkout $(VERSION) && \
make contracts
$(AUTONITY):
git clone git@github.com:autonity/autonity.git $@
clean:
rm -rf $(AUTONITY)
.PHONY = clean