Fix & convert e2e tests (#1167)

* split off rx-query tests

* Split off promise-rx tests

* use funded bob_stash for alex

* Fixed transfer e2e tests pt. 1

* wip era tx

* split derive promises

* delete outdated e2e metadata tests

* add randomAsHex test files

* WIP

* tslint

* add index file to e2e util

* rx-tx tests

* eslint types

* linting

* contract ? storage tests

* promise-contract tests

* fix lint errors after merge

* re-implement lost merge changes

* Only support recent ink versions

* child-storage tests

* Add e2e tests for storage input type

* All tests passing for rpc-core

* linting

* wrong file path

* remove old contract files & change folder name

* added larger random as hex files
This commit is contained in:
Stefanie Doll
2019-07-31 16:47:12 +02:00
committed by GitHub
parent dc5d71c16a
commit 7a08b37ec3
48 changed files with 912 additions and 848 deletions
+9
View File
@@ -0,0 +1,9 @@
A breaking change was introduced by substrate runtime spec_version 97. https://github.com/paritytech/substrate/pull/2911/files
The change had to be implemented in ink! which changed the structure of the Wasm files.
The Polkadot JS API is only supporting srml-contract and INK! versions after than spec_version 97.
**Compatibility**
If the substrate version is older than this https://github.com/paritytech/substrate/pull/2911 it will only work
with contracts generated by an ink! version prior to https://github.com/paritytech/ink/pull/129 and vice versa.
@@ -0,0 +1 @@
{"name":"Erc20","deploy":{"args":[{"name":"init_value","type":"Balance"}]},"messages":[{"name":"total_supply","selector":949181842,"mutates":false,"args":[],"return_type":"Balance"},{"name":"balance_of","selector":3827153702,"mutates":false,"args":[{"name":"owner","type":"AccountId"}],"return_type":"Balance"},{"name":"allowance","selector":3057219184,"mutates":false,"args":[{"name":"owner","type":"AccountId"},{"name":"spender","type":"AccountId"}],"return_type":"Balance"},{"name":"transfer","selector":3374842663,"mutates":true,"args":[{"name":"to","type":"AccountId"},{"name":"value","type":"Balance"}],"return_type":"bool"},{"name":"approve","selector":431186122,"mutates":true,"args":[{"name":"spender","type":"AccountId"},{"name":"value","type":"Balance"}],"return_type":"bool"},{"name":"transfer_from","selector":197482595,"mutates":true,"args":[{"name":"from","type":"AccountId"},{"name":"to","type":"AccountId"},{"name":"value","type":"Balance"}],"return_type":"bool"}]}
@@ -0,0 +1 @@
{"name":"Flipper","deploy":{"args":[]},"messages":[{"name":"flip","selector":970692492,"mutates":true,"args":[],"return_type":null},{"name":"get","selector":4266279973,"mutates":false,"args":[],"return_type":"bool"}]}
@@ -0,0 +1 @@
{"name":"Incrementer","deploy":{"args":[{"name":"init_value","type":"u32"}]},"messages":[{"name":"inc","selector":257544423,"mutates":true,"args":[{"name":"by","type":"u32"}],"return_type":null},{"name":"get","selector":4266279973,"mutates":false,"args":[],"return_type":"u32"},{"name":"compare","selector":363906316,"mutates":false,"args":[{"name":"with","type":"u32"}],"return_type":"bool"}]}
@@ -0,0 +1 @@
{"name":"SharedVec","deploy":{"args":[]},"messages":[{"name":"push","selector":865577567,"mutates":true,"args":[{"name":"value","type":"i32"}],"return_type":{"Result<T,E>":{"T":[],"E":"u32"}}},{"name":"register","selector":572030971,"mutates":true,"args":[{"name":"mutator","type":"AccountId"},{"name":"begin","type":{"Option<T>":{"T":"u32"}}},{"name":"end","type":{"Option<T>":{"T":"u32"}}}],"return_type":{"Result<T,E>":{"T":[],"E":"u32"}}},{"name":"set","selector":2028185770,"mutates":true,"args":[{"name":"at","type":"u32"},{"name":"to","type":"i32"}],"return_type":{"Result<T,E>":{"T":"i32","E":"u32"}}},{"name":"get","selector":4266279973,"mutates":false,"args":[{"name":"at","type":"u32"}],"return_type":{"Option<T>":{"T":"i32"}}},{"name":"len","selector":1403873684,"mutates":false,"args":[],"return_type":"u32"}]}
@@ -1,100 +0,0 @@
{
"name": "Erc20",
"deploy": {
"args": [
{
"name": "init_value",
"type": "Balance"
}
]
},
"messages": [
{
"name": "total_supply",
"selector": 949181842,
"mutates": false,
"args": [],
"return_type": "Balance"
},
{
"name": "balance_of",
"selector": 3827153702,
"mutates": false,
"args": [
{
"name": "owner",
"type": "Address"
}
],
"return_type": "Balance"
},
{
"name": "allowance",
"selector": 3057219184,
"mutates": false,
"args": [
{
"name": "owner",
"type": "Address"
},
{
"name": "spender",
"type": "Address"
}
],
"return_type": "Balance"
},
{
"name": "transfer",
"selector": 3374842663,
"mutates": true,
"args": [
{
"name": "to",
"type": "Address"
},
{
"name": "value",
"type": "Balance"
}
],
"return_type": "bool"
},
{
"name": "approve",
"selector": 431186122,
"mutates": true,
"args": [
{
"name": "spender",
"type": "Address"
},
{
"name": "value",
"type": "Balance"
}
],
"return_type": "bool"
},
{
"name": "transfer_from",
"selector": 197482595,
"mutates": true,
"args": [
{
"name": "from",
"type": "Address"
},
{
"name": "to",
"type": "Address"
},
{
"name": "value",
"type": "Balance"
}
],
"return_type": "bool"
}
]
}
Binary file not shown.
@@ -1,22 +0,0 @@
{
"name": "Flipper",
"deploy": {
"args": []
},
"messages": [
{
"name": "flip",
"selector": 970692492,
"mutates": true,
"args": [],
"return_type": null
},
{
"name": "get",
"selector": 4266279973,
"mutates": false,
"args": [],
"return_type": "bool"
}
]
}
@@ -1,44 +0,0 @@
{
"name": "Incrementer",
"deploy": {
"args": [
{
"name": "init_value",
"type": "u32"
}
]
},
"messages": [
{
"name": "inc",
"selector": 257544423,
"mutates": true,
"args": [
{
"name": "by",
"type": "u32"
}
],
"return_type": null
},
{
"name": "get",
"selector": 4266279973,
"mutates": false,
"args": [],
"return_type": "u32"
},
{
"name": "compare",
"selector": 363906316,
"mutates": false,
"args": [
{
"name": "with",
"type": "u32"
}
],
"return_type": "bool"
}
]
}
@@ -1,102 +0,0 @@
{
"name": "SharedVec",
"deploy": {
"args": []
},
"messages": [
{
"name": "push",
"selector": 865577567,
"mutates": true,
"args": [
{
"name": "value",
"type": "i32"
}
],
"return_type": {
"Result<T,E>": {
"T": [],
"E": "u32"
}
}
},
{
"name": "register",
"selector": 572030971,
"mutates": true,
"args": [
{
"name": "mutator",
"type": "AccountId"
},
{
"name": "begin",
"type": {
"Option<T>": {
"T": "u32"
}
}
},
{
"name": "end",
"type": {
"Option<T>": {
"T": "u32"
}
}
}
],
"return_type": {
"Result<T,E>": {
"T": [],
"E": "u32"
}
}
},
{
"name": "set",
"selector": 2028185770,
"mutates": true,
"args": [
{
"name": "at",
"type": "u32"
},
{
"name": "to",
"type": "i32"
}
],
"return_type": {
"Result<T,E>": {
"T": "i32",
"E": "u32"
}
}
},
{
"name": "get",
"selector": 4266279973,
"mutates": false,
"args": [
{
"name": "at",
"type": "u32"
}
],
"return_type": {
"Option<T>": {
"T": "i32"
}
}
},
{
"name": "len",
"selector": 1403873684,
"mutates": false,
"args": [],
"return_type": "u32"
}
]
}