Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contract caller #1157

Closed
wants to merge 31 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e4586bd
First pass on Contract Caller
kclowes Dec 4, 2018
e25f3ad
ContractReader works with parentheses option
kclowes Dec 5, 2018
f5042ee
Allow reader to take a transaction_dict
kclowes Dec 7, 2018
f3cc8cb
Change all 'reader' references to 'caller'
kclowes Dec 7, 2018
918b4ba
Change 'reader' to 'caller' in the tests
kclowes Dec 10, 2018
4f12850
Add test to make sure a contract without an ABI doesn't return an error
kclowes Dec 10, 2018
b00e1a1
Add deprecation decorators to Concise and Implicit Contract
kclowes Dec 10, 2018
f8c75bb
Change deprecation message
kclowes Dec 12, 2018
9433e66
Get rid of ContractMethod, raise error if no ABI
kclowes Dec 12, 2018
6e4b6c1
Pass around args in a way that makes tests pass
kclowes Dec 14, 2018
65f02d0
Change ImplicitContract deprecation method,
kclowes Dec 31, 2018
a4bde5b
Tests passing for ENS setup_name
kclowes Jan 11, 2019
0c2f8fb
ENS tests passing
kclowes Jan 12, 2019
e8d1824
Fix linting
kclowes Jan 12, 2019
ceee3c8
ConciseContract tests passing
kclowes Jan 14, 2019
bd38eb2
Allow no ABI until a function is called
kclowes Jan 14, 2019
1f92ef1
Rename middleware_stack to middleware_onion
njgheorghita Jan 15, 2019
1fd2658
Change CircleCI badge link to the CircleCI project
kclowes Jan 16, 2019
cd5cb32
Fix syntax error
kclowes Jan 17, 2019
a8cf234
Move ContractCaller tests to it's own file.
kclowes Jan 17, 2019
07ae1d9
Test that block_identifier is set correctly
kclowes Jan 18, 2019
9d80d27
Can pass transaction_dict with or without keyword
kclowes Jan 24, 2019
95dc88e
Test that address gets set correctly
kclowes Jan 23, 2019
1b3c129
Whitespace
kclowes Jan 24, 2019
02b42d1
Can pass transaction_dict with or without keyword
kclowes Jan 24, 2019
17b3749
Add block number to CallerTester contract
kclowes Jan 24, 2019
7047329
Fix merge conflicts
kclowes Jan 24, 2019
6415cdd
Merge branch 'master' of github.com:ethereum/web3.py into contract-ca…
kclowes Jan 24, 2019
0185da9
Remove unneeded *args and **kwargs
kclowes Jan 24, 2019
497a2eb
Refactor out none_or_zero_address function
kclowes Jan 25, 2019
d8e05a7
Add documentation to ContractCaller Class
kclowes Jan 25, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change 'reader' to 'caller' in the tests
kclowes committed Jan 24, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 918b4baea8f81cb857be0b5ac212cc81e43295e3
12 changes: 6 additions & 6 deletions tests/core/contracts/test_contract_call_interface.py
Original file line number Diff line number Diff line change
@@ -411,18 +411,18 @@ def test_call_fallback_function(fallback_function_contract):
assert result == []


def test_reader_default(math_contract):
result = math_contract.reader.return13()
def test_caller_default(math_contract):
result = math_contract.caller.return13()
assert result == 13


def test_reader_with_parens(math_contract):
result = math_contract.reader().return13()
def test_caller_with_parens(math_contract):
result = math_contract.caller().return13()
assert result == 13


def test_reader_with_parens_and_transaction_dict(math_contract):
result = math_contract.reader({'from': 'notarealaddress.eth'}).add(2, 3)
def test_caller_with_parens_and_transaction_dict(math_contract):
result = math_contract.caller({'from': 'notarealaddress.eth'}).add(2, 3)
assert result == 5