Change genesis preserving contract history (#1076)

* preserve contract created date on genesis import and add query contract created date

* add validate created

* fix sims test app import export

* add preserve contract history

* Make proto-all only

* Remove ResetFromGenesis

* Add validation

Co-authored-by: Alex Peters <alpe@users.noreply.github.com>
This commit is contained in:
GNaD13
2022-11-11 15:45:40 +07:00
committed by GitHub
parent 5caaab9c0b
commit 4c6afb38eb
19 changed files with 390 additions and 172 deletions

View File

@@ -53,6 +53,8 @@ message Contract {
string contract_address = 1;
ContractInfo contract_info = 2 [ (gogoproto.nullable) = false ];
repeated Model contract_state = 3 [ (gogoproto.nullable) = false ];
repeated ContractCodeHistoryEntry contract_code_history = 4
[ (gogoproto.nullable) = false ];
}
// Sequence key and value of an id generation counter

View File

@@ -84,8 +84,6 @@ message ContractInfo {
// Label is optional metadata to be stored with a contract instance.
string label = 4;
// Created Tx position when the contract was instantiated.
// This data should kept internal and not be exposed via query results. Just
// use for sorting
AbsoluteTxPosition created = 5;
string ibc_port_id = 6 [ (gogoproto.customname) = "IBCPortID" ];