Correct V0/V1 contract def, adjust namespace tests (#4477)
* Correct V0/V1 contract def, adjust namespace tests * Some failures * V0 -> V1 conversion with name as Text[] * CHANGELOG
This commit is contained in:
@@ -63,6 +63,12 @@ const spec = {
|
||||
args: 'Vec<ContractMessageParamSpecV0>',
|
||||
docs: 'Vec<Text>'
|
||||
},
|
||||
ContractConstructorSpecV1: {
|
||||
name: 'Vec<Text>',
|
||||
selector: 'ContractSelector',
|
||||
args: 'Vec<ContractMessageParamSpecV0>',
|
||||
docs: 'Vec<Text>'
|
||||
},
|
||||
ContractConstructorSpecV2: {
|
||||
label: 'Text',
|
||||
selector: 'ContractSelector',
|
||||
@@ -82,6 +88,12 @@ const spec = {
|
||||
events: 'Vec<ContractEventSpecV0>',
|
||||
docs: 'Vec<Text>'
|
||||
},
|
||||
ContractContractSpecV1: {
|
||||
constructors: 'Vec<ContractConstructorSpecV1>',
|
||||
messages: 'Vec<ContractMessageSpecV1>',
|
||||
events: 'Vec<ContractEventSpecV1>',
|
||||
docs: 'Vec<Text>'
|
||||
},
|
||||
ContractContractSpecV2: {
|
||||
constructors: 'Vec<ContractConstructorSpecV2>',
|
||||
messages: 'Vec<ContractMessageSpecV2>',
|
||||
@@ -112,6 +124,11 @@ const spec = {
|
||||
args: 'Vec<ContractEventParamSpecV0>',
|
||||
docs: 'Vec<Text>'
|
||||
},
|
||||
ContractEventSpecV1: {
|
||||
name: 'Text',
|
||||
args: 'Vec<ContractEventParamSpecV0>',
|
||||
docs: 'Vec<Text>'
|
||||
},
|
||||
ContractEventSpecV2: {
|
||||
label: 'Text',
|
||||
args: 'Vec<ContractEventParamSpecV2>',
|
||||
@@ -134,6 +151,15 @@ const spec = {
|
||||
returnType: 'Option<ContractTypeSpec>',
|
||||
docs: 'Vec<Text>'
|
||||
},
|
||||
ContractMessageSpecV1: {
|
||||
name: 'Vec<Text>',
|
||||
selector: 'ContractSelector',
|
||||
mutates: 'bool',
|
||||
payable: 'bool',
|
||||
args: 'Vec<ContractMessageParamSpecV0>',
|
||||
returnType: 'Option<ContractTypeSpec>',
|
||||
docs: 'Vec<Text>'
|
||||
},
|
||||
ContractMessageSpecV2: {
|
||||
label: 'Text',
|
||||
selector: 'ContractSelector',
|
||||
@@ -157,7 +183,7 @@ const ContractMetadataV0 = {
|
||||
|
||||
const ContractMetadataV1 = {
|
||||
types: 'Vec<PortableType>',
|
||||
spec: 'ContractContractSpecV0'
|
||||
spec: 'ContractContractSpecV1'
|
||||
};
|
||||
|
||||
const ContractMetadataV2 = {
|
||||
|
||||
@@ -17,6 +17,14 @@ export interface ContractConstructorSpecV0 extends Struct {
|
||||
readonly docs: Vec<Text>;
|
||||
}
|
||||
|
||||
/** @name ContractConstructorSpecV1 */
|
||||
export interface ContractConstructorSpecV1 extends Struct {
|
||||
readonly name: Vec<Text>;
|
||||
readonly selector: ContractSelector;
|
||||
readonly args: Vec<ContractMessageParamSpecV0>;
|
||||
readonly docs: Vec<Text>;
|
||||
}
|
||||
|
||||
/** @name ContractConstructorSpecV2 */
|
||||
export interface ContractConstructorSpecV2 extends Struct {
|
||||
readonly label: Text;
|
||||
@@ -42,6 +50,14 @@ export interface ContractContractSpecV0 extends Struct {
|
||||
readonly docs: Vec<Text>;
|
||||
}
|
||||
|
||||
/** @name ContractContractSpecV1 */
|
||||
export interface ContractContractSpecV1 extends Struct {
|
||||
readonly constructors: Vec<ContractConstructorSpecV1>;
|
||||
readonly messages: Vec<ContractMessageSpecV1>;
|
||||
readonly events: Vec<ContractEventSpecV1>;
|
||||
readonly docs: Vec<Text>;
|
||||
}
|
||||
|
||||
/** @name ContractContractSpecV2 */
|
||||
export interface ContractContractSpecV2 extends Struct {
|
||||
readonly constructors: Vec<ContractConstructorSpecV2>;
|
||||
@@ -101,6 +117,13 @@ export interface ContractEventSpecV0 extends Struct {
|
||||
readonly docs: Vec<Text>;
|
||||
}
|
||||
|
||||
/** @name ContractEventSpecV1 */
|
||||
export interface ContractEventSpecV1 extends Struct {
|
||||
readonly name: Text;
|
||||
readonly args: Vec<ContractEventParamSpecV0>;
|
||||
readonly docs: Vec<Text>;
|
||||
}
|
||||
|
||||
/** @name ContractEventSpecV2 */
|
||||
export interface ContractEventSpecV2 extends Struct {
|
||||
readonly label: Text;
|
||||
@@ -185,6 +208,17 @@ export interface ContractMessageSpecV0 extends Struct {
|
||||
readonly docs: Vec<Text>;
|
||||
}
|
||||
|
||||
/** @name ContractMessageSpecV1 */
|
||||
export interface ContractMessageSpecV1 extends Struct {
|
||||
readonly name: Vec<Text>;
|
||||
readonly selector: ContractSelector;
|
||||
readonly mutates: bool;
|
||||
readonly payable: bool;
|
||||
readonly args: Vec<ContractMessageParamSpecV0>;
|
||||
readonly returnType: Option<ContractTypeSpec>;
|
||||
readonly docs: Vec<Text>;
|
||||
}
|
||||
|
||||
/** @name ContractMessageSpecV2 */
|
||||
export interface ContractMessageSpecV2 extends Struct {
|
||||
readonly label: Text;
|
||||
@@ -221,7 +255,7 @@ export interface ContractMetadataV0 extends Struct {
|
||||
/** @name ContractMetadataV1 */
|
||||
export interface ContractMetadataV1 extends Struct {
|
||||
readonly types: Vec<PortableType>;
|
||||
readonly spec: ContractContractSpecV0;
|
||||
readonly spec: ContractContractSpecV1;
|
||||
}
|
||||
|
||||
/** @name ContractMetadataV2 */
|
||||
|
||||
Reference in New Issue
Block a user