Skip to content

Commit

Permalink
Merge pull request #1995 from fetchai/feature/v0.7.5
Browse files Browse the repository at this point in the history
Feature/v0.7.5
  • Loading branch information
DavidMinarsch committed Nov 25, 2020
2 parents bc7947a + 5dde969 commit 45808f0
Show file tree
Hide file tree
Showing 129 changed files with 612 additions and 593 deletions.
13 changes: 13 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Release History

## 0.7.5 (2020-11-25)

- Adds AW3 AEAs
- Adds basic oracle skills and contracts
- Replaces usage of Ropsten testnet with Ganache in packages
- Fixes multiplexer setup when used outside AEA
- Improves help command output of CLI
- Adds integration tests for simple skills
- Adds version check on CLI push
- Adds integration tests for tac negotiation skills
- Multiple docs updates based on user feedback
- Multiple additional tests and test stability fixes

## 0.7.4 (2020-11-18)

- Replaces error skill handler usage with built in handler
Expand Down
2 changes: 1 addition & 1 deletion aea/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
__title__ = "aea"
__description__ = "Autonomous Economic Agent framework"
__url__ = "https://github.com/fetchai/agents-aea.git"
__version__ = "0.7.4"
__version__ = "0.7.5"
__author__ = "Fetch.AI Limited"
__license__ = "Apache-2.0"
__copyright__ = "2019 Fetch.AI Limited"
2 changes: 1 addition & 1 deletion benchmark/run_from_branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pip install pipenv
# this is to install benchmark dependencies
pipenv install --dev --skip-lock
# this is to install the AEA in the Pipenv virtual env
pipenv run pip install --upgrade aea[all]=="0.7.4"
pipenv run pip install --upgrade aea[all]=="0.7.5"

chmod +x benchmark/checks/run_benchmark.sh
echo "Start the experiments."
Expand Down
2 changes: 1 addition & 1 deletion deploy-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ENV PYTHONPATH "$PYTHONPATH:/usr/lib/python3.7/site-packages"
RUN apk add --no-cache go

RUN pip install --upgrade pip
RUN pip install --upgrade --force-reinstall aea[all]==0.7.4
RUN pip install --upgrade --force-reinstall aea[all]==0.7.5

# COPY ./packages /home/packages # enable to add packages dir
WORKDIR home
Expand Down
2 changes: 1 addition & 1 deletion deploy-image/docker-env.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Swap the following lines if you want to work with 'latest'
DOCKER_IMAGE_TAG=fetchai/aea-deploy:0.7.4
DOCKER_IMAGE_TAG=fetchai/aea-deploy:0.7.5
# DOCKER_IMAGE_TAG=fetchai/aea-deploy:latest

DOCKER_BUILD_CONTEXT_DIR=..
Expand Down
2 changes: 1 addition & 1 deletion develop-image/docker-env.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Swap the following lines if you want to work with 'latest'
DOCKER_IMAGE_TAG=fetchai/aea-develop:0.7.4
DOCKER_IMAGE_TAG=fetchai/aea-develop:0.7.5
# DOCKER_IMAGE_TAG=aea-develop:latest

DOCKER_BUILD_CONTEXT_DIR=..
Expand Down
2 changes: 1 addition & 1 deletion docs/api/test_tools/test_skill.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ the created incoming message

```python
| @classmethod
| setup(cls) -> None
| setup(cls, **kwargs) -> None
```

Set up the skill test case.
Expand Down
12 changes: 6 additions & 6 deletions docs/aries-cloud-agent-demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ Now you can create **Alice_AEA** and **Faber_AEA** in terminals 3 and 4 respecti
In the third terminal, fetch **Alice_AEA** and move into its project folder:

``` bash
aea fetch fetchai/aries_alice:0.16.0
aea fetch fetchai/aries_alice:0.17.0
cd aries_alice
```

Expand All @@ -193,9 +193,9 @@ aea create aries_alice
cd aries_alice
aea add connection fetchai/p2p_libp2p:0.12.0
aea add connection fetchai/soef:0.13.0
aea add connection fetchai/http_client:0.13.0
aea add connection fetchai/http_client:0.14.0
aea add connection fetchai/webhook:0.10.0
aea add skill fetchai/aries_alice:0.12.0
aea add skill fetchai/aries_alice:0.13.0
```
</p>
</details>
Expand Down Expand Up @@ -265,7 +265,7 @@ Once you see a message of the form `To join its network use multiaddr: ['SOME_AD
In the fourth terminal, fetch **Faber_AEA** and move into its project folder:

``` bash
aea fetch fetchai/aries_faber:0.16.0
aea fetch fetchai/aries_faber:0.17.0
cd aries_faber
```

Expand All @@ -278,9 +278,9 @@ aea create aries_faber
cd aries_faber
aea add connection fetchai/p2p_libp2p:0.12.0
aea add connection fetchai/soef:0.13.0
aea add connection fetchai/http_client:0.13.0
aea add connection fetchai/http_client:0.14.0
aea add connection fetchai/webhook:0.10.0
aea add skill fetchai/aries_faber:0.11.0
aea add skill fetchai/aries_faber:0.12.0
```
</p>
</details>
Expand Down
16 changes: 8 additions & 8 deletions docs/car-park-skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Follow the <a href="../quickstart/#preliminaries">Preliminaries</a> and <a href=

First, fetch the car detector AEA:
``` bash
aea fetch fetchai/car_detector:0.17.0
aea fetch fetchai/car_detector:0.18.0
cd car_detector
aea install
```
Expand All @@ -69,16 +69,16 @@ aea create car_detector
cd car_detector
aea add connection fetchai/p2p_libp2p:0.12.0
aea add connection fetchai/soef:0.13.0
aea add connection fetchai/ledger:0.9.0
aea add skill fetchai/carpark_detection:0.15.0
aea add connection fetchai/ledger:0.10.0
aea add skill fetchai/carpark_detection:0.16.0
aea install
aea config set agent.default_connection fetchai/p2p_libp2p:0.12.0
```

In `car_detector/aea-config.yaml` add
``` yaml
default_routing:
fetchai/ledger_api:0.7.0: fetchai/ledger:0.9.0
fetchai/ledger_api:0.7.0: fetchai/ledger:0.10.0
fetchai/oef_search:0.10.0: fetchai/soef:0.13.0
```
Expand All @@ -89,7 +89,7 @@ default_routing:
Then, fetch the car data client AEA:
``` bash
aea fetch fetchai/car_data_buyer:0.18.0
aea fetch fetchai/car_data_buyer:0.19.0
cd car_data_buyer
aea install
```
Expand All @@ -103,16 +103,16 @@ aea create car_data_buyer
cd car_data_buyer
aea add connection fetchai/p2p_libp2p:0.12.0
aea add connection fetchai/soef:0.13.0
aea add connection fetchai/ledger:0.9.0
aea add skill fetchai/carpark_client:0.16.0
aea add connection fetchai/ledger:0.10.0
aea add skill fetchai/carpark_client:0.17.0
aea install
aea config set agent.default_connection fetchai/p2p_libp2p:0.12.0
```

In `car_data_buyer/aea-config.yaml` add
``` yaml
default_routing:
fetchai/ledger_api:0.7.0: fetchai/ledger:0.9.0
fetchai/ledger_api:0.7.0: fetchai/ledger:0.10.0
fetchai/oef_search:0.10.0: fetchai/soef:0.13.0
```
Expand Down
2 changes: 1 addition & 1 deletion docs/cli-vs-programmatic-aeas.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ If you want to create the weather station AEA step by step you can follow this g
Fetch the weather station AEA with the following command :

``` bash
aea fetch fetchai/weather_station:0.17.0
aea fetch fetchai/weather_station:0.18.0
cd weather_station
```

Expand Down
22 changes: 11 additions & 11 deletions docs/contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ The smart contract wrapped in a AEA contract package might be a third-party smar

Interacting with contracts in almost all cases requires network access. Therefore, the framework executes contract related logic in a <a href="../connection">Connection</a>.

In particular, the `fetchai/ledger:0.9.0` connection can be used to execute contract related logic. The skills communicate with the `fetchai/ledger:0.9.0` connection via the `fetchai/contract_api:0.8.0` protocol. This protocol implements a request-response pattern to serve the four types of methods listed above:
In particular, the `fetchai/ledger:0.10.0` connection can be used to execute contract related logic. The skills communicate with the `fetchai/ledger:0.10.0` connection via the `fetchai/contract_api:0.8.0` protocol. This protocol implements a request-response pattern to serve the four types of methods listed above:

- the `get_deploy_transaction` message is used to request a deploy transaction for a specific contract. For instance, to request a deploy transaction for the deployment of the smart contract wrapped in the `fetchai/erc1155:0.12.0` package, we send the following message to the `fetchai/ledger:0.9.0`:
- the `get_deploy_transaction` message is used to request a deploy transaction for a specific contract. For instance, to request a deploy transaction for the deployment of the smart contract wrapped in the `fetchai/erc1155:0.12.0` package, we send the following message to the `fetchai/ledger:0.10.0`:

``` python
contract_api_msg = ContractApiMessage(
Expand All @@ -35,9 +35,9 @@ contract_api_msg = ContractApiMessage(

Any additional arguments needed by the contract's constructor method should be added to `kwargs`.

This message will be handled by the `fetchai/ledger:0.9.0` connection and then a `raw_transaction` message will be returned with the matching raw transaction. To send this transaction to the ledger for processing, we first sign the message with the decision maker and then send the signed transaction to the `fetchai/ledger:0.9.0` connection using the `fetchai/ledger_api:0.7.0` protocol. For details on how to implement the message handling, see the handlers in the `erc1155_deploy` skill.
This message will be handled by the `fetchai/ledger:0.10.0` connection and then a `raw_transaction` message will be returned with the matching raw transaction. To send this transaction to the ledger for processing, we first sign the message with the decision maker and then send the signed transaction to the `fetchai/ledger:0.10.0` connection using the `fetchai/ledger_api:0.7.0` protocol. For details on how to implement the message handling, see the handlers in the `erc1155_deploy` skill.

- the `get_raw_transaction` message is used to request any transaction for a specific contract which changes state in the contract. For instance, to request a transaction for the creation of token in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.12.0` package, we send the following message to the `fetchai/ledger:0.9.0`:
- the `get_raw_transaction` message is used to request any transaction for a specific contract which changes state in the contract. For instance, to request a transaction for the creation of token in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.12.0` package, we send the following message to the `fetchai/ledger:0.10.0`:

``` python
contract_api_msg = ContractApiMessage(
Expand All @@ -56,9 +56,9 @@ contract_api_msg = ContractApiMessage(
)
```

This message will be handled by the `fetchai/ledger:0.9.0` connection and then a `raw_transaction` message will be returned with the matching raw transaction. For this to be executed correctly, the `fetchai/erc1155:0.12.0` contract package needs to implement the `get_create_batch_transaction` method with the specified key word arguments (see example in *Deploy your own*, below). Similarly to above, to send this transaction to the ledger for processing, we first sign the message with the decision maker and then send the signed transaction to the `fetchai/ledger:0.9.0` connection using the `fetchai/ledger_api:0.7.0` protocol.
This message will be handled by the `fetchai/ledger:0.10.0` connection and then a `raw_transaction` message will be returned with the matching raw transaction. For this to be executed correctly, the `fetchai/erc1155:0.12.0` contract package needs to implement the `get_create_batch_transaction` method with the specified key word arguments (see example in *Deploy your own*, below). Similarly to above, to send this transaction to the ledger for processing, we first sign the message with the decision maker and then send the signed transaction to the `fetchai/ledger:0.10.0` connection using the `fetchai/ledger_api:0.7.0` protocol.

- the `get_raw_message` message is used to request any contract method call for a specific contract which does not change state in the contract. For instance, to request a call to get a hash from some input data in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.12.0` package, we send the following message to the `fetchai/ledger:0.9.0`:
- the `get_raw_message` message is used to request any contract method call for a specific contract which does not change state in the contract. For instance, to request a call to get a hash from some input data in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.12.0` package, we send the following message to the `fetchai/ledger:0.10.0`:

``` python
contract_api_msg = ContractApiMessage(
Expand All @@ -81,10 +81,10 @@ contract_api_msg = ContractApiMessage(
),
)
```
This message will be handled by the `fetchai/ledger:0.9.0` connection and then a `raw_message` message will be returned with the matching raw message. For this to be executed correctly, the `fetchai/erc1155:0.12.0` contract package needs to implement the `get_hash_single` method with the specified key word arguments. We can then send the raw message to the `fetchai/ledger:0.9.0` connection using the `fetchai/ledger_api:0.7.0` protocol. In this case, signing is not required.
This message will be handled by the `fetchai/ledger:0.10.0` connection and then a `raw_message` message will be returned with the matching raw message. For this to be executed correctly, the `fetchai/erc1155:0.12.0` contract package needs to implement the `get_hash_single` method with the specified key word arguments. We can then send the raw message to the `fetchai/ledger:0.10.0` connection using the `fetchai/ledger_api:0.7.0` protocol. In this case, signing is not required.


- the `get_state` message is used to request any contract method call to query state in the deployed contract. For instance, to request a call to get the balances in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.12.0` package, we send the following message to the `fetchai/ledger:0.9.0`:
- the `get_state` message is used to request any contract method call to query state in the deployed contract. For instance, to request a call to get the balances in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.12.0` package, we send the following message to the `fetchai/ledger:0.10.0`:

``` python
contract_api_msg = ContractApiMessage(
Expand All @@ -99,7 +99,7 @@ contract_api_msg = ContractApiMessage(
),
)
```
This message will be handled by the `fetchai/ledger:0.9.0` connection and then a `state` message will be returned with the matching state. For this to be executed correctly, the `fetchai/erc1155:0.12.0` contract package needs to implement the `get_balance` method with the specified key word arguments. We can then send the raw message to the `fetchai/ledger:0.9.0` connection using the `fetchai/ledger_api:0.7.0` protocol. In this case, signing is not required.
This message will be handled by the `fetchai/ledger:0.10.0` connection and then a `state` message will be returned with the matching state. For this to be executed correctly, the `fetchai/erc1155:0.12.0` contract package needs to implement the `get_balance` method with the specified key word arguments. We can then send the raw message to the `fetchai/ledger:0.10.0` connection using the `fetchai/ledger_api:0.7.0` protocol. In this case, signing is not required.


## Developing your own
Expand Down Expand Up @@ -172,6 +172,6 @@ class MyContract(Contract):
tx = cls._try_estimate_gas(ledger_api, tx)
return tx
```
Above, we implement a method to create a transaction, in this case a transaction to create a batch of tokens. The method will be called by the framework, specifically the `fetchai/ledger:0.9.0` connection once it receives a message (see bullet point 2 above). The method first gets the latest transaction nonce of the `deployer_address`, then constracts the contract instance, then uses the instance to build the transaction and finally updates the gas on the transaction.
Above, we implement a method to create a transaction, in this case a transaction to create a batch of tokens. The method will be called by the framework, specifically the `fetchai/ledger:0.10.0` connection once it receives a message (see bullet point 2 above). The method first gets the latest transaction nonce of the `deployer_address`, then constracts the contract instance, then uses the instance to build the transaction and finally updates the gas on the transaction.

It helps to look at existing contract packages, like `fetchai/erc1155:0.12.0`, and skills using them, like `fetchai/erc1155_client:0.11.0` and `fetchai/erc1155_deploy:0.17.0`, for inspiration and guidance.
It helps to look at existing contract packages, like `fetchai/erc1155:0.12.0`, and skills using them, like `fetchai/erc1155_client:0.11.0` and `fetchai/erc1155_deploy:0.18.0`, for inspiration and guidance.
20 changes: 10 additions & 10 deletions docs/erc1155-skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ with a one-step atomic swap functionality. That means the trade between the two
Fetch the AEA that will deploy the contract.

``` bash
aea fetch fetchai/erc1155_deployer:0.18.0
aea fetch fetchai/erc1155_deployer:0.19.0
cd erc1155_deployer
aea install
```
Expand All @@ -41,17 +41,17 @@ aea create erc1155_deployer
cd erc1155_deployer
aea add connection fetchai/p2p_libp2p:0.12.0
aea add connection fetchai/soef:0.13.0
aea add connection fetchai/ledger:0.9.0
aea add skill fetchai/erc1155_deploy:0.17.0
aea add connection fetchai/ledger:0.10.0
aea add skill fetchai/erc1155_deploy:0.18.0
aea install
aea config set agent.default_connection fetchai/p2p_libp2p:0.12.0
```

Then update the agent config (`aea-config.yaml`) with the default routing:
``` yaml
default_routing:
fetchai/contract_api:0.8.0: fetchai/ledger:0.9.0
fetchai/ledger_api:0.7.0: fetchai/ledger:0.9.0
fetchai/contract_api:0.8.0: fetchai/ledger:0.10.0
fetchai/ledger_api:0.7.0: fetchai/ledger:0.10.0
fetchai/oef_search:0.10.0: fetchai/soef:0.13.0
```
Expand Down Expand Up @@ -81,7 +81,7 @@ aea add-key cosmos cosmos_private_key.txt --connection
In another terminal, fetch the AEA that will get some tokens from the deployer.

``` bash
aea fetch fetchai/erc1155_client:0.18.0
aea fetch fetchai/erc1155_client:0.19.0
cd erc1155_client
aea install
```
Expand All @@ -96,17 +96,17 @@ aea create erc1155_client
cd erc1155_client
aea add connection fetchai/p2p_libp2p:0.12.0
aea add connection fetchai/soef:0.13.0
aea add connection fetchai/ledger:0.9.0
aea add skill fetchai/erc1155_client:0.16.0
aea add connection fetchai/ledger:0.10.0
aea add skill fetchai/erc1155_client:0.17.0
aea install
aea config set agent.default_connection fetchai/p2p_libp2p:0.12.0
```

Then update the agent config (`aea-config.yaml`) with the default routing:
``` yaml
default_routing:
fetchai/contract_api:0.8.0: fetchai/ledger:0.9.0
fetchai/ledger_api:0.7.0: fetchai/ledger:0.9.0
fetchai/contract_api:0.8.0: fetchai/ledger:0.10.0
fetchai/ledger_api:0.7.0: fetchai/ledger:0.10.0
fetchai/oef_search:0.10.0: fetchai/soef:0.13.0
```
Expand Down
14 changes: 7 additions & 7 deletions docs/generic-skills-step-by-step.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ Follow the <a href="../quickstart/#preliminaries">Preliminaries</a> and <a href=
This step-by-step guide recreates two AEAs already developed by Fetch.ai. You can get the finished AEAs to compare your code against by following the next steps:

``` bash
aea fetch fetchai/generic_seller:0.14.0
aea fetch fetchai/generic_seller:0.15.0
cd generic_seller
aea eject skill fetchai/generic_seller:0.16.0
aea eject skill fetchai/generic_seller:0.17.0
cd ..
```

``` bash
aea fetch fetchai/generic_buyer:0.15.0
aea fetch fetchai/generic_buyer:0.16.0
cd generic_buyer
aea eject skill fetchai/generic_buyer:0.16.0
aea eject skill fetchai/generic_buyer:0.17.0
cd ..
```

Expand Down Expand Up @@ -2964,7 +2964,7 @@ aea add-key fetchai fetchai_private_key.txt --connection
Both in `my_generic_seller/aea-config.yaml` and `my_generic_buyer/aea-config.yaml`, and
``` yaml
default_routing:
fetchai/ledger_api:0.7.0: fetchai/ledger:0.9.0
fetchai/ledger_api:0.7.0: fetchai/ledger:0.10.0
fetchai/oef_search:0.10.0: fetchai/soef:0.13.0
```
Expand All @@ -2983,7 +2983,7 @@ Add the remaining packages for the seller AEA, then run it:
``` bash
aea add connection fetchai/p2p_libp2p:0.12.0
aea add connection fetchai/soef:0.13.0
aea add connection fetchai/ledger:0.9.0
aea add connection fetchai/ledger:0.10.0
aea add protocol fetchai/fipa:0.10.0
aea install
aea config set agent.default_connection fetchai/p2p_libp2p:0.12.0
Expand All @@ -2999,7 +2999,7 @@ Add the remaining packages for the buyer AEA:
``` bash
aea add connection fetchai/p2p_libp2p:0.12.0
aea add connection fetchai/soef:0.13.0
aea add connection fetchai/ledger:0.9.0
aea add connection fetchai/ledger:0.10.0
aea add protocol fetchai/fipa:0.10.0
aea add protocol fetchai/signing:0.7.0
aea install
Expand Down
Loading

0 comments on commit 45808f0

Please sign in to comment.