Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
duelingbenjos committed Jan 14, 2025
1 parent 9629d3f commit c0f76bb
Showing 1 changed file with 76 additions and 1 deletion.
77 changes: 76 additions & 1 deletion src/xian/tools/genesis/contracts/vault.s.py
Original file line number Diff line number Diff line change
@@ -6,6 +6,81 @@
transactions = Hash()


"""
VARS :
{
'__name__': 'currency',
'__doc__': None,
'__package__': '',
'__loader__': <contracting.execution.module.DatabaseLoader object at 0xffff80027950>,
'__spec__': ModuleSpec(name='currency', loader=<contracting.execution.module.DatabaseLoader object at 0xffff80027950>),
'Variable': <class 'contracting.stdlib.bridge.orm.V'>,
'Hash': <class 'contracting.stdlib.bridge.orm.H'>,
'ForeignVariable': <class 'contracting.stdlib.bridge.orm.FV'>,
'ForeignHash': <class 'contracting.stdlib.bridge.orm.FH'>,
'LogEvent': <class 'contracting.stdlib.bridge.orm.LE'>,
'__Contract': <class 'contracting.stdlib.bridge.orm.C'>,
'hashlib': <module 'hashlib'>,
'datetime': <module 'datetime'>,
'random': <module 'random'>,
'importlib': <module 'importlib'>,
'__export': <class 'contracting.stdlib.bridge.access.__export'>,
'ctx': <contracting.execution.runtime.Context object at 0xffff96de05d0>,
'rt': <contracting.execution.runtime.Runtime object at 0xffff96de2d50>,
'Any': typing.Any,
'decimal': <class 'contracting.stdlib.bridge.decimal.ContractingDecimal'>,
'crypto': <module 'crypto'>,
'__Driver': <contracting.storage.driver.Driver object at 0xffff7ff93310>,
'chain_id': 'test-chain',
'now': 2025-01-08 15:50:00,
'__contract__': True,
'__balances': <contracting.stdlib.bridge.orm.H object at 0xffff80026b50>,
'__metadata': <contracting.stdlib.bridge.orm.H object at 0xffff80027710>,
'__permits': <contracting.stdlib.bridge.orm.H object at 0xffff80024a10>,
'__streams': <contracting.stdlib.bridge.orm.H object at 0xffff80025e10>,
'__TransferEvent': <contracting.stdlib.bridge.orm.LE object at 0xffff800240d0>,
'__ApproveEvent': <contracting.stdlib.bridge.orm.LE object at 0xffff80024990>,
'__StreamCreatedEvent': <contracting.stdlib.bridge.orm.LE object at 0xffff96fcb210>,
'__StreamBalanceEvent': <contracting.stdlib.bridge.orm.LE object at 0xffff96f74f10>,
'__StreamCloseChangeEvent': <contracting.stdlib.bridge.orm.LE object at 0xffff96fc69d0>,
'__StreamForfeitEvent': <contracting.stdlib.bridge.orm.LE object at 0xffff96fc6610>,
'__StreamFinalizedEvent': <contracting.stdlib.bridge.orm.LE object at 0xffff7ffae610>,
'____': <function ____ at 0xffff7ffc31a0>,
'__setup_seed_stream': <function __setup_seed_stream at 0xffff7ffc32e0>,
'change_metadata': <function change_metadata at 0xffff7ffc3420>,
'transfer': <function transfer at 0xffff7ffc3560>,
'approve': <function approve at 0xffff7ffc36a0>,
'transfer_from': <function transfer_from at 0xffff7ffc37e0>,
'balance_of': <function balance_of at 0xffff7ffc3920>,
'permit': <function permit at 0xffff7ffc3a60>,
'__construct_permit_msg': <function __construct_permit_msg at 0xffff7ffc3b00>,
'SENDER_KEY': 'sender',
'RECEIVER_KEY': 'receiver',
'STATUS_KEY': 'status',
'BEGIN_KEY': 'begins',
'CLOSE_KEY': 'closes',
'RATE_KEY': 'rate',
'CLAIMED_KEY': 'claimed',
'STREAM_ACTIVE': 'active',
'STREAM_FINALIZED': 'finalized',
'STREAM_FORFEIT': 'forfeit',
'create_stream': <function create_stream at 0xffff7ffc3c40>,
'__perform_create_stream': <function __perform_create_stream at 0xffff7ffc3ce0>,
'create_stream_from_permit': <function create_stream_from_permit at 0xffff7ffc3e20>,
'balance_stream': <function balance_stream at 0xffff7ffc3f60>,
'change_close_time': <function change_close_time at 0xffff7fff80e0>,
'finalize_stream': <function finalize_stream at 0xffff7fff8220>,
'close_balance_finalize': <function close_balance_finalize at 0xffff7fff8360>,
'balance_finalize': <function balance_finalize at 0xffff7fff84a0>,
'forfeit_stream': <function forfeit_stream at 0xffff7fff85e0>,
'__calc_outstanding_balance': <function __calc_outstanding_balance at 0xffff7fff8680>,
'__calc_claimable_amount': <function __calc_claimable_amount at 0xffff7fff8720>,
'__construct_stream_permit_msg': <function __construct_stream_permit_msg at 0xffff7fff87c0>,
'__strptime_ymdhms': <function __strptime_ymdhms at 0xffff7fff8860>
}
"""


@construct
def seed(initial_owners: str, initial_required_signatures: int, stream: str):
"""
@@ -134,4 +209,4 @@ def balance_stream():
Executes balance_stream function from currency
contract which sends tokens to this contract
"""
currency.balance_stream(stream_id.get())
currency.balance_stream(stream_id.get())

0 comments on commit c0f76bb

Please sign in to comment.