eth-accounts-index

Accounts index evm contract tooling with permissioned writes
Log | Files | Refs

commit 35917d6dc1f8f446ee3cc8f0b4453d4ebcec10e5
parent e8c29d10a11bcfd210f6cb8016e0bb41c270b3bd
Author: nolash <dev@holbrook.no>
Date:   Mon, 28 Jun 2021 09:28:07 +0200

Revert "Move to chainlib-eth"

This reverts commit 85530a85f51a8a40e57083b6d3604ccb7b39139b.

Diffstat:
Mpython/CHANGELOG | 40+++++++++++++++++++---------------------
Mpython/eth_accounts_index/interface.py | 21++++++++-------------
Mpython/requirements.txt | 2+-
Dpython/run_tests.sh | 12------------
Mpython/setup.cfg | 2+-
5 files changed, 29 insertions(+), 48 deletions(-)

diff --git a/python/CHANGELOG b/python/CHANGELOG @@ -1,27 +1,25 @@ -- 0.0.12-pending - * Move to chainlib-eth -- 0.0.11-unreleased - * Add list cli command -- 0.0.10-unreleased - * Implement external signer - * Standardize cli arg flags - * Rename entry point executable names in setup -- 0.0.9-unreleased - * Fix wrong abi path in registry.py -- 0.0.8-unreleased - * Add executable to add writers and addresses after deploy -- 0.0.7-unreleased - * Rename contracts-dir flag to abi-dir - * Use package data dir as default abi dir -- 0.0.6-unreleased +- 0.0.11 + - Add list cli command +- 0.0.10 + - Implement external signer + - Standardize cli arg flags + - Rename entry point executable names in setup +- 0.0.9 + - Fix wrong abi path in registry.py +- 0.0.8 + - Add executable to add writers and addresses after deploy +- 0.0.7 + - Rename contracts-dir flag to abi-dir + - Use package data dir as default abi dir +- 0.0.6 * Add owner flag to deploy script -- 0.0.5-unreleased +- 0.0.5 * Rename solidity file, add return values from evm functions -- 0.0.4-unreleased +- 0.0.4 * Update dependency versions -- 0.0.3-unreleased +- 0.0.3 * Move deploy script to within setup -- 0.0.2-unreleased +- 0.0.2 * (unrecorded changes) -- 0.0.1-unreleased +- 0.0.1 * Simple solidity method wrapper diff --git a/python/eth_accounts_index/interface.py b/python/eth_accounts_index/interface.py @@ -15,7 +15,9 @@ from chainlib.eth.contract import ( abi_decode_single, ) from chainlib.eth.constant import ZERO_ADDRESS -from chainlib.jsonrpc import JSONRPCRequest +from chainlib.jsonrpc import ( + jsonrpc_template, + ) from chainlib.eth.error import RequestMismatchException from hexathon import ( add_0x, @@ -43,9 +45,8 @@ class AccountsIndex(TxFactory): return self.__single_address_method('add', contract_address, sender_address, address, tx_format) - def have(self, contract_address, address, sender_address=ZERO_ADDRESS, id_generator=None): - j = JSONRPCRequest(id_generator) - o = j.template() + def have(self, contract_address, address, sender_address=ZERO_ADDRESS): + o = jsonrpc_template() o['method'] = 'eth_call' enc = ABIContractEncoder() enc.method('have') @@ -55,13 +56,11 @@ class AccountsIndex(TxFactory): tx = self.template(sender_address, contract_address) tx = self.set_code(tx, data) o['params'].append(self.normalize(tx)) - o = j.finalize(o) return o - def entry_count(self, contract_address, sender_address=ZERO_ADDRESS, id_generator=None): - j = JSONRPCRequest(id_generator) - o = j.template() + def entry_count(self, contract_address, sender_address=ZERO_ADDRESS): + o = jsonrpc_template() o['method'] = 'eth_call' enc = ABIContractEncoder() enc.method('entryCount') @@ -69,7 +68,6 @@ class AccountsIndex(TxFactory): tx = self.template(sender_address, contract_address) tx = self.set_code(tx, data) o['params'].append(self.normalize(tx)) - o = j.finalize(o) return o @@ -77,9 +75,7 @@ class AccountsIndex(TxFactory): return self.entry_count(contract_address, sender_address=sender_address) - def entry(self, contract_address, idx, sender_address=ZERO_ADDRESS, id_generator=None): - j = JSONRPCRequest(id_generator) - o = j.template() + def entry(self, contract_address, idx, sender_address=ZERO_ADDRESS): o = jsonrpc_template() o['method'] = 'eth_call' enc = ABIContractEncoder() @@ -90,7 +86,6 @@ class AccountsIndex(TxFactory): tx = self.template(sender_address, contract_address) tx = self.set_code(tx, data) o['params'].append(self.normalize(tx)) - o = j.finalize(o) return o diff --git a/python/requirements.txt b/python/requirements.txt @@ -1,3 +1,3 @@ confini~=0.3.6rc3 -chainlib-eth~=0.0.5a1 +chainlib~=0.0.3a1 crypto-dev-signer~=0.4.14b3 diff --git a/python/run_tests.sh b/python/run_tests.sh @@ -1,12 +0,0 @@ -#!/bin/bash - -set -e -set -x -for f in `ls tests/*.py`; do - python $f - if [ $? -gt 0 ]; then - exit 1 - fi -done -set +x -set +e diff --git a/python/setup.cfg b/python/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = eth-accounts-index -version = 0.0.12a1 +version = 0.0.11a14 description = Accounts index evm contract tooling with permissioned writes author = Louis Holbrook author_email = dev@holbrook.no