frenchtoasters / TrueD_ex

MIT License
0 stars 0 forks source link

Revisit deposit & withdrawal functions of MCT storage into contract #2

Open frenchtoasters opened 6 years ago

frenchtoasters commented 6 years ago

Need to look at these functions to validate that we will be able as the OWNER of the contract deposit MCT in order to stake correctly.

        # ARGS: amount
        if operation == 'ownerWithdraw':
            if not CheckWitness(OWNER):
                print('Only the contract owner can withdraw MCT from the contract')
                return False

            if len(args) != 1:
                print('withdraw amount not specified')
                return False

            t_amount = args[0]
            my_hash = GetExecutingScriptHash()

            storage = MCTManager()
            return storage.transfer(my_hash, t_amount)