From ed29d41207c6108b77395916a6ef2d18343c774a Mon Sep 17 00:00:00 2001 From: Benjamin Smith Date: Mon, 27 Mar 2023 15:45:58 +0200 Subject: [PATCH] construct constant erc20 contract instance (#218) --- src/models/transfer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/models/transfer.py b/src/models/transfer.py index e035eaa1..6c9608e9 100644 --- a/src/models/transfer.py +++ b/src/models/transfer.py @@ -17,6 +17,8 @@ from src.models.vouch import Vouch from src.utils.print_store import Category, PrintStore +ERC20_CONTRACT = erc20() + @dataclass class CSVTransfer: @@ -197,7 +199,7 @@ def as_multisend_tx(self) -> MultiSendTx: operation=MultiSendOperation.CALL, to=str(self.token.address), value=0, - data=erc20().encodeABI( + data=ERC20_CONTRACT.encodeABI( fn_name="transfer", args=[receiver, self.amount_wei] ), )