示例#1
0
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        self.grv = Gravity(
            nobroadcast=True,
        )
        set_shared_gravity_instance(self.grv)
示例#2
0
 def new_func(ctx, *args, **kwargs):
     newoptions = ctx.obj
     newoptions.update(kwargsChain)
     ctx.gravity = Gravity(**newoptions)
     ctx.blockchain = ctx.gravity
     set_shared_gravity_instance(ctx.gravity)
     return ctx.invoke(f, *args, **kwargs)
示例#3
0
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        self.grv = Gravity(nobroadcast=True, wif=[wif])
        # from getpass import getpass
        # self.grv.wallet.unlock(getpass())
        set_shared_gravity_instance(self.grv)
示例#4
0
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        self.grv = Gravity(nobroadcast=True, )
        set_shared_gravity_instance(self.grv)
        self.asset = Asset("1.3.0")
        self.symbol = self.asset["symbol"]
        self.precision = self.asset["precision"]
        self.asset2 = Asset("1.3.1")
示例#5
0
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        self.grv = Gravity(
            nobroadcast=True,
            wif={"active": wif}
        )
        set_shared_gravity_instance(self.grv)
        self.grv.set_default_account("init0")
        self.mock()
示例#6
0
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        self.grv = Gravity(
            nobroadcast=True,
            wif={
                # Force signing with this key
                "active": wif
            })
        set_shared_gravity_instance(self.grv)
        self.grv.set_default_account("init0")
示例#7
0
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        self.grv = Gravity(
            nobroadcast=True,
            # We want to bundle many operations into a single transaction
            bundle=True,
            # Overwrite wallet to use this list of wifs only
            wif=[wif])
        self.grv.set_default_account("init0")
        set_shared_gravity_instance(self.grv)
 def __init__(self, *args, **kwargs):
     super(Testcases, self).__init__(*args, **kwargs)
     self.grv = Gravity(nobroadcast=True, keys=wifs)
     set_shared_gravity_instance(self.grv)
     self.mockAccount()
示例#9
0
 def new_func(ctx, *args, **kwargs):
     ctx.obj["offline"] = True
     ctx.gravity = Gravity(**ctx.obj)
     ctx.blockchain = ctx.gravity
     set_shared_gravity_instance(ctx.gravity)
     return ctx.invoke(f, *args, **kwargs)