Update address formatting (#67)
* Add getSignatures command for list of signatures in constants * Update VatTune converter's formatting of addresses and added an integration test * Move VatTune and PriceFeeds integration tests to a common suite * Update VatGrab converter for address format * Update frob converter to fix urn and ilk formatting/decoding * Update formatting * Update make test command and add integrationtest command * Add integration test to travis build * Update creating headers in integration tests to include Raw and Timestamp fields
This commit is contained in:
@@ -41,8 +41,8 @@ var (
|
||||
gem, _ = big.NewInt(0).SetString("115792089237316195423570985008687907853269984665640564039457584007913129639926", 10)
|
||||
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 = "0x66616b6520696c6B000000000000000000000000"
|
||||
frobUrnString = "0x00000000000000000000000064D922894153BE9E"
|
||||
frobIlkString = "fake ilk"
|
||||
frobUrnString = "0x64d922894153BE9EEf7b7218dc565d1D0Ce2a092"
|
||||
)
|
||||
|
||||
var EthFrobLog = types.Log{
|
||||
|
||||
@@ -13,11 +13,11 @@ var EthVatGrabLog = types.Log{
|
||||
Address: common.HexToAddress(shared.VatContractAddress),
|
||||
Topics: []common.Hash{
|
||||
common.HexToHash("0x3690ae4c00000000000000000000000000000000000000000000000000000000"),
|
||||
common.HexToHash("0x66616b6520696c6b000000000000000000000000000000000000000000000000"),
|
||||
common.HexToHash("0x07fa9ef6609ca7921112231f8f195138ebba2977000000000000000000000000"),
|
||||
common.HexToHash("0x7340e006f4135ba6970d43bf43d88dcad4e7a8ca000000000000000000000000"),
|
||||
common.HexToHash("0x5245500000000000000000000000000000000000000000000000000000000000"),
|
||||
common.HexToHash("0x0000000000000000000000006a3ae20c315e845b2e398e68effe39139ec6060c"),
|
||||
common.HexToHash("0x0000000000000000000000002f34f22a00ee4b7a8f8bbc4eaee1658774c624e0"),
|
||||
},
|
||||
Data: hexutil.MustDecode("0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c43690ae4c66616b6520696c6b00000000000000000000000000000000000000000000000007fa9ef6609ca7921112231f8f195138ebba29770000000000000000000000007340e006f4135ba6970d43bf43d88dcad4e7a8ca0000000000000000000000007526eb4f95e2a1394797cb38a921fb1eba09291b00000000000000000000000000000000000000000000000000000000000000000000000000000000069f6bc7000000000000000000000000000000000000000000000000000000000d3ed78e"),
|
||||
Data: hexutil.MustDecode("0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c43690ae4c52455000000000000000000000000000000000000000000000000000000000000000000000000000000000006a3ae20c315e845b2e398e68effe39139ec6060c0000000000000000000000002f34f22a00ee4b7a8f8bbc4eaee1658774c624e00000000000000000000000003728e9777b2a0a611ee0f89e00e01044ce4736d1ffffffffffffffffffffffffffffffffffffffffffffffffe43e9298b1380000ffffffffffffffffffffffffffffffffffffffffffffffff24fea01c7f8f8000"),
|
||||
BlockNumber: 23,
|
||||
TxHash: common.HexToHash("0x7cb84c750ce4985f7811abf641d52ffcb35306d943081475226484cf1470c6fa"),
|
||||
TxIndex: 4,
|
||||
@@ -28,12 +28,12 @@ var EthVatGrabLog = types.Log{
|
||||
|
||||
var rawVatGrabLog, _ = json.Marshal(EthVatGrabLog)
|
||||
var VatGrabModel = vat_grab.VatGrabModel{
|
||||
Ilk: "fake ilk",
|
||||
Urn: "0x07Fa9eF6609cA7921112231F8f195138ebbA2977",
|
||||
V: "0x7340e006f4135BA6970D43bf43d88DCAD4e7a8CA",
|
||||
W: "0x7526EB4f95e2a1394797Cb38a921Fb1EbA09291B",
|
||||
Dink: "111111111",
|
||||
Dart: "222222222",
|
||||
Ilk: "REP",
|
||||
Urn: "0x6a3AE20C315E845B2E398e68EfFe39139eC6060C",
|
||||
V: "0x2F34f22a00eE4b7a8F8BBC4eAee1658774c624e0",
|
||||
W: "0x3728e9777B2a0a611ee0F89e00E01044ce4736d1",
|
||||
Dink: "115792089237316195423570985008687907853269984665640564039455584007913129639936",
|
||||
Dart: "115792089237316195423570985008687907853269984665640564039441803007913129639936",
|
||||
TransactionIndex: EthVatGrabLog.TxIndex,
|
||||
Raw: rawVatGrabLog,
|
||||
}
|
||||
|
||||
@@ -12,30 +12,33 @@ import (
|
||||
)
|
||||
|
||||
var EthVatTuneLog = types.Log{
|
||||
Address: common.HexToAddress("0x239E6f0AB02713f1F8AA90ebeDeD9FC66Dc96CD6"),
|
||||
Address: common.HexToAddress("0xCD726790550aFcd77e9a7a47e86A3F9010af126B"),
|
||||
Topics: []common.Hash{
|
||||
common.HexToHash("0x5dd6471a00000000000000000000000000000000000000000000000000000000"),
|
||||
common.HexToHash("0x66616b6520696c6b000000000000000000000000000000000000000000000000"),
|
||||
common.HexToHash("0x7d7bee5fcfd8028cf7b00876c5b1421c800561a6000000000000000000000000"),
|
||||
common.HexToHash("0xa3e37186e017747dba34042e83e3f76ad3cce9b0000000000000000000000000"),
|
||||
common.HexToHash("0x4554480000000000000000000000000000000000000000000000000000000000"),
|
||||
common.HexToHash("0x0000000000000000000000004f26ffbe5f04ed43630fdc30a87638d53d0b0876"),
|
||||
common.HexToHash("0x0000000000000000000000004f26ffbe5f04ed43630fdc30a87638d53d0b0876"),
|
||||
},
|
||||
Data: hexutil.MustDecode("0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c45dd6471a66616b6520696c6b0000000000000000000000000000000000000000000000007d7bee5fcfd8028cf7b00876c5b1421c800561a6000000000000000000000000a3e37186e017747dba34042e83e3f76ad3cce9b00000000000000000000000000f243e26db94b5426032e6dfa6007802dea2a61400000000000000000000000000000000000000000000000000000000000000000000000000000000075bcd15000000000000000000000000000000000000000000000000000000003ade68b1"),
|
||||
BlockNumber: 22,
|
||||
TxHash: common.HexToHash("0x2b19ef3965420d2d5eb8792eafbd5e365b2866200cfc4473835971f6965f831c"),
|
||||
TxIndex: 3,
|
||||
BlockHash: common.HexToHash("0xf3a4a9ecb79a721421b347424dc9fa072ca762f3ba340557b54a205f058f59a6"),
|
||||
Data: hexutil.MustDecode("0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c45dd6471a45544800000000000000000000000000000000000000000000000000000000000000000000000000000000004f26ffbe5f04ed43630fdc30a87638d53d0b08760000000000000000000000004f26ffbe5f04ed43630fdc30a87638d53d0b08760000000000000000000000004f26ffbe5f04ed43630fdc30a87638d53d0b08760000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffe43e9298b1380000"),
|
||||
BlockNumber: 8761670,
|
||||
TxHash: common.HexToHash("0x95eb3d6cbd83032efa29714d4a391ce163d7d215db668aadd7d33dd5c20b1ec7"),
|
||||
TxIndex: 0,
|
||||
BlockHash: common.HexToHash("0xd35188df40a741f4bf4ccacc6be0154e338652660d0b56cc9058c1bca53b09ee"),
|
||||
Index: 6,
|
||||
Removed: false,
|
||||
}
|
||||
|
||||
var rawVatTuneLog, _ = json.Marshal(EthVatTuneLog)
|
||||
var dartString = "115792089237316195423570985008687907853269984665640564039455584007913129639936"
|
||||
var vatTuneDart, _ = new(big.Int).SetString(dartString, 10)
|
||||
var urnAddress = "0x4F26FfBe5F04ED43630fdC30A87638d53D0b0876"
|
||||
var VatTuneModel = vat_tune.VatTuneModel{
|
||||
Ilk: "fake ilk",
|
||||
Urn: "0x7d7bEe5fCfD8028cf7b00876C5b1421c800561A6",
|
||||
V: "0xA3E37186E017747DbA34042e83e3F76Ad3CcE9b0",
|
||||
W: "0x0F243E26db94B5426032E6DFA6007802Dea2a614",
|
||||
Dink: big.NewInt(123456789).String(),
|
||||
Dart: big.NewInt(987654321).String(),
|
||||
Ilk: "ETH",
|
||||
Urn: urnAddress,
|
||||
V: urnAddress,
|
||||
W: urnAddress,
|
||||
Dink: big.NewInt(0).String(),
|
||||
Dart: vatTuneDart.String(),
|
||||
TransactionIndex: EthVatTuneLog.TxIndex,
|
||||
Raw: rawVatTuneLog,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user