Skip to content

Commit

Permalink
Merge pull request #93 from jansenmarc/master
Browse files Browse the repository at this point in the history
updated documentation
  • Loading branch information
PyWaves committed Oct 4, 2019
2 parents 4026872 + f5cf841 commit 824873c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -403,6 +403,16 @@ address = pw.Address(privateKey = '<private key>')
tx = address.invokeScript('3N5Wq22bLSf3gt5VwHTCRbRnETeSwpuT8kK', 'fundRecipient', [{"type": "integer", "value": 100, }, { "type": "string", "value": "test" }, { "type": "boolean", "value": True }], [ { "amount": 100, "assetId": "BGNVLgPKLwiBiZ7vWLcy3r92MzpPCU2DuUb4tv9W6gMi" } ])
```

#### Working with contracts
```python
import pywaves as pw

pw.setNode(node = '<node>', 'T')

contract = pw.Contract('3N7XfieeJ8dHyMJfs7amukzxKB1PfMXzHzi', '<seed>')
contract.faucet()
```

#### Playing with Waves Matcher node (DEX):
```python
import pywaves as pw
Expand Down
3 changes: 1 addition & 2 deletions contract.py
Expand Up @@ -5,7 +5,6 @@ class Contract(object):

def __init__(self, contractAddress, seed):
self.contractAddress = contractAddress
self.node = pywaves.NODE

metaInfo = self.parseContractAddress()
extractedMethods = metaInfo.keys()
Expand All @@ -16,7 +15,7 @@ def __init__(self, contractAddress, seed):


def parseContractAddress(self):
metaInfo = requests.get(self.node + '/addresses/scriptInfo/' + self.contractAddress + '/meta').json()
metaInfo = requests.get(pw.NODE + '/addresses/scriptInfo/' + self.contractAddress + '/meta').json()

return metaInfo['meta']['callableFuncTypes']

Expand Down

0 comments on commit 824873c

Please sign in to comment.