Revert "Move to chainlib-eth"

This reverts commit 85530a85f5.
This commit is contained in:
nolash 2021-06-28 09:28:07 +02:00
parent e8c29d10a1
commit 35917d6dc1
5 changed files with 29 additions and 48 deletions

View File

@ -1,27 +1,25 @@
- 0.0.12-pending - 0.0.11
* Move to chainlib-eth - Add list cli command
- 0.0.11-unreleased - 0.0.10
* Add list cli command - Implement external signer
- 0.0.10-unreleased - Standardize cli arg flags
* Implement external signer - Rename entry point executable names in setup
* Standardize cli arg flags - 0.0.9
* Rename entry point executable names in setup - Fix wrong abi path in registry.py
- 0.0.9-unreleased - 0.0.8
* Fix wrong abi path in registry.py - Add executable to add writers and addresses after deploy
- 0.0.8-unreleased - 0.0.7
* Add executable to add writers and addresses after deploy - Rename contracts-dir flag to abi-dir
- 0.0.7-unreleased - Use package data dir as default abi dir
* Rename contracts-dir flag to abi-dir - 0.0.6
* Use package data dir as default abi dir
- 0.0.6-unreleased
* Add owner flag to deploy script * Add owner flag to deploy script
- 0.0.5-unreleased - 0.0.5
* Rename solidity file, add return values from evm functions * Rename solidity file, add return values from evm functions
- 0.0.4-unreleased - 0.0.4
* Update dependency versions * Update dependency versions
- 0.0.3-unreleased - 0.0.3
* Move deploy script to within setup * Move deploy script to within setup
- 0.0.2-unreleased - 0.0.2
* (unrecorded changes) * (unrecorded changes)
- 0.0.1-unreleased - 0.0.1
* Simple solidity method wrapper * Simple solidity method wrapper

View File

@ -15,7 +15,9 @@ from chainlib.eth.contract import (
abi_decode_single, abi_decode_single,
) )
from chainlib.eth.constant import ZERO_ADDRESS 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 chainlib.eth.error import RequestMismatchException
from hexathon import ( from hexathon import (
add_0x, add_0x,
@ -43,9 +45,8 @@ class AccountsIndex(TxFactory):
return self.__single_address_method('add', contract_address, sender_address, address, tx_format) 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): def have(self, contract_address, address, sender_address=ZERO_ADDRESS):
j = JSONRPCRequest(id_generator) o = jsonrpc_template()
o = j.template()
o['method'] = 'eth_call' o['method'] = 'eth_call'
enc = ABIContractEncoder() enc = ABIContractEncoder()
enc.method('have') enc.method('have')
@ -55,13 +56,11 @@ class AccountsIndex(TxFactory):
tx = self.template(sender_address, contract_address) tx = self.template(sender_address, contract_address)
tx = self.set_code(tx, data) tx = self.set_code(tx, data)
o['params'].append(self.normalize(tx)) o['params'].append(self.normalize(tx))
o = j.finalize(o)
return o return o
def entry_count(self, contract_address, sender_address=ZERO_ADDRESS, id_generator=None): def entry_count(self, contract_address, sender_address=ZERO_ADDRESS):
j = JSONRPCRequest(id_generator) o = jsonrpc_template()
o = j.template()
o['method'] = 'eth_call' o['method'] = 'eth_call'
enc = ABIContractEncoder() enc = ABIContractEncoder()
enc.method('entryCount') enc.method('entryCount')
@ -69,7 +68,6 @@ class AccountsIndex(TxFactory):
tx = self.template(sender_address, contract_address) tx = self.template(sender_address, contract_address)
tx = self.set_code(tx, data) tx = self.set_code(tx, data)
o['params'].append(self.normalize(tx)) o['params'].append(self.normalize(tx))
o = j.finalize(o)
return o return o
@ -77,9 +75,7 @@ class AccountsIndex(TxFactory):
return self.entry_count(contract_address, sender_address=sender_address) return self.entry_count(contract_address, sender_address=sender_address)
def entry(self, contract_address, idx, sender_address=ZERO_ADDRESS, id_generator=None): def entry(self, contract_address, idx, sender_address=ZERO_ADDRESS):
j = JSONRPCRequest(id_generator)
o = j.template()
o = jsonrpc_template() o = jsonrpc_template()
o['method'] = 'eth_call' o['method'] = 'eth_call'
enc = ABIContractEncoder() enc = ABIContractEncoder()
@ -90,7 +86,6 @@ class AccountsIndex(TxFactory):
tx = self.template(sender_address, contract_address) tx = self.template(sender_address, contract_address)
tx = self.set_code(tx, data) tx = self.set_code(tx, data)
o['params'].append(self.normalize(tx)) o['params'].append(self.normalize(tx))
o = j.finalize(o)
return o return o

View File

@ -1,3 +1,3 @@
confini~=0.3.6rc3 confini~=0.3.6rc3
chainlib-eth~=0.0.5a1 chainlib~=0.0.3a1
crypto-dev-signer~=0.4.14b3 crypto-dev-signer~=0.4.14b3

View File

@ -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

View File

@ -1,6 +1,6 @@
[metadata] [metadata]
name = eth-accounts-index name = eth-accounts-index
version = 0.0.12a1 version = 0.0.11a14
description = Accounts index evm contract tooling with permissioned writes description = Accounts index evm contract tooling with permissioned writes
author = Louis Holbrook author = Louis Holbrook
author_email = dev@holbrook.no author_email = dev@holbrook.no