82fd73ba3f
- Delete header on conflict to prompt data refresh (cascade deletes all data associated with that block) - Derive header hash from rpc payload rather than computing it from data (prevents hash mismatch between blockchain and cache)
40 lines
1.7 KiB
Go
40 lines
1.7 KiB
Go
package test_data
|
|
|
|
import (
|
|
"encoding/json"
|
|
"github.com/ethereum/go-ethereum/common"
|
|
"github.com/ethereum/go-ethereum/common/hexutil"
|
|
"github.com/ethereum/go-ethereum/core/types"
|
|
"github.com/vulcanize/vulcanizedb/pkg/fakes"
|
|
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
|
"github.com/vulcanize/vulcanizedb/pkg/transformers/vat_toll"
|
|
"math/big"
|
|
)
|
|
|
|
var EthVatTollLog = types.Log{
|
|
Address: common.HexToAddress(constants.VatContractAddress),
|
|
Topics: []common.Hash{
|
|
common.HexToHash("0x09b7a0b500000000000000000000000000000000000000000000000000000000"),
|
|
common.HexToHash("0x66616b6520696c6b000000000000000000000000000000000000000000000000"),
|
|
common.HexToHash("0xa3e37186e017747dba34042e83e3f76ad3cce9b0000000000000000000000000"),
|
|
common.HexToHash("0x00000000000000000000000000000000000000000000000000000000075bcd15"),
|
|
},
|
|
Data: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006409b7a0b566616b6520696c6b000000000000000000000000000000000000000000000000a3e37186e017747dba34042e83e3f76ad3cce9b000000000000000000000000000000000000000000000000000000000000000000000000000000000075bcd15"),
|
|
BlockNumber: 21,
|
|
TxHash: common.HexToHash("0x0d59cb158b033ffdfb9a021d1e80bfbbcd99594c62c501897ccee446bcd33828"),
|
|
TxIndex: 2,
|
|
BlockHash: fakes.FakeHash,
|
|
Index: 4,
|
|
Removed: false,
|
|
}
|
|
|
|
var rawVatTollLog, _ = json.Marshal(EthVatTollLog)
|
|
var VatTollModel = vat_toll.VatTollModel{
|
|
Ilk: "fake ilk",
|
|
Urn: "0xA3E37186E017747DbA34042e83e3F76Ad3CcE9b0",
|
|
Take: big.NewInt(123456789).String(),
|
|
TransactionIndex: EthVatTollLog.TxIndex,
|
|
LogIndex: EthVatTollLog.Index,
|
|
Raw: rawVatTollLog,
|
|
}
|