Skip to content

Commit

Permalink
Generated bindings for MaintainerProxy
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaszslabon committed Jun 13, 2023
1 parent aad25d6 commit 95355e9
Show file tree
Hide file tree
Showing 16 changed files with 14,008 additions and 444 deletions.
1 change: 1 addition & 0 deletions pkg/chain/ethereum/common/gen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ endif
contract/%.go cmd/%.go: abi/%.abi abi/%.go _address/% ${artifacts_dir}/%.json
$(info $* - generating Keep bindings)
@go run github.com/keep-network/keep-common/tools/generators/ethereum $< contract/$*.go cmd/$*.go
$(call after_contract_hook,$*)

# Don't remove intermediate files that got generated.
.PRECIOUS: abi/%.abi abi/%.go _address/%
68 changes: 67 additions & 1 deletion pkg/chain/ethereum/ecdsa/gen/abi/WalletRegistry.go

Large diffs are not rendered by default.

110 changes: 110 additions & 0 deletions pkg/chain/ethereum/ecdsa/gen/cmd/WalletRegistry.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

185 changes: 185 additions & 0 deletions pkg/chain/ethereum/ecdsa/gen/contract/WalletRegistry.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion pkg/chain/ethereum/tbtc/gen/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
npm_package_name=@keep-network/tbtc-v2

# Contracts for which the bindings should be generated.
required_contracts := Bridge LightRelay LightRelayMaintainerProxy WalletCoordinator
required_contracts := Bridge MaintainerProxy LightRelay LightRelayMaintainerProxy WalletCoordinator

# There is a bug in the currently used abigen version (v1.10.19) that makes it
# re-declaring structs used by multiple contracts
Expand All @@ -20,9 +20,28 @@ required_contracts := Bridge LightRelay LightRelayMaintainerProxy WalletCoordina
define after_abi_hook
$(eval type := $(1))
$(if $(filter $(type),WalletCoordinator),$(call fix_wallet_coordinator_collision))
$(if $(filter $(type),MaintainerProxy),$(call fix_maintainer_proxy_collision))
endef
define fix_wallet_coordinator_collision
@perl -pi -e s,BitcoinTxInfo,BitcoinTxInfo2,g ./abi/WalletCoordinator.go
endef
define fix_maintainer_proxy_collision
@perl -pi -e s,BitcoinTxUTXO,BitcoinTxUTXO2,g ./abi/MaintainerProxy.go
@perl -pi -e s,BitcoinTxProof,BitcoinTxProof2,g ./abi/MaintainerProxy.go
@perl -pi -e s,BitcoinTxInfo,BitcoinTxInfo3,g ./abi/MaintainerProxy.go
endef

define after_contract_hook
$(eval type := $(1))
$(if $(filter $(type),MaintainerProxy),$(call fix_maintainer_proxy_contract_collision))
endef
define fix_maintainer_proxy_contract_collision
@perl -pi -e s,BitcoinTxUTXO,BitcoinTxUTXO2,g ./contract/MaintainerProxy.go
@perl -pi -e s,BitcoinTxProof,BitcoinTxProof2,g ./contract/MaintainerProxy.go
@perl -pi -e s,BitcoinTxInfo,BitcoinTxInfo3,g ./contract/MaintainerProxy.go
@perl -pi -e s,BitcoinTxUTXO,BitcoinTxUTXO2,g ./cmd/MaintainerProxy.go
@perl -pi -e s,BitcoinTxProof,BitcoinTxProof2,g ./cmd/MaintainerProxy.go
@perl -pi -e s,BitcoinTxInfo,BitcoinTxInfo3,g ./cmd/MaintainerProxy.go
endef

include ../../common/gen/Makefile
Empty file.
317 changes: 316 additions & 1 deletion pkg/chain/ethereum/tbtc/gen/abi/Bridge.go

Large diffs are not rendered by default.

Loading

0 comments on commit 95355e9

Please sign in to comment.