Persist Urns in raw bytes32 format
- Enables simple usage in contract storage lookups
This commit is contained in:
@@ -42,7 +42,7 @@ var (
|
||||
biteIlk = [32]byte{69, 84, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
biteLad = [32]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 216, 180, 20, 126, 218, 128, 254, 199, 18, 42, 225, 109, 162, 71, 156, 189, 127, 251}
|
||||
biteIlkString = "4554480000000000000000000000000000000000000000000000000000000000"
|
||||
biteLadString = "0x0000d8b4147eDa80Fec7122AE16DA2479Cbd7ffB"
|
||||
biteLadString = "0000000000000000000000000000d8b4147eda80fec7122ae16da2479cbd7ffb"
|
||||
)
|
||||
|
||||
var EthBiteLog = types.Log{
|
||||
|
||||
@@ -48,7 +48,7 @@ var EthDripFileIlkLog = types.Log{
|
||||
var rawDripFileIlkLog, _ = json.Marshal(EthDripFileIlkLog)
|
||||
var DripFileIlkModel = ilk2.DripFileIlkModel{
|
||||
Ilk: "66616b6520696c6b000000000000000000000000000000000000000000000000",
|
||||
Vow: "fake vow",
|
||||
Vow: "66616b6520766f77000000000000000000000000000000000000000000000000",
|
||||
Tax: "12300.000000000000000000000000000",
|
||||
LogIndex: EthDripFileIlkLog.Index,
|
||||
TransactionIndex: EthDripFileIlkLog.TxIndex,
|
||||
|
||||
@@ -38,7 +38,7 @@ var (
|
||||
bid = new(big.Int).SetBytes([]byte{0})
|
||||
gal = "0x07Fa9eF6609cA7921112231F8f195138ebbA2977"
|
||||
end = int64(1535991025)
|
||||
urn = [32]byte{115, 64, 224, 6, 244, 19, 91, 166, 151, 13, 67, 191, 67, 216, 141, 202, 212, 231, 168, 202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
urnBytes = [32]byte{115, 64, 224, 6, 244, 19, 91, 166, 151, 13, 67, 191, 67, 216, 141, 202, 212, 231, 168, 202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
urnString = "0x7340e006f4135BA6970D43bf43d88DCAD4e7a8CA"
|
||||
tabString = "50"
|
||||
tab, _ = new(big.Int).SetString(tabString, 10)
|
||||
@@ -73,7 +73,7 @@ var FlipKickEntity = flip_kick.FlipKickEntity{
|
||||
Bid: bid,
|
||||
Gal: common.HexToAddress(gal),
|
||||
End: big.NewInt(end),
|
||||
Urn: urn,
|
||||
Urn: urnBytes,
|
||||
Tab: tab,
|
||||
TransactionIndex: EthFlipKickLog.TxIndex,
|
||||
LogIndex: EthFlipKickLog.Index,
|
||||
|
||||
@@ -42,7 +42,7 @@ var (
|
||||
ink = big.NewInt(15)
|
||||
ilk = [32]byte{102, 97, 107, 101, 32, 105, 108, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
frobIlkString = "66616b6520696c6b000000000000000000000000000000000000000000000000"
|
||||
frobUrnString = "0x64d922894153BE9EEf7b7218dc565d1D0Ce2a092"
|
||||
frobUrnString = "00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"
|
||||
)
|
||||
|
||||
var EthFrobLog = types.Log{
|
||||
|
||||
@@ -32,7 +32,7 @@ var (
|
||||
tendBidId = int64(10)
|
||||
tendLot = "85000000000000000000"
|
||||
tendBid = "1000000000000000000"
|
||||
tendGuy = "0x7d7bEe5fCfD8028cf7b00876C5b1421c800561A6"
|
||||
tendGuy = "0000000000000000000000007d7bee5fcfd8028cf7b00876c5b1421c800561a6"
|
||||
tendData = "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000644b43ed12000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000049b9ca9a6943400000000000000000000000000000000000000000000000000000de0b6b3a7640000"
|
||||
tendTransactionHash = "0x7909c8793ded2b8348f5db623044fbc26bb7ab78ad5792897abdf68ddc1df63d"
|
||||
tendBlockHash = "0xa8ea87147c0a68daeb6b1d9f8c0937ba975a650809cab80d19c969e8d0df452c"
|
||||
|
||||
@@ -45,8 +45,8 @@ var VatFluxLog = types.Log{
|
||||
var rawFluxLog, _ = json.Marshal(VatFluxLog)
|
||||
var VatFluxModel = vat_flux.VatFluxModel{
|
||||
Ilk: "5245500000000000000000000000000000000000000000000000000000000000",
|
||||
Src: "0x7FA9EF6609Ca7921112231f8f195138ebba29770",
|
||||
Dst: "0x93086347c52a8878af71bB818509d484c6a2e1bF",
|
||||
Src: "0000000000000000000000007fa9ef6609ca7921112231f8f195138ebba29770",
|
||||
Dst: "00000000000000000000000093086347c52a8878af71bb818509d484c6a2e1bf",
|
||||
Rad: "123",
|
||||
TransactionIndex: VatFluxLog.TxIndex,
|
||||
LogIndex: VatFluxLog.Index,
|
||||
|
||||
@@ -47,7 +47,7 @@ var EthVatFoldLog = types.Log{
|
||||
var rawVatFoldLog, _ = json.Marshal(EthVatFoldLog)
|
||||
var VatFoldModel = vat_fold.VatFoldModel{
|
||||
Ilk: "5245500000000000000000000000000000000000000000000000000000000000",
|
||||
Urn: "0x3728e9777B2a0a611ee0F89e00E01044ce4736d1",
|
||||
Urn: "0000000000000000000000003728e9777b2a0a611ee0f89e00e01044ce4736d1",
|
||||
Rate: "0.000000000000000000000000002",
|
||||
LogIndex: EthVatFoldLog.Index,
|
||||
TransactionIndex: EthVatFoldLog.TxIndex,
|
||||
|
||||
@@ -29,9 +29,9 @@ var EthVatGrabLog = types.Log{
|
||||
var rawVatGrabLog, _ = json.Marshal(EthVatGrabLog)
|
||||
var VatGrabModel = vat_grab.VatGrabModel{
|
||||
Ilk: "5245500000000000000000000000000000000000000000000000000000000000",
|
||||
Urn: "0x6a3AE20C315E845B2E398e68EfFe39139eC6060C",
|
||||
V: "0x2F34f22a00eE4b7a8F8BBC4eAee1658774c624e0",
|
||||
W: "0x3728e9777B2a0a611ee0F89e00E01044ce4736d1",
|
||||
Urn: "0000000000000000000000006a3ae20c315e845b2e398e68effe39139ec6060c",
|
||||
V: "0000000000000000000000002f34f22a00ee4b7a8f8bbc4eaee1658774c624e0",
|
||||
W: "0000000000000000000000003728e9777b2a0a611ee0f89e00e01044ce4736d1",
|
||||
Dink: "115792089237316195423570985008687907853269984665640564039455584007913129639936",
|
||||
Dart: "115792089237316195423570985008687907853269984665640564039441803007913129639936",
|
||||
LogIndex: EthVatGrabLog.Index,
|
||||
|
||||
@@ -44,8 +44,8 @@ var VatHealLog = types.Log{
|
||||
|
||||
var rawHealLog, _ = json.Marshal(VatHealLog)
|
||||
var VatHealModel = vat_heal.VatHealModel{
|
||||
Urn: "0x7d7bEe5fCfD8028cf7b00876C5b1421c800561A6",
|
||||
V: "0x7340e006f4135BA6970D43bf43d88DCAD4e7a8CA",
|
||||
Urn: "0000000000000000000000007d7bee5fcfd8028cf7b00876c5b1421c800561a6",
|
||||
V: "0000000000000000000000007340e006f4135ba6970d43bf43d88dcad4e7a8ca",
|
||||
Rad: "120",
|
||||
LogIndex: VatHealLog.Index,
|
||||
TransactionIndex: VatHealLog.TxIndex,
|
||||
|
||||
@@ -46,8 +46,8 @@ var EthVatMoveLog = types.Log{
|
||||
|
||||
var rawVatMoveLog, _ = json.Marshal(EthVatMoveLog)
|
||||
var VatMoveModel = vat_move.VatMoveModel{
|
||||
Src: "0xA730d1FF8B6Bc74a26d54c20a9dda539909BaB0e",
|
||||
Dst: "0xB730D1fF8b6BC74a26D54c20a9ddA539909BAb0e",
|
||||
Src: "000000000000000000000000a730d1ff8b6bc74a26d54c20a9dda539909bab0e",
|
||||
Dst: "000000000000000000000000b730d1ff8b6bc74a26d54c20a9dda539909bab0e",
|
||||
Rad: "42",
|
||||
LogIndex: EthVatMoveLog.Index,
|
||||
TransactionIndex: EthVatMoveLog.TxIndex,
|
||||
|
||||
@@ -47,7 +47,7 @@ var EthVatSlipLog = types.Log{
|
||||
var rawVatSlipLog, _ = json.Marshal(EthVatSlipLog)
|
||||
var VatSlipModel = vat_slip.VatSlipModel{
|
||||
Ilk: "66616b6520696c6b000000000000000000000000000000000000000000000000",
|
||||
Guy: common.HexToAddress("0x7d7bEe5fCfD8028cf7b00876C5b1421c800561A6").String(),
|
||||
Guy: "0000000000000000000000007d7bee5fcfd8028cf7b00876c5b1421c800561a6",
|
||||
Rad: "987654321",
|
||||
TransactionIndex: EthVatSlipLog.TxIndex,
|
||||
LogIndex: EthVatSlipLog.Index,
|
||||
|
||||
@@ -15,7 +15,7 @@ var EthVatTollLog = types.Log{
|
||||
Topics: []common.Hash{
|
||||
common.HexToHash("0x09b7a0b500000000000000000000000000000000000000000000000000000000"),
|
||||
common.HexToHash("0x66616b6520696c6b000000000000000000000000000000000000000000000000"),
|
||||
common.HexToHash("0xa3e37186e017747dba34042e83e3f76ad3cce9b0000000000000000000000000"),
|
||||
common.HexToHash("0x0000000000000000000000000a3e37186e017747dba34042e83e3f76ad3cce9b"),
|
||||
common.HexToHash("0x00000000000000000000000000000000000000000000000000000000075bcd15"),
|
||||
},
|
||||
Data: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006409b7a0b566616b6520696c6b000000000000000000000000000000000000000000000000a3e37186e017747dba34042e83e3f76ad3cce9b000000000000000000000000000000000000000000000000000000000000000000000000000000000075bcd15"),
|
||||
@@ -30,7 +30,7 @@ var EthVatTollLog = types.Log{
|
||||
var rawVatTollLog, _ = json.Marshal(EthVatTollLog)
|
||||
var VatTollModel = vat_toll.VatTollModel{
|
||||
Ilk: "66616b6520696c6b000000000000000000000000000000000000000000000000",
|
||||
Urn: "0xA3E37186E017747DbA34042e83e3F76Ad3CcE9b0",
|
||||
Urn: "0000000000000000000000000a3e37186e017747dba34042e83e3f76ad3cce9b",
|
||||
Take: big.NewInt(123456789).String(),
|
||||
TransactionIndex: EthVatTollLog.TxIndex,
|
||||
LogIndex: EthVatTollLog.Index,
|
||||
|
||||
@@ -32,12 +32,12 @@ var EthVatTuneLog = types.Log{
|
||||
var rawVatTuneLog, _ = json.Marshal(EthVatTuneLog)
|
||||
var dartString = "115792089237316195423570985008687907853269984665640564039455584007913129639936"
|
||||
var vatTuneDart, _ = new(big.Int).SetString(dartString, 10)
|
||||
var urnAddress = "0x4F26FfBe5F04ED43630fdC30A87638d53D0b0876"
|
||||
var urn = "0000000000000000000000004f26ffbe5f04ed43630fdc30a87638d53d0b0876"
|
||||
var VatTuneModel = vat_tune.VatTuneModel{
|
||||
Ilk: "4554480000000000000000000000000000000000000000000000000000000000",
|
||||
Urn: urnAddress,
|
||||
V: urnAddress,
|
||||
W: urnAddress,
|
||||
Urn: urn,
|
||||
V: urn,
|
||||
W: urn,
|
||||
Dink: big.NewInt(0).String(),
|
||||
Dart: vatTuneDart.String(),
|
||||
TransactionIndex: EthVatTuneLog.TxIndex,
|
||||
|
||||
Reference in New Issue
Block a user