2019-01-24 20:41:30 +00:00
|
|
|
// VulcanizeDB
|
|
|
|
// Copyright © 2018 Vulcanize
|
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2018-09-06 21:42:24 +00:00
|
|
|
|
2018-08-29 14:12:29 +00:00
|
|
|
package test_data
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
2018-09-06 21:42:24 +00:00
|
|
|
"math/big"
|
|
|
|
|
2018-08-29 14:12:29 +00:00
|
|
|
"github.com/ethereum/go-ethereum/common"
|
|
|
|
"github.com/ethereum/go-ethereum/common/hexutil"
|
|
|
|
"github.com/ethereum/go-ethereum/core/types"
|
2018-09-06 21:42:24 +00:00
|
|
|
|
2018-11-14 19:07:11 +00:00
|
|
|
"github.com/vulcanize/vulcanizedb/pkg/fakes"
|
2018-09-05 18:51:18 +00:00
|
|
|
"github.com/vulcanize/vulcanizedb/pkg/transformers/pit_file/debt_ceiling"
|
2018-09-05 14:24:28 +00:00
|
|
|
ilk2 "github.com/vulcanize/vulcanizedb/pkg/transformers/pit_file/ilk"
|
2018-11-13 22:56:39 +00:00
|
|
|
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
2018-08-29 14:12:29 +00:00
|
|
|
)
|
|
|
|
|
2018-09-05 18:51:18 +00:00
|
|
|
var EthPitFileDebtCeilingLog = types.Log{
|
2019-01-23 18:44:09 +00:00
|
|
|
Address: common.HexToAddress(KovanPitContractAddress),
|
2018-09-05 18:51:18 +00:00
|
|
|
Topics: []common.Hash{
|
|
|
|
common.HexToHash("0x29ae811400000000000000000000000000000000000000000000000000000000"),
|
|
|
|
common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"),
|
2018-09-26 14:14:18 +00:00
|
|
|
common.HexToHash("0x4c696e6500000000000000000000000000000000000000000000000000000000"),
|
|
|
|
common.HexToHash("0x000000000000000000000000000000000000000000000000000000000001e240"),
|
2018-09-05 18:51:18 +00:00
|
|
|
},
|
2018-09-26 14:14:18 +00:00
|
|
|
Data: hexutil.MustDecode("0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000004429ae81144c696e6500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e240"),
|
2018-09-05 18:51:18 +00:00
|
|
|
BlockNumber: 22,
|
|
|
|
TxHash: common.HexToHash("0xd744878a0b6655e3ba729e1019f56b563b4a16750196b8ad6104f3977db43f42"),
|
|
|
|
TxIndex: 333,
|
2018-11-12 20:59:16 +00:00
|
|
|
BlockHash: fakes.FakeHash,
|
2018-10-22 19:06:06 +00:00
|
|
|
Index: 15,
|
2018-09-05 18:51:18 +00:00
|
|
|
Removed: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
var rawPitFileDebtCeilingLog, _ = json.Marshal(EthPitFileDebtCeilingLog)
|
|
|
|
var PitFileDebtCeilingModel = debt_ceiling.PitFileDebtCeilingModel{
|
2018-09-26 14:14:18 +00:00
|
|
|
What: "Line",
|
2018-11-13 22:56:39 +00:00
|
|
|
Data: shared.ConvertToWad(big.NewInt(123456).String()),
|
2018-10-22 19:06:06 +00:00
|
|
|
LogIndex: EthPitFileDebtCeilingLog.Index,
|
2018-09-05 18:51:18 +00:00
|
|
|
TransactionIndex: EthPitFileDebtCeilingLog.TxIndex,
|
|
|
|
Raw: rawPitFileDebtCeilingLog,
|
|
|
|
}
|
|
|
|
|
2018-11-14 22:33:29 +00:00
|
|
|
var EthPitFileIlkLineLog = types.Log{
|
2019-01-23 18:44:09 +00:00
|
|
|
Address: common.HexToAddress(KovanPitContractAddress),
|
2018-08-29 14:12:29 +00:00
|
|
|
Topics: []common.Hash{
|
|
|
|
common.HexToHash("0x1a0b287e00000000000000000000000000000000000000000000000000000000"),
|
2018-11-14 22:33:29 +00:00
|
|
|
common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"),
|
|
|
|
common.HexToHash("0x66616b6520696c6b000000000000000000000000000000000000000000000000"),
|
|
|
|
common.HexToHash("0x6c696e6500000000000000000000000000000000000000000000000000000000"),
|
|
|
|
},
|
|
|
|
Data: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000641a0b287e66616b6520696c6b0000000000000000000000000000000000000000000000006c696e6500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e8d4a51000"),
|
|
|
|
BlockNumber: 12,
|
|
|
|
TxHash: common.HexToHash("0x2e27c962a697d4f7ec5d3206d0c058bd510f7593a711f082e55f3b62d44d8dd9"),
|
|
|
|
TxIndex: 112,
|
|
|
|
BlockHash: fakes.FakeHash,
|
|
|
|
Index: 15,
|
|
|
|
Removed: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
var rawPitFileIlkLineLog, _ = json.Marshal(EthPitFileIlkLineLog)
|
|
|
|
var PitFileIlkLineModel = ilk2.PitFileIlkModel{
|
2019-01-28 22:52:47 +00:00
|
|
|
Ilk: "0x66616b6520696c6b000000000000000000000000000000000000000000000000",
|
2018-11-14 22:33:29 +00:00
|
|
|
What: "line",
|
|
|
|
Data: "0.000001000000000000",
|
|
|
|
LogIndex: EthPitFileIlkLineLog.Index,
|
|
|
|
TransactionIndex: EthPitFileIlkLineLog.TxIndex,
|
|
|
|
Raw: rawPitFileIlkLineLog,
|
|
|
|
}
|
|
|
|
|
|
|
|
var EthPitFileIlkSpotLog = types.Log{
|
2019-01-23 18:44:09 +00:00
|
|
|
Address: common.HexToAddress(KovanPitContractAddress),
|
2018-11-14 22:33:29 +00:00
|
|
|
Topics: []common.Hash{
|
|
|
|
common.HexToHash("0x1a0b287e00000000000000000000000000000000000000000000000000000000"),
|
|
|
|
common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"),
|
2018-08-29 14:12:29 +00:00
|
|
|
common.HexToHash("0x66616b6520696c6b000000000000000000000000000000000000000000000000"),
|
|
|
|
common.HexToHash("0x73706f7400000000000000000000000000000000000000000000000000000000"),
|
|
|
|
},
|
2018-11-14 22:33:29 +00:00
|
|
|
Data: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000641a0b287e66616b6520696c6b00000000000000000000000000000000000000000000000073706f7400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e8d4a51000"),
|
2018-08-29 14:12:29 +00:00
|
|
|
BlockNumber: 11,
|
|
|
|
TxHash: common.HexToHash("0x1ba8125f60fa045c85b35df3983bee37db8627fbc32e3442a5cf17c85bb83f09"),
|
|
|
|
TxIndex: 111,
|
2018-11-12 20:59:16 +00:00
|
|
|
BlockHash: fakes.FakeHash,
|
2018-10-22 19:06:06 +00:00
|
|
|
Index: 14,
|
2018-08-29 14:12:29 +00:00
|
|
|
Removed: false,
|
|
|
|
}
|
|
|
|
|
2018-11-14 22:33:29 +00:00
|
|
|
var rawPitFileIlkSpotLog, _ = json.Marshal(EthPitFileIlkSpotLog)
|
|
|
|
var PitFileIlkSpotModel = ilk2.PitFileIlkModel{
|
2019-01-28 22:52:47 +00:00
|
|
|
Ilk: "0x66616b6520696c6b000000000000000000000000000000000000000000000000",
|
2018-08-29 14:12:29 +00:00
|
|
|
What: "spot",
|
2018-11-14 22:33:29 +00:00
|
|
|
Data: "0.000000000000001000000000000",
|
|
|
|
LogIndex: EthPitFileIlkSpotLog.Index,
|
|
|
|
TransactionIndex: EthPitFileIlkSpotLog.TxIndex,
|
|
|
|
Raw: rawPitFileIlkSpotLog,
|
2018-09-05 14:24:28 +00:00
|
|
|
}
|