docstrings for eth extension
This commit is contained in:
@@ -129,15 +129,32 @@ class CICEth(Extension):
|
||||
|
||||
|
||||
def add_outputs(self, k, v):
|
||||
"""Adds given key/value pair to outputs array.
|
||||
|
||||
:param k: Output key
|
||||
:type k: str
|
||||
:param v: Output value
|
||||
:param v: bytes or str
|
||||
"""
|
||||
logg.debug('adding outputs {} {}'.format(k, v))
|
||||
self.outputs.append((k, v))
|
||||
|
||||
|
||||
def get_outputs(self):
|
||||
"""Get wrapper for outputs captured from processing.
|
||||
|
||||
:rtype: list of tuples
|
||||
:return: Captured outputs
|
||||
"""
|
||||
return self.outputs
|
||||
|
||||
|
||||
def process_token(self, writer=None):
|
||||
"""Deploy token, and optionally mint token supply to token deployer account.
|
||||
|
||||
:param writer: Writer interface receiving the output of the processor step
|
||||
:type writer: cic.output.OutputWriter
|
||||
"""
|
||||
if writer == None:
|
||||
writer = self.outputs_writer
|
||||
|
||||
@@ -200,6 +217,11 @@ class CICEth(Extension):
|
||||
|
||||
|
||||
def process_token_index(self, writer=None):
|
||||
"""Register deployed token with token index.
|
||||
|
||||
:param writer: Writer interface receiving the output of the processor step
|
||||
:type writer: cic.output.OutputWriter
|
||||
"""
|
||||
if writer == None:
|
||||
writer = self.outputs_writer
|
||||
|
||||
@@ -228,6 +250,11 @@ class CICEth(Extension):
|
||||
|
||||
|
||||
def process_address_declarator(self, writer=None):
|
||||
"""Register token proofs with address declarator.
|
||||
|
||||
:param writer: Writer interface receiving the output of the processor step
|
||||
:type writer: cic.output.OutputWriter
|
||||
"""
|
||||
if writer == None:
|
||||
writer = self.outputs_writer
|
||||
|
||||
@@ -268,6 +295,8 @@ class CICEth(Extension):
|
||||
|
||||
|
||||
def prepare_extension(self):
|
||||
"""Sets token address for extension if defined in settings.
|
||||
"""
|
||||
super(CICEth, self).prepare_extension()
|
||||
|
||||
if self.token_address != None:
|
||||
@@ -275,4 +304,8 @@ class CICEth(Extension):
|
||||
|
||||
|
||||
def new(chain_spec, resources, proof, signer_hint=None, rpc=None, outputs_writer=None):
|
||||
"""Convenience function to enable object instantiation through predictable module symbol
|
||||
|
||||
See CICEth
|
||||
"""
|
||||
return CICEth(chain_spec, resources, proof, signer=signer_hint, rpc=rpc, outputs_writer=outputs_writer)
|
||||
|
||||
Reference in New Issue
Block a user