mirror of
git://holbrook.no/eth-accounts-index
synced 2024-11-22 09:06:46 +01:00
Move to chainlib-eth
This commit is contained in:
parent
1826416df9
commit
85530a85f5
@ -1,25 +1,27 @@
|
|||||||
- 0.0.11
|
- 0.0.12-pending
|
||||||
- Add list cli command
|
* Move to chainlib-eth
|
||||||
- 0.0.10
|
- 0.0.11-unreleased
|
||||||
- Implement external signer
|
* Add list cli command
|
||||||
- Standardize cli arg flags
|
- 0.0.10-unreleased
|
||||||
- Rename entry point executable names in setup
|
* Implement external signer
|
||||||
- 0.0.9
|
* Standardize cli arg flags
|
||||||
- Fix wrong abi path in registry.py
|
* Rename entry point executable names in setup
|
||||||
- 0.0.8
|
- 0.0.9-unreleased
|
||||||
- Add executable to add writers and addresses after deploy
|
* Fix wrong abi path in registry.py
|
||||||
- 0.0.7
|
- 0.0.8-unreleased
|
||||||
- Rename contracts-dir flag to abi-dir
|
* Add executable to add writers and addresses after deploy
|
||||||
- Use package data dir as default abi dir
|
- 0.0.7-unreleased
|
||||||
- 0.0.6
|
* Rename contracts-dir flag to abi-dir
|
||||||
|
* 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
|
- 0.0.5-unreleased
|
||||||
* Rename solidity file, add return values from evm functions
|
* Rename solidity file, add return values from evm functions
|
||||||
- 0.0.4
|
- 0.0.4-unreleased
|
||||||
* Update dependency versions
|
* Update dependency versions
|
||||||
- 0.0.3
|
- 0.0.3-unreleased
|
||||||
* Move deploy script to within setup
|
* Move deploy script to within setup
|
||||||
- 0.0.2
|
- 0.0.2-unreleased
|
||||||
* (unrecorded changes)
|
* (unrecorded changes)
|
||||||
- 0.0.1
|
- 0.0.1-unreleased
|
||||||
* Simple solidity method wrapper
|
* Simple solidity method wrapper
|
||||||
|
@ -15,9 +15,7 @@ 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 (
|
from chainlib.jsonrpc import JSONRPCRequest
|
||||||
jsonrpc_template,
|
|
||||||
)
|
|
||||||
from chainlib.eth.error import RequestMismatchException
|
from chainlib.eth.error import RequestMismatchException
|
||||||
from hexathon import (
|
from hexathon import (
|
||||||
add_0x,
|
add_0x,
|
||||||
@ -45,8 +43,9 @@ 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):
|
def have(self, contract_address, address, sender_address=ZERO_ADDRESS, id_generator=None):
|
||||||
o = jsonrpc_template()
|
j = JSONRPCRequest(id_generator)
|
||||||
|
o = j.template()
|
||||||
o['method'] = 'eth_call'
|
o['method'] = 'eth_call'
|
||||||
enc = ABIContractEncoder()
|
enc = ABIContractEncoder()
|
||||||
enc.method('have')
|
enc.method('have')
|
||||||
@ -56,11 +55,13 @@ 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):
|
def entry_count(self, contract_address, sender_address=ZERO_ADDRESS, id_generator=None):
|
||||||
o = jsonrpc_template()
|
j = JSONRPCRequest(id_generator)
|
||||||
|
o = j.template()
|
||||||
o['method'] = 'eth_call'
|
o['method'] = 'eth_call'
|
||||||
enc = ABIContractEncoder()
|
enc = ABIContractEncoder()
|
||||||
enc.method('entryCount')
|
enc.method('entryCount')
|
||||||
@ -68,6 +69,7 @@ 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
|
||||||
|
|
||||||
|
|
||||||
@ -75,7 +77,9 @@ 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):
|
def entry(self, contract_address, idx, sender_address=ZERO_ADDRESS, id_generator=None):
|
||||||
|
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()
|
||||||
@ -86,6 +90,7 @@ 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
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
confini~=0.3.6rc3
|
confini~=0.3.6rc3
|
||||||
chainlib~=0.0.3a1
|
chainlib-eth~=0.0.5a1
|
||||||
crypto-dev-signer~=0.4.14b3
|
crypto-dev-signer~=0.4.14b3
|
||||||
|
12
python/run_tests.sh
Normal file
12
python/run_tests.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/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
|
@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = eth-accounts-index
|
name = eth-accounts-index
|
||||||
version = 0.0.11a14
|
version = 0.0.12a1
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user