コード例 #1
0
        def __init__(self, lognote: LogNote):
            assert isinstance(lognote, LogNote)

            self.ilk = str(Web3.toText(lognote.arg1)).replace('\x00', '')
            self.urn = Address(Web3.toHex(lognote.arg2)[26:])
            self.collateral_owner = Address(Web3.toHex(lognote.arg3)[26:])
            self.dai_recipient = Address(Web3.toHex(lognote.get_bytes_at_index(3))[26:])
            self.dink = Wad(int.from_bytes(lognote.get_bytes_at_index(4), byteorder="big", signed=True))
            self.dart = Wad(int.from_bytes(lognote.get_bytes_at_index(5), byteorder="big", signed=True))
            self.block = lognote.block
            self.tx_hash = lognote.tx_hash
コード例 #2
0
ファイル: auctions.py プロジェクト: mtyou/pymaker
 def __init__(self, lognote: LogNote):
     self.guy = Address(lognote.usr)
     self.id = Web3.toInt(lognote.arg1)
     self.lot = Wad(Web3.toInt(lognote.arg2))
     self.bid = Rad(Web3.toInt(lognote.get_bytes_at_index(2)))
     self.block = lognote.block
     self.tx_hash = lognote.tx_hash
コード例 #3
0
        def __init__(self, lognote: LogNote):
            assert isinstance(lognote, LogNote)

            self.src = Address(Web3.toHex(lognote.arg1)[26:])
            self.dst = Address(Web3.toHex(lognote.arg2)[26:])
            self.dart = Rad(int.from_bytes(lognote.get_bytes_at_index(2), byteorder="big", signed=True))
            self.block = lognote.block
            self.tx_hash = lognote.tx_hash