Documentation ¶
Index ¶
- Constants
- Variables
- func BadJSONConfFile(t *testing.T) string
- func Call(t testing.TB, cli TransactClient, inputAddress, contractAddress crypto.Address, ...) *exec.TxExecution
- func CallAddEvent(t testing.TB, cli TransactClient, inputAddress, contractAddress crypto.Address, ...) *exec.TxExecution
- func CallAddEvents(t testing.TB, cli TransactClient, inputAddress, contractAddress crypto.Address, ...) *exec.TxExecution
- func CallRemoveEvent(t testing.TB, cli TransactClient, inputAddress, contractAddress crypto.Address, ...) *exec.TxExecution
- func CallRemoveEvents(t testing.TB, cli TransactClient, inputAddress, contractAddress crypto.Address, ...) *exec.TxExecution
- func CreateContract(t testing.TB, cli TransactClient, inputAddress crypto.Address) *exec.TxExecution
- func DuplicatedColNameJSONConfFile(t *testing.T) string
- func GoodJSONConfFile(t *testing.T) string
- func MissingFieldsJSONConfFile(t *testing.T) string
- func NewBurrowTransactClient(t testing.TB, listenAddress string) rpctransact.TransactClient
- func NewTestDB(t *testing.T, cfg *config.VentConfig) (*sqldb.SQLDB, func())
- func PostgresVentConfig(chainAddress string) *config.VentConfig
- func SqliteVentConfig(grpcAddress string) *config.VentConfig
- func UnknownTypeJSONConfFile(t *testing.T) string
- type TransactClient
Constants ¶
View Source
const ( ChainID = "CHAIN_123" BurrowVersion = "1.0.0" )
Variables ¶
View Source
var Abi_EventsTest = []byte(`[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"name","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"key","type":"bytes32"},{"indexed":false,"internalType":"int256","name":"__DELETE__","type":"int256"}],"name":"DeleteTestEvents","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"name","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"key","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"description","type":"bytes32"}],"name":"UpdateTestEvents","type":"event"},{"constant":false,"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_description","type":"string"}],"name":"addThing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_description","type":"string"}],"name":"addThings","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"count","outputs":[{"internalType":"int256","name":"size","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"string","name":"_name","type":"string"}],"name":"description","outputs":[{"internalType":"string","name":"_description","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"_name","type":"string"}],"name":"removeThing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"_name","type":"string"}],"name":"removeThings","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]`)
View Source
var Bytecode_EventsTest = hex.MustDecodeString("608060405234801561001057600080fd5b50610d60806100206000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806306661abd146100675780632cda56b01461008557806388255199146100fe578063c1de9c6d146101f0578063d4a0c25314610269578063dc667a6214610337575b600080fd5b61006f610405565b6040518082815260200191505060405180910390f35b6100fc6004803603602081101561009b57600080fd5b81019080803590602001906401000000008111156100b857600080fd5b8201836020820111156100ca57600080fd5b803590602001918460018302840111640100000000831117156100ec57600080fd5b909192939192939050505061040e565b005b6101756004803603602081101561011457600080fd5b810190808035906020019064010000000081111561013157600080fd5b82018360208201111561014357600080fd5b8035906020019184600183028401116401000000008311171561016557600080fd5b9091929391929390505050610612565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101b557808201518184015260208101905061019a565b50505050905090810190601f1680156101e25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102676004803603602081101561020657600080fd5b810190808035906020019064010000000081111561022357600080fd5b82018360208201111561023557600080fd5b8035906020019184600183028401116401000000008311171561025757600080fd5b90919293919293905050506106df565b005b6103356004803603604081101561027f57600080fd5b810190808035906020019064010000000081111561029c57600080fd5b8201836020820111156102ae57600080fd5b803590602001918460018302840111640100000000831117156102d057600080fd5b9091929391929390803590602001906401000000008111156102f157600080fd5b82018360208201111561030357600080fd5b8035906020019184600183028401116401000000008311171561032557600080fd5b909192939192939050505061083d565b005b6104036004803603604081101561034d57600080fd5b810190808035906020019064010000000081111561036a57600080fd5b82018360208201111561037c57600080fd5b8035906020019184600183028401116401000000008311171561039e57600080fd5b9091929391929390803590602001906401000000008111156103bf57600080fd5b8201836020820111156103d157600080fd5b803590602001918460018302840111640100000000831117156103f357600080fd5b9091929391929390505050610aaa565b005b60008054905090565b600060018383604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff161561060d576000808154809291906001900391905055506001838360405180838380828437808301925050509250505090815260200160405180910390206000808201600061049a9190610c3e565b6001820160006104aa9190610c3e565b6002820160006101000a81549060ff021916905550507f544553545f4556454e545300000000000000000000000000000000000000000061052e84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a37f544553545f4556454e54530000000000000000000000000000000000000000006105d484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a35b505050565b60606001838360405180838380828437808301925050509250505090815260200160405180910390206001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106d25780601f106106a7576101008083540402835291602001916106d2565b820191906000526020600020905b8154815290600101906020018083116106b557829003601f168201915b5050505050905092915050565b600060018383604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff1615610838576000808154809291906001900391905055506001838360405180838380828437808301925050509250505090815260200160405180910390206000808201600061076b9190610c3e565b60018201600061077b9190610c3e565b6002820160006101000a81549060ff021916905550507f544553545f4556454e54530000000000000000000000000000000000000000006107ff84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a35b505050565b600060018585604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff166108905760008081548092919060010191905055505b84848260000191906108a3929190610c86565b5082828260010191906108b7929190610c86565b5060018160020160006101000a81548160ff02191690831515021790555061092283838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f544553545f4556454e545300000000000000000000000000000000000000000061099087878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a4610a0983838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f544553545f4556454e5453000000000000000000000000000000000000000000610a7787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a45050505050565b600060018585604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff16610afd5760008081548092919060010191905055505b8484826000019190610b10929190610c86565b508282826001019190610b24929190610c86565b5060018160020160006101000a81548160ff021916908315150217905550610b8f83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f544553545f4556454e5453000000000000000000000000000000000000000000610bfd87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a45050505050565b600060208201519050919050565b50805460018160011615610100020316600290046000825580601f10610c645750610c83565b601f016020900490600052602060002090810190610c829190610d06565b5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610cc757803560ff1916838001178555610cf5565b82800160010185558215610cf5579182015b82811115610cf4578235825591602001919060010190610cd9565b5b509050610d029190610d06565b5090565b610d2891905b80821115610d24576000816000905550600101610d0c565b5090565b9056fea265627a7a7231582037a3c7c8ba676a276ddc3da8ddd95f44bd6f991d5f52bb69c956d60c2eafffeb64736f6c634300050f0032")
View Source
var DeployedBytecode_EventsTest = hex.MustDecodeString("608060405234801561001057600080fd5b50600436106100625760003560e01c806306661abd146100675780632cda56b01461008557806388255199146100fe578063c1de9c6d146101f0578063d4a0c25314610269578063dc667a6214610337575b600080fd5b61006f610405565b6040518082815260200191505060405180910390f35b6100fc6004803603602081101561009b57600080fd5b81019080803590602001906401000000008111156100b857600080fd5b8201836020820111156100ca57600080fd5b803590602001918460018302840111640100000000831117156100ec57600080fd5b909192939192939050505061040e565b005b6101756004803603602081101561011457600080fd5b810190808035906020019064010000000081111561013157600080fd5b82018360208201111561014357600080fd5b8035906020019184600183028401116401000000008311171561016557600080fd5b9091929391929390505050610612565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101b557808201518184015260208101905061019a565b50505050905090810190601f1680156101e25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102676004803603602081101561020657600080fd5b810190808035906020019064010000000081111561022357600080fd5b82018360208201111561023557600080fd5b8035906020019184600183028401116401000000008311171561025757600080fd5b90919293919293905050506106df565b005b6103356004803603604081101561027f57600080fd5b810190808035906020019064010000000081111561029c57600080fd5b8201836020820111156102ae57600080fd5b803590602001918460018302840111640100000000831117156102d057600080fd5b9091929391929390803590602001906401000000008111156102f157600080fd5b82018360208201111561030357600080fd5b8035906020019184600183028401116401000000008311171561032557600080fd5b909192939192939050505061083d565b005b6104036004803603604081101561034d57600080fd5b810190808035906020019064010000000081111561036a57600080fd5b82018360208201111561037c57600080fd5b8035906020019184600183028401116401000000008311171561039e57600080fd5b9091929391929390803590602001906401000000008111156103bf57600080fd5b8201836020820111156103d157600080fd5b803590602001918460018302840111640100000000831117156103f357600080fd5b9091929391929390505050610aaa565b005b60008054905090565b600060018383604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff161561060d576000808154809291906001900391905055506001838360405180838380828437808301925050509250505090815260200160405180910390206000808201600061049a9190610c3e565b6001820160006104aa9190610c3e565b6002820160006101000a81549060ff021916905550507f544553545f4556454e545300000000000000000000000000000000000000000061052e84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a37f544553545f4556454e54530000000000000000000000000000000000000000006105d484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a35b505050565b60606001838360405180838380828437808301925050509250505090815260200160405180910390206001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106d25780601f106106a7576101008083540402835291602001916106d2565b820191906000526020600020905b8154815290600101906020018083116106b557829003601f168201915b5050505050905092915050565b600060018383604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff1615610838576000808154809291906001900391905055506001838360405180838380828437808301925050509250505090815260200160405180910390206000808201600061076b9190610c3e565b60018201600061077b9190610c3e565b6002820160006101000a81549060ff021916905550507f544553545f4556454e54530000000000000000000000000000000000000000006107ff84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a35b505050565b600060018585604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff166108905760008081548092919060010191905055505b84848260000191906108a3929190610c86565b5082828260010191906108b7929190610c86565b5060018160020160006101000a81548160ff02191690831515021790555061092283838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f544553545f4556454e545300000000000000000000000000000000000000000061099087878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a4610a0983838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f544553545f4556454e5453000000000000000000000000000000000000000000610a7787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a45050505050565b600060018585604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff16610afd5760008081548092919060010191905055505b8484826000019190610b10929190610c86565b508282826001019190610b24929190610c86565b5060018160020160006101000a81548160ff021916908315150217905550610b8f83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f544553545f4556454e5453000000000000000000000000000000000000000000610bfd87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c30565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a45050505050565b600060208201519050919050565b50805460018160011615610100020316600290046000825580601f10610c645750610c83565b601f016020900490600052602060002090810190610c829190610d06565b5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610cc757803560ff1916838001178555610cf5565b82800160010185558215610cf5579182015b82811115610cf4578235825591602001919060010190610cd9565b5b509050610d029190610d06565b5090565b610d2891905b80821115610d24576000816000905550600101610d0c565b5090565b9056fea265627a7a7231582037a3c7c8ba676a276ddc3da8ddd95f44bd6f991d5f52bb69c956d60c2eafffeb64736f6c634300050f0032")
Functions ¶
func BadJSONConfFile ¶
BadJSONConfFile sets a malformed json file to be used in projection tests
func Call ¶
func Call(t testing.TB, cli TransactClient, inputAddress, contractAddress crypto.Address, functionName string, args ...interface{}) *exec.TxExecution
func CallAddEvent ¶
func CallAddEvent(t testing.TB, cli TransactClient, inputAddress, contractAddress crypto.Address, name, description string) *exec.TxExecution
func CallAddEvents ¶ added in v0.34.4
func CallAddEvents(t testing.TB, cli TransactClient, inputAddress, contractAddress crypto.Address, name, description string) *exec.TxExecution
func CallRemoveEvent ¶
func CallRemoveEvent(t testing.TB, cli TransactClient, inputAddress, contractAddress crypto.Address, name string) *exec.TxExecution
func CallRemoveEvents ¶ added in v0.34.4
func CallRemoveEvents(t testing.TB, cli TransactClient, inputAddress, contractAddress crypto.Address, name string) *exec.TxExecution
func CreateContract ¶
func CreateContract(t testing.TB, cli TransactClient, inputAddress crypto.Address) *exec.TxExecution
func DuplicatedColNameJSONConfFile ¶
DuplicatedColNameJSONConfFile sets a good json file but with duplicated column names for a given table
func GoodJSONConfFile ¶
GoodJSONConfFile sets a good json file to be used in projection tests
func MissingFieldsJSONConfFile ¶
MissingFieldsJSONConfFile sets a json file with missing fields to be used in projection tests
func NewBurrowTransactClient ¶ added in v0.34.4
func NewBurrowTransactClient(t testing.TB, listenAddress string) rpctransact.TransactClient
func PostgresVentConfig ¶
func PostgresVentConfig(chainAddress string) *config.VentConfig
func SqliteVentConfig ¶
func SqliteVentConfig(grpcAddress string) *config.VentConfig
func UnknownTypeJSONConfFile ¶
UnknownTypeJSONConfFile sets a json file with unknown column types to be used in projection tests
Types ¶
type TransactClient ¶ added in v0.34.4
type TransactClient interface {
CallTxSync(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*exec.TxExecution, error)
}
Click to show internal directories.
Click to hide internal directories.