erc20-transfer-authorization

Simple approval escrow for ERC20 spending
Log | Files | Refs

commit 83617fd6bafde10161f2e8cfa8159c6b688fdebb
parent 7c56eb5281c1bae5ce048920afb76b34d590ccef
Author: lash <dev@holbrook.no>
Date:   Tue, 21 Mar 2023 17:09:39 +0000

Add contract metadata

Diffstat:
Mpython/CHANGELOG | 2++
Apython/erc20_transfer_authorization/data/ERC20TransferAuthorization.metadata.json | 1+
Mpython/run_tests.sh | 2++
Mpython/setup.cfg | 4++--
Msolidity/Makefile | 6++++--
5 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/python/CHANGELOG b/python/CHANGELOG @@ -1,3 +1,5 @@ +- 0.4.3 + * Add contract metadata - 0.4.2 * Remove solidity compile warnings - 0.4.1 diff --git a/python/erc20_transfer_authorization/data/ERC20TransferAuthorization.metadata.json b/python/erc20_transfer_authorization/data/ERC20TransferAuthorization.metadata.json @@ -0,0 +1 @@ +[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"_serial","type":"uint32"},{"indexed":true,"internalType":"uint32","name":"_yays","type":"uint32"},{"indexed":true,"internalType":"uint32","name":"_nays","type":"uint32"}],"name":"Approved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"_serial","type":"uint32"}],"name":"Executed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"address","name":"_recipient","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"_serial","type":"uint32"}],"name":"NewRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"_quorum","type":"uint32"},{"indexed":true,"internalType":"uint32","name":"_vetoThreshold","type":"uint32"},{"indexed":true,"internalType":"uint32","name":"_signerCount","type":"uint32"}],"name":"QuorumSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"_serial","type":"uint32"},{"indexed":true,"internalType":"uint32","name":"_yays","type":"uint32"},{"indexed":true,"internalType":"uint32","name":"_nays","type":"uint32"}],"name":"Rejected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"_serial","type":"uint32"}],"name":"TransferFail","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"_serial","type":"uint32"},{"indexed":true,"internalType":"uint32","name":"_yays","type":"uint32"},{"indexed":true,"internalType":"uint32","name":"_nays","type":"uint32"}],"name":"Vetoed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_signer","type":"address"}],"name":"WriterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_signer","type":"address"}],"name":"WriterRemoved","type":"event"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"addWriter","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_serial","type":"uint32"}],"name":"checkResult","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"count","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"createRequest","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_serial","type":"uint32"}],"name":"executeRequest","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_idx","type":"uint32"}],"name":"getSerialAt","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"isWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastSerial","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_serial","type":"uint32"}],"name":"nay","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nextSerial","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quorum","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"removeWriter","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"}],"name":"requests","outputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint32","name":"serial","type":"uint32"},{"internalType":"uint32","name":"yay","type":"uint32"},{"internalType":"uint32","name":"nay","type":"uint32"},{"internalType":"uint8","name":"result","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_quorum","type":"uint32"},{"internalType":"uint32","name":"_vetoThreshold","type":"uint32"}],"name":"setThresholds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerCount","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"signers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vetoThreshold","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"address","name":"","type":"address"}],"name":"vote","outputs":[{"internalType":"int8","name":"","type":"int8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"writers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_serial","type":"uint32"}],"name":"yay","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"nonpayable","type":"function"}] diff --git a/python/run_tests.sh b/python/run_tests.sh @@ -1,5 +1,7 @@ #!/bin/bash +export PYTHONPATH=.:$PYTHONPATH + set -e set -x for f in `ls tests/*.py`; do diff --git a/python/setup.cfg b/python/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = erc20-transfer-authorization -version = 0.4.3 +version = 0.4.4 description = Simple approval escrow for ERC20 spend approval author = Louis Holbrook author_email = dev@holbrook.no @@ -22,7 +22,7 @@ licence_files = [options] include_package_data = True -python_requires = >= 3.6 +python_requires = >= 3.7 packages = erc20_transfer_authorization erc20_transfer_authorization.runnable diff --git a/solidity/Makefile b/solidity/Makefile @@ -2,8 +2,10 @@ SOLC = /usr/bin/solc all: $(SOLC) --bin ERC20TransferAuthorization.sol --evm-version byzantium | awk 'NR>3' > ERC20TransferAuthorization.bin - truncate -s -1 ERC20TransferAuthorization.bin $(SOLC) --abi ERC20TransferAuthorization.sol --evm-version byzantium | awk 'NR>3' > ERC20TransferAuthorization.json + $(SOLC) --abi ERC20TransferAuthorization.sol --evm-version byzantium | awk 'NR>3' > ERC20TransferAuthorization.metadata.json + truncate -s -1 ERC20TransferAuthorization.bin install: all - cp -v *{json,bin} ../python/erc20_transfer_authorization/data/ + cp -v *.json ../python/erc20_transfer_authorization/data/ + cp -v *.bin ../python/erc20_transfer_authorization/data/