erc20-limiter

ERC20 balance limit registry
Log | Files | Refs | README

commit 902d4d790ed35f61e7a1ab2ac596e9961e0dddb7
Author: lash <dev@holbrook.no>
Date:   Thu, 27 Jul 2023 17:44:09 +0100

Initial commit

Diffstat:
Asolidity/Limiter.sol | 14++++++++++++++
Asolidity/Makefile | 12++++++++++++
2 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/solidity/Limiter.sol b/solidity/Limiter.sol @@ -0,0 +1,14 @@ +pragma solidity ^0.8.0; + +// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746 +// SPDX-License-Identifier: AGPL-3.0-or-later +// File-Version: 1 +// Description: Registry of allowed ERC20 balance limits per-token and per-holder. + +contract Limiter { + mapping ( address => mapping ( address => uint256 ) ) public limitOf; + + function setLimit(address _token, uint256 _value) public { + limitOf[_token][msg.sender] = _value; + } +} diff --git a/solidity/Makefile b/solidity/Makefile @@ -0,0 +1,12 @@ +SOLC = /usr/bin/solc + +all: + $(SOLC) --bin Limiter.sol --evm-version byzantium | awk 'NR>3' > Limiter.bin + $(SOLC) --abi Limiter.sol --evm-version byzantium | awk 'NR>3' > Limiter.json + $(SOLC) --metadata Limiter.sol --evm-version byzantium | awk 'NR>3' > Limiter.metadata.json + truncate -s -1 Limiter.bin + +install: all + cp -v *.json ../python/erc20_limiter/data/ + cp -v *.bin ../python/erc20_limiter/data/ +