Example #1
0
def main():

    print('Instantiating ContractInterface')
    client = ContractInterface()

    print('Registering...')
    client.register()
    '''
    print("Transfering 50 IoT's")
    client.transfer(client.w3.eth.accounts[2], 50)'''

    # Request 5 GB. This one should be accepted
    print('Request 5 GB (even)')
    client.request_storage(5000)

    input('Press enter for freeing')
    id, _ = client.remoteStorage.popitem()
    client.free_storage(id)
Example #2
0
def request_storage(client: ContractInterface, amount: int):
    client.request_storage(amount)