-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow hex address as contract function input. Resolves #52
- Loading branch information
1 parent
e771281
commit 7f6be5c
Showing
2 changed files
with
15 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from conflux_web3 import Web3 | ||
|
||
|
||
def test_encode_function(w3: Web3): | ||
contract = w3.cfx.contract(name="ERC20", with_deployment_info=False)("0x8888888888888888888888888888888888888888") | ||
account = w3.cfx.account.create() | ||
|
||
assert contract.functions.transfer(account.base32_address, 1000000000000000000)._encode_transaction_data() == contract.functions.transfer(account.hex_address, 1000000000000000000)._encode_transaction_data() | ||
|
||
|