Skip to content

Commit

Permalink
feat(Lima): Lima compatibility (#683)
Browse files Browse the repository at this point in the history
* feat(Lima): Create Lima branch

* feat(Compiler): Compiler 4.0.0 compatibility (#632)

* feat(newCompiler): Increase compiler version. Add `backend` option to compiler API

* fix(TX): Add fate vm version

* feat(Contract): Make Contract works with node 5.0.0 rc1 (lima hard-fork) and compiler 4.0.0 rc2

* chore(test): Debug channel test

* fix(channel): fix contract in channel test

* chore(test): Remove logs

* feat(ACI): Add `payable` to contract call

* feat(ACI): Add test for payable

* fix(Linter): Fix linter error

* feat(Compiler): Point to compiler 3.2.0. Improve `payble` to support old compiler

* feat(Compiler): disable payable test

* feat(Lima): Point compiler to 4.0.0. Enable tests for `payable`

* feat(Lima): Make contact for channel test payable

* chore(test): Enable tests

* feat(Contract/ACI): Add ability to use contract with external deps(`include "someLib"`) (#653)

* docs(Contract): Adjust contract docs (#658)

* Release 4.7.0-next.1 (#660)

* chore(release): Generate CHANGELOG. Bump version

* chore(test): Test backward compatibility

* chore(test): revert

* feat(SCHEMA): Add fate constants

* chore(release): bump version to 5.0.0-next.1

* feat(Lima): add check for compiler <-> consensus protocol version check

* feat(Lima): add check for abi/vm <-> backend(FATE/AEVM) (#680)

* feat(Lima): add check for abi/vm <-> backend(FATE/AEVM)

* feat(Lima): add check for abi/vm <-> backend(FATE/AEVM)

* feat(Contract): Add fate tests

* feat(Contract): enable all tests

* feat(Node): Add check in dry-run endpoint(node cross compatibility)

* feat(Contract): enable all tests

* feat(Contract): enable all tests

* feat(Contract): fix docker file run command

* feat(Swagger): Resolve refs

* feat(tests): Skip Channel and AENS

* feat(Node): Change compatibility range from 4.x.x to 5.x.x

* feat(Node): Change compatibility range from 4.x.x to 6.0.0

* fix(Oracle): fix abi field resolving

* chrome(build): Regenerate lock

* feat(Compiler): make FATE by default (#693)

* feat(Contract): Use FATE by default

* feat(AENS): Lima compatibility (#687)

* Aens lima compatibility

* Make aens cross compatible with pre-lima releases

* Remove .only

* Fix native build of claim tx test

* feat(GA): Make GA compatible with Lima. Add cross compiler compatibility

* fix(Test): Fix test for cross compatibility. Add test for AEVM

* fix(AE): Add pointers verification for spend by name. Improve AENS cross node tests

* build(Node): Point node to 5.0.0-rc3

* chore(Test): Test name which not trigger auction

* fix(ACI): Fix compiler options. Fix test for AEVM
  • Loading branch information
nduchak authored Oct 4, 2019
1 parent eded912 commit a88042e
Show file tree
Hide file tree
Showing 28 changed files with 948 additions and 922 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
TAG=v5.0.0-rc.1
COMPILER_TAG=v3.2.0
TAG=v5.0.0-rc.3
COMPILER_TAG=v4.0.0-rc5
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# [4.7.0](https://github.com/aeternity/aepp-sdk-js/compare/2.4.0...4.7.0) (2019-09-11)
# [5.0.0-next.1](https://github.com/aeternity/aepp-sdk-js/compare/4.6.0...4.7.0-next.1) (2019-09-10)


### Bug Fixes

* **package:** update serialize-javascript to version 2.0.0 ([#647](https://github.com/aeternity/aepp-sdk-js/issues/647)) ([1ddb392](https://github.com/aeternity/aepp-sdk-js/commit/1ddb392))


### Features

* **Contract/ACI** Add `payable` feature
* **Compiler:** Compiler 4.0.0 compatibility ([#632](https://github.com/aeternity/aepp-sdk-js/issues/632)) ([d5f1632](https://github.com/aeternity/aepp-sdk-js/commit/d5f1632))
* **Contract/ACI:** Add ability to use contract with external namespaces(`include "someLib"`) ([#653](https://github.com/aeternity/aepp-sdk-js/issues/653)) ([9708b43](https://github.com/aeternity/aepp-sdk-js/commit/9708b43))




# [4.7.0](https://github.com/aeternity/aepp-sdk-js/compare/2.4.0...4.7.0) (2019-09-11)


### Features
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
expose: [3013, 3113, 3014, 3114]
environment:
EPOCH_CONFIG: /home/aeternity/aeternity_node.yaml
command: -aecore expected_mine_rate ${EPOCH_MINE_RATE:-5000}
command: bin/aeternity console -noinput -aecore expected_mine_rate ${EPOCH_MINE_RATE:-5000}
volumes:
- ${PWD}/docker/aeternity_node_mean16.yaml:/home/aeternity/aeternity_node.yaml
- ${PWD}/docker/keys/node:/home/aeternity/node/keys
Expand Down
1 change: 1 addition & 0 deletions docker/aeternity_node_mean16.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ chain:
"1": 0
"2": 2
"3": 4
"4": 6

mining:
autostart: true
Expand Down
115 changes: 61 additions & 54 deletions docs/api/ae/contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ import { Contract } from '@aeternity/aepp-sdk' (Using bundle)
```

* [@aeternity/aepp-sdk/es/ae/contract](#module_@aeternity/aepp-sdk/es/ae/contract)
* [exports.Contract([options])](#exp_module_@aeternity/aepp-sdk/es/ae/contract--exports.Contract)`Object`
* [exports.ContractAPI([options])](#exp_module_@aeternity/aepp-sdk/es/ae/contract--exports.ContractAPI)`Object`
* _async_
* [handleCallError(result)](#exp_module_@aeternity/aepp-sdk/es/ae/contract--handleCallError)`Promise.&lt;void&gt;`
* [contractEncodeCall(source, name, args)](#exp_module_@aeternity/aepp-sdk/es/ae/contract--contractEncodeCall)`Promise.&lt;String&gt;`
* [contractDecodeData(source, fn, callValue, callResult, options)](#exp_module_@aeternity/aepp-sdk/es/ae/contract--contractDecodeData)`Promise.&lt;String&gt;`
* [contractCallStatic(source, address, name, args, options, top, options)](#exp_module_@aeternity/aepp-sdk/es/ae/contract--contractCallStatic)`Promise.&lt;Object&gt;`
* [contractCall(source, address, name, args, options)](#exp_module_@aeternity/aepp-sdk/es/ae/contract--contractCall)`Promise.&lt;Object&gt;`
* [contractDeploy(code, source, initState, options)](#exp_module_@aeternity/aepp-sdk/es/ae/contract--contractDeploy)`Promise.&lt;Object&gt;`
* [contractCompile(source, options)](#exp_module_@aeternity/aepp-sdk/es/ae/contract--contractCompile)`Promise.&lt;Object&gt;`
* [contractEncodeCall(source, name, args, [options])](#exp_module_@aeternity/aepp-sdk/es/ae/contract--contractEncodeCall)`Promise.&lt;String&gt;`
* [contractDecodeData(source, fn, callValue, callResult, [options])](#exp_module_@aeternity/aepp-sdk/es/ae/contract--contractDecodeData)`Promise.&lt;String&gt;`
* [contractCallStatic(source, address, name, args, [options], bytecode, options, filesystem)](#exp_module_@aeternity/aepp-sdk/es/ae/contract--contractCallStatic)`Promise.&lt;Object&gt;`
* [contractCall(source, address, name, args, [options])](#exp_module_@aeternity/aepp-sdk/es/ae/contract--contractCall)
* [contractDeploy(code, source, initState, [options])](#exp_module_@aeternity/aepp-sdk/es/ae/contract--contractDeploy)`Promise.&lt;Object&gt;`
* [contractCompile(source, [options])](#exp_module_@aeternity/aepp-sdk/es/ae/contract--contractCompile)`Promise.&lt;Object&gt;`

<a id="exp_module_@aeternity/aepp-sdk/es/ae/contract--exports.Contract"></a>
<a id="exp_module_@aeternity/aepp-sdk/es/ae/contract--exports.ContractAPI"></a>

### exports.Contract([options]) ⇒ `Object`
### exports.ContractAPI([options]) ⇒ `Object`
Contract Stamp

Provide contract implementation
Expand Down Expand Up @@ -80,57 +80,62 @@ Handle contract call error
<a id="exp_module_@aeternity/aepp-sdk/es/ae/contract--contractEncodeCall"></a>
### contractEncodeCall(source, name, args) ⇒ `Promise.&lt;String&gt;` ⏏
### contractEncodeCall(source, name, args, [options]) ⇒ `Promise.&lt;String&gt;` ⏏
Encode call data for contract call
**Kind**: Exported function
**Category**: async
| Param | Type | Description |
| --- | --- | --- |
| source | `String` | Contract source code |
| name | `String` | Name of function to call |
| args | `Array` | Argument's for call |
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| source | `String` | | Contract source code |
| name | `String` | | Name of function to call |
| args | `Array` | | Argument's for call |
| [options] | `Object` | <code>{}</code> | Options |
| [options.filesystem] | `Object` | <code>{}</code> | Contract external namespaces map |

<a id="exp_module_@aeternity/aepp-sdk/es/ae/contract--contractDecodeData"></a>

### contractDecodeData(source, fn, callValue, callResult, options) ⇒ `Promise.&lt;String&gt;`
### contractDecodeData(source, fn, callValue, callResult, [options]) ⇒ `Promise.&lt;String&gt;`
Decode contract call result data

**Kind**: Exported function
**Returns**: `Promise.&lt;String&gt;` - Result object
**Category**: async

| Param | Type | Description |
| --- | --- | --- |
| source | `String` | source code |
| fn | `String` | function name |
| callValue | `String` | result call data |
| callResult | `String` | result status |
| options | | |
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| source | `String` | | source code |
| fn | `String` | | function name |
| callValue | `String` | | result call data |
| callResult | `String` | | result status |
| [options] | `Object` | <code>{}</code> | Options |
| [options.filesystem] | `Object` | <code>{}</code> | Contract external namespaces map |

**Example**
```js
const decodedData = await client.contractDecodeData(SourceCode ,'functionName', 'cb_asdasdasd...', 'ok|revert')lt
```
<a id="exp_module_@aeternity/aepp-sdk/es/ae/contract--contractCallStatic"></a>

### contractCallStatic(source, address, name, args, options, top, options) ⇒ `Promise.&lt;Object&gt;` ⏏
### contractCallStatic(source, address, name, args, [options], bytecode, options, filesystem) ⇒ `Promise.&lt;Object&gt;` ⏏
Static contract call(using dry-run)

**Kind**: Exported function
**Returns**: `Promise.&lt;Object&gt;` - Result object
**Category**: async

| Param | Type | Description |
| --- | --- | --- |
| source | `String` | Contract source code |
| address | `String` | Contract address |
| name | `String` | Name of function to call |
| args | `Array` | Argument's for call function |
| options | `Object` | [options={}] Options |
| top | `String` | [options.top] Block hash on which you want to call contract |
| options | `String` | [options.options] Transaction options (fee, ttl, gas, amount, deposit) |
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| source | `String` | | Contract source code |
| address | `String` | | Contract address |
| name | `String` | | Name of function to call |
| args | `Array` | | Argument's for call function |
| [options] | `Object` | <code>{}</code> | Options |
| [options.top] | `String` | | Block hash on which you want to call contract |
| bytecode | | | |
| options | `String` | | [options.options] Transaction options (fee, ttl, gas, amount, deposit) |
| filesystem | `Object` | | [options.options.filesystem] Contract external namespaces map |

**Example**
```js
Expand All @@ -142,20 +147,20 @@ const callResult = await client.contractCallStatic(source, address, fnName, args
```
<a id="exp_module_@aeternity/aepp-sdk/es/ae/contract--contractCall"></a>

### contractCall(source, address, name, args, options) ⇒ `Promise.&lt;Object&gt;`
### contractCall(source, address, name, args, [options])
Call contract function

**Kind**: Exported function
**Returns**: `Promise.&lt;Object&gt;` - Result object
**Category**: async

| Param | Type | Description |
| --- | --- | --- |
| source | `String` | Contract source code |
| address | `String` | Contract address |
| name | `String` | Name of function to call |
| args | `Array` | Argument's for call function |
| options | `Object` | Transaction options (fee, ttl, gas, amount, deposit) |
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| source | `String` | | Contract source code |
| address | `String` | | Contract address |
| name | `String` | | Name of function to call |
| args | `Array` | | Argument's for call function |
| [options] | `Object` | <code>{}</code> | Transaction options (fee, ttl, gas, amount, deposit) |
| [options.filesystem] | `Object` | <code>{}</code> | Contract external namespaces map* @return {Promise<Object>} Result object |

**Example**
```js
Expand All @@ -168,19 +173,20 @@ const callResult = await client.contractCall(source, address, fnName, args = [],
```
<a id="exp_module_@aeternity/aepp-sdk/es/ae/contract--contractDeploy"></a>

### contractDeploy(code, source, initState, options) ⇒ `Promise.&lt;Object&gt;`
### contractDeploy(code, source, initState, [options]) ⇒ `Promise.&lt;Object&gt;`
Deploy contract to the node

**Kind**: Exported function
**Returns**: `Promise.&lt;Object&gt;` - Result object
**Category**: async

| Param | Type | Description |
| --- | --- | --- |
| code | `String` | Compiled contract |
| source | `String` | Contract source code |
| initState | `Array` | Arguments of contract constructor(init) function |
| options | `Object` | Transaction options (fee, ttl, gas, amount, deposit) |
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| code | `String` | | Compiled contract |
| source | `String` | | Contract source code |
| initState | `Array` | | Arguments of contract constructor(init) function |
| [options] | `Object` | <code>{}</code> | Transaction options (fee, ttl, gas, amount, deposit) |
| [options.filesystem] | `Object` | <code>{}</code> | Contract external namespaces map* @return {Promise<Object>} Result object |

**Example**
```js
Expand All @@ -197,17 +203,18 @@ const deployed = await client.contractDeploy(bytecode, source, init = [], option
```
<a id="exp_module_@aeternity/aepp-sdk/es/ae/contract--contractCompile"></a>

### contractCompile(source, options) ⇒ `Promise.&lt;Object&gt;`
### contractCompile(source, [options]) ⇒ `Promise.&lt;Object&gt;`
Compile contract source code

**Kind**: Exported function
**Returns**: `Promise.&lt;Object&gt;` - Result object
**Category**: async

| Param | Type | Description |
| --- | --- | --- |
| source | `String` | Contract sourece code |
| options | `Object` | Transaction options (fee, ttl, gas, amount, deposit) |
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| source | `String` | | Contract sourece code |
| [options] | `Object` | <code>{}</code> | Transaction options (fee, ttl, gas, amount, deposit) |
| [options.filesystem] | `Object` | <code>{}</code> | Contract external namespaces map* @return {Promise<Object>} Result object |

**Example**
```js
Expand Down
Loading

0 comments on commit a88042e

Please sign in to comment.