Skip to content

Commit f65e377

Browse files
authored
Merge pull request #135 from aeternity/release/2.7.0
Release 2.7.0
2 parents 60c59c0 + 854ce61 commit f65e377

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+4655
-2673
lines changed

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
TAG=v5.0.0-rc.3
2-
COMPILER_TAG=v4.0.0-rc5
1+
NODE_TAG=v5.5.4
2+
COMPILER_TAG=v4.2.0

.travis.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
branches:
2+
only:
3+
- master
4+
- develop
5+
6+
dist: xenial
7+
8+
addons:
9+
apt:
10+
packages:
11+
- build-essential
12+
- curl
13+
- libltdl7
14+
- git
15+
16+
services:
17+
- docker
18+
19+
language: node_js
20+
node_js: '10'
21+
22+
cache:
23+
timeout: 604800 # 7 days
24+
directories:
25+
- "$HOME/.npm"
26+
27+
env:
28+
global:
29+
- TEST_NODE=http://localhost:3013
30+
- TEST_URL=http://localhost:3013
31+
- TEST_DEBUG_URL=http://localhost:3113
32+
- TEST_WS_URL=ws://localhost:3014/channel
33+
- TEST_NETWORK_ID=ae_devnet
34+
- COMPILER_URL=http://localhost:3080
35+
- FORCE_COMPATIBILITY=false
36+
37+
before_install:
38+
- docker-compose up -d node compiler
39+
40+
install:
41+
- npm ci
42+
43+
jobs:
44+
include:
45+
- stage: Tests
46+
if: type != "cron"
47+
name: Test
48+
script:
49+
- npm run test
50+
- stage: Tests
51+
if: type = "cron"
52+
env:
53+
- NODE_TAG=master
54+
- COMPILER_TAG=latest
55+
- FORCE_COMPATIBILITY=true
56+
script:
57+
- npm run test

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
# [2.7.0](https://github.com/aeternity/aepp-cli-js/compare/2.6.0...2.7.0) (2020-06-10)
2+
3+
4+
### Bug Fixes
5+
6+
* **AENS:** Change tld from `aet` to `chain` ([#115](https://github.com/aeternity/aepp-cli-js/issues/115)) ([8279579](https://github.com/aeternity/aepp-cli-js/commit/8279579))
7+
* **Contract:** Fix compiler test's ([b748003](https://github.com/aeternity/aepp-cli-js/commit/b748003))
8+
* **tests:** Regenerate lock files to fix build on CI ([#128](https://github.com/aeternity/aepp-cli-js/issues/128)) ([23168ae](https://github.com/aeternity/aepp-cli-js/commit/23168ae))
9+
* Fix test for AENS ([fae6ce8](https://github.com/aeternity/aepp-cli-js/commit/fae6ce8))
10+
11+
12+
### Features
13+
14+
* **Account:** Add `verify-message` command to `account` module ([f26de1e](https://github.com/aeternity/aepp-cli-js/commit/f26de1e))
15+
* **Account:** Add message sign command ([d05e611](https://github.com/aeternity/aepp-cli-js/commit/d05e611))
16+
* **Account:** Adjust printing and json serialization for `sign-message` result ([7399377](https://github.com/aeternity/aepp-cli-js/commit/7399377))
17+
* **Account:** Spend by name. Extend `account spend` command with ability to put recipient address or name ([#117](https://github.com/aeternity/aepp-cli-js/issues/117)) ([043d1a2](https://github.com/aeternity/aepp-cli-js/commit/043d1a2))
18+
* **AENS:** Add bid, transfer, revoke and fullClaim commands ([a5eb23a](https://github.com/aeternity/aepp-cli-js/commit/a5eb23a))
19+
* **AENS:** Add test for auction ([9f4f6b2](https://github.com/aeternity/aepp-cli-js/commit/9f4f6b2))
20+
* **AENS:** extend name ttl command ([63c99ae](https://github.com/aeternity/aepp-cli-js/commit/63c99ae))
21+
* **AENS:** Fix `transfer` command. Add more test for transfer AENS names ([547af5a](https://github.com/aeternity/aepp-cli-js/commit/547af5a))
22+
* **AENS:** Fix BC for all of AENS commands. ([77d2d3c](https://github.com/aeternity/aepp-cli-js/commit/77d2d3c))
23+
* **AENS:** Implement name update command ([b65c5e6](https://github.com/aeternity/aepp-cli-js/commit/b65c5e6))
24+
* **CLI:** Refactor constant(Use constant from sdk). Refactor error handling in AENS module. Add `pre-claim` command. Refactor claim command ([7038629](https://github.com/aeternity/aepp-cli-js/commit/7038629))
25+
* **Contract:** Add test for calling contract using cointract descriptor file or source code and address ([3f77138](https://github.com/aeternity/aepp-cli-js/commit/3f77138))
26+
* **Contract:** contract `call` command ([ae723d5](https://github.com/aeternity/aepp-cli-js/commit/ae723d5))
27+
* **Contract:** Contract high level commands ([#116](https://github.com/aeternity/aepp-cli-js/issues/116)) ([8848a7b](https://github.com/aeternity/aepp-cli-js/commit/8848a7b))
28+
* **Contract:** Enable test's for contract ([ed48a83](https://github.com/aeternity/aepp-cli-js/commit/ed48a83))
29+
* **Oracle:** Oracle commands ([#134](https://github.com/aeternity/aepp-cli-js/issues/134)) ([05b079a](https://github.com/aeternity/aepp-cli-js/commit/05b079a))
30+
* **Tests:** Fix Breaking Changes and adjust tests ([#126](https://github.com/aeternity/aepp-cli-js/issues/126)) ([60b7910](https://github.com/aeternity/aepp-cli-js/commit/60b7910))
31+
32+
33+
134
# [2.6.0](https://github.com/aeternity/aepp-cli-js/compare/2.5.0...2.6.0) (2019-10-07)
235

336

Jenkinsfile

Lines changed: 0 additions & 49 deletions
This file was deleted.

bin/aecli-account.js

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const { Account } = require('./commands')
2929

3030
// ## Initialize `options`
3131
program
32-
.option('-u, --url [hostname]', 'Node to connect to', utils.constant.EPOCH_URL)
33-
.option('-U, --internalUrl [internal]', 'Node to connect to(internal)', utils.constant.EPOCH_INTERNAL_URL)
32+
.option('-u, --url [hostname]', 'Node to connect to', utils.constant.NODE_URL)
33+
.option('-U, --internalUrl [internal]', 'Node to connect to(internal)', utils.constant.NODE_INTERNAL_URL)
3434
.option('-P, --password [password]', 'Wallet Password')
3535
.option('-f --force', 'Ignore epoch version compatibility check')
3636
.option('--json', 'Print result in json format')
@@ -41,17 +41,20 @@ program
4141
//
4242
// Example: `aecli account spend ./myWalletKeyFile ak_1241rioefwj23f2wfdsfsdsdfsasdf 100 --password testpassword`
4343
//
44+
// Example: `aecli account spend ./myWalletKeyFile aensAccountName.chain 100 --password testpassword`
45+
//
4446
// You can set transaction `ttl(Time to leave)`. If not set use default.
4547
//
4648
// Example: `aecli account spend ./myWalletKeyFile ak_1241rioefwj23f2wfdsfsdsdfsasdf 100 --password testpassword --ttl 20` --> this tx will leave for 20 blocks
4749
program
48-
.command('spend <wallet_path> <receiver> <amount>')
50+
.command('spend <wallet_path> <receiverIdOrName> <amount>')
4951
.option('--networkId [networkId]', 'Network id (default: ae_mainnet)')
5052
.option('--payload [payload]', 'Transaction payload.', '')
5153
.option('-F, --fee [fee]', 'Spend transaction fee.')
5254
.option('-T, --ttl [ttl]', 'Validity of the spend transaction in number of blocks (default forever)', utils.constant.TX_TTL)
5355
.option('-N, --nonce [nonce]', 'Override the nonce that the transaction is going to be sent with')
54-
.action(async (walletPath, receiver, amount, ...arguments) => await Account.spend(walletPath, receiver, amount, utils.cli.getCmdFromArguments(arguments)))
56+
.option('-D, --denomination [denomination]', 'Denomination of amount', utils.constant.DENOMINATION)
57+
.action(async (walletPath, receiverIdOrName, amount, ...arguments) => await Account.spend(walletPath, receiverIdOrName, amount, utils.cli.getCmdFromArguments(arguments)))
5558

5659

5760
// ## Initialize `transfer` command
@@ -71,6 +74,7 @@ program
7174
.option('-F, --fee [fee]', 'Spend transaction fee.')
7275
.option('-T, --ttl [ttl]', 'Validity of the spend transaction in number of blocks (default forever)', utils.constant.TX_TTL)
7376
.option('-N, --nonce [nonce]', 'Override the nonce that the transaction is going to be sent with')
77+
.option('-D, --denomination [denomination]', 'Denomination of amount', utils.constant.DENOMINATION)
7478
.action(async (walletPath, receiver, percentage, ...arguments) => await Account.transferFunds(walletPath, receiver, percentage, utils.cli.getCmdFromArguments(arguments)))
7579

7680

@@ -86,6 +90,30 @@ program
8690
.action(async (walletPath, tx, ...arguments) => await Account.sign(walletPath, tx, utils.cli.getCmdFromArguments(arguments)))
8791

8892

93+
// ## Initialize `sign-message` command
94+
//
95+
// You can use this command to sign message
96+
//
97+
// Example: `aecli account sign-message ./myWalletKeyFile Hello --password testpassword`
98+
program
99+
.command('sign-message <wallet_path> [data...]')
100+
.option('--filePath [path]', 'Specify the path to the file for signing(ignore command message argument and use file instead)')
101+
.description('Create a transaction to another wallet')
102+
.action(async (walletPath, data, ...arguments) => await Account.signMessage(walletPath, data, utils.cli.getCmdFromArguments(arguments)))
103+
104+
105+
// ## Initialize `verify-message` command
106+
//
107+
// You can use this command to sign message
108+
//
109+
// Example: `aecli account verify-message ./myWalletKeyFile asd1dasfadfsdasdasdasHexSig... Hello --password testpassword`
110+
program
111+
.command('verify-message <wallet_path> <hexSignature> [data...]')
112+
.option('--filePath [path]', 'Specify the path to the file(ignore comm and message argument and use file instead)')
113+
.description('Create a transaction to another wallet')
114+
.action(async (walletPath, hexSignature, data, ...arguments) => await Account.verifyMessage(walletPath, hexSignature, data, utils.cli.getCmdFromArguments(arguments)))
115+
116+
89117
// ## Initialize `balance` command
90118
//
91119
// You can use this command to retrieve balance of account

bin/aecli-chain.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const { Chain } = require('./commands')
2929

3030
// # Initialize `options`
3131
program
32-
.option('-u --url [hostname]', 'Node to connect to', utils.constant.EPOCH_URL)
33-
.option('--internalUrl [internal]', 'Node to connect to(internal)', utils.constant.EPOCH_INTERNAL_URL)
32+
.option('-u --url [hostname]', 'Node to connect to', utils.constant.NODE_URL)
33+
.option('--internalUrl [internal]', 'Node to connect to(internal)', utils.constant.NODE_INTERNAL_URL)
3434
.option('-L --limit [playlimit]', 'Limit for play command', utils.constant.PLAY_LIMIT)
3535
.option('-f --force', 'Ignore node version compatibility check')
3636
.option('--json', 'Print result in json format')
@@ -95,7 +95,7 @@ program
9595
// Example: `aecli tx spend ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ak_AgV756Vfo99juwzNVgnjP1gXX1op1QN3NXTxvkPnHJPUDE8NT 100`
9696
program
9797
.command('broadcast <tx>')
98-
.option('--waitMined', 'Transaction payload.')
98+
.option('-W, --no-waitMined', 'Force waiting until transaction will be mined')
9999
.option('--verify', 'Verify Transaction before broadcast.')
100100
.description('Send transaction to the chain')
101101
.action(async (tx, ...arguments) => await Chain.broadcast(tx, utils.cli.getCmdFromArguments(arguments)))

bin/aecli-contract.js

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ const { Contract } = require('./commands')
2828

2929
// ## Initialize `options`
3030
program
31-
.option('-u --url [hostname]', 'Node to connect to', utils.constant.EPOCH_URL)
32-
.option('--internalUrl [internal]', 'Node to connect to(internal)', utils.constant.EPOCH_INTERNAL_URL)
31+
.option('-u --url [hostname]', 'Node to connect to', utils.constant.NODE_URL)
32+
.option('--internalUrl [internal]', 'Node to connect to(internal)', utils.constant.NODE_INTERNAL_URL)
3333
.option('--compilerUrl [compilerUrl]', 'Compiler URL', utils.constant.COMPILER_URL)
3434
.option('-f --force', 'Ignore node version compatibility check')
3535
.option('--json', 'Print result in json format')
@@ -86,6 +86,63 @@ program
8686
.action(async (data, ...arguments) => await Contract.decodeCallData(data, utils.cli.getCmdFromArguments(arguments)))
8787

8888

89+
// ## Initialize `call` command
90+
//
91+
// You can use this command to execute a function's of contract
92+
//
93+
// Example:
94+
// `aecli contract call ./myWalletFile --password testpass sumFunc int 1 2 --descrPath ./contractDescriptorFile.json ` --> Using descriptor file
95+
// `aecli contract call ./myWalletFile --password testpass sumFunc int 1 2 --contractAddress ct_1dsf35423fdsg345g4wsdf35ty54234235 ` --> Using contract address
96+
//
97+
// Also you have ability to make `static` call using `--callStatic` flag
98+
// Example:
99+
// `aecli contract call ./myWalletFile --password testpass sumFunc int 1 2 --descrPath ./contractDescriptorFile.json --callStatic` --> Static call using descriptor
100+
// `aecli contract call ./myWalletFile --password testpass sumFunc int 1 2 --contractAddress ct_1dsf35423fdsg345g4wsdf35ty54234235 --callStatic` --> Static call using contract address
101+
// You can preset gas, nonce and ttl for that call. If not set use default.
102+
// Example: `aecli contract call ./myWalletFile --password tstpass sumFunc int 1 2 --descrPath ./contractDescriptorFile.json --gas 2222222 --nonce 4 --ttl 1243`
103+
program
104+
.command('call <wallet_path> <fn> [args...]')
105+
.option('-W, --no-waitMined', 'Force waiting until transaction will be mined')
106+
.option('--networkId [networkId]', 'Network id (default: ae_mainnet)')
107+
.option('-P, --password [password]', 'Wallet Password')
108+
.option('-G --gas [gas]', 'Amount of gas to call the contract', utils.constant.GAS)
109+
.option('-d --descrPath [descrPath]', 'Path to contract descriptor file')
110+
.option('--backend [backend]', 'Compiler backend("fate" | "aevm")', utils.constant.COMPILER_BACKEND)
111+
.option('-s --callStatic', 'Call static', false)
112+
.option('-t --topHash', 'Hash of block to make call')
113+
.option('--contractAddress [contractAddress]', 'Contract address to call')
114+
.option('--contractSource [contractSource]', 'Contract source code')
115+
.option('-F, --fee [fee]', 'Spend transaction fee.')
116+
.option('-T, --ttl [ttl]', 'Validity of the spend transaction in number of blocks (default forever)', utils.constant.TX_TTL)
117+
.option('-N, --nonce [nonce]', 'Override the nonce that the transaction is going to be sent with')
118+
.description('Execute a function of the contract')
119+
.action(async (walletPath, fn, args, ...arguments) => await Contract.call(walletPath, fn, args, utils.cli.getCmdFromArguments(arguments)))
120+
121+
//
122+
// ## Initialize `deploy` command
123+
//
124+
// You can use this command to deploy contract on the chain
125+
//
126+
// Example: `aecli contract deploy ./myWalletFile --password testpass ./contractSourceCodeFile 1 2` -> "1 2" -> Init state params
127+
//
128+
// You can preset gas and initState for deploy
129+
//
130+
// Example: `aecli contract deploy ./myWalletFile --password tstpass ./contractSourceCodeFile --gas 2222222`
131+
program
132+
.command('deploy <wallet_path> <contract_path> <callData>')
133+
.option('--networkId [networkId]', 'Network id (default: ae_mainnet)')
134+
.option('-W, --no-waitMined', 'Force waiting until transaction will be mined')
135+
.option('-P, --password [password]', 'Wallet Password')
136+
.option('-G --gas [gas]', 'Amount of gas to deploy the contract', utils.constant.GAS)
137+
.option('-G --gasPrice [gas]', 'Amount of gas to deploy the contract', utils.constant.GAS_PRICE)
138+
.option('--backend [backend]', 'Compiler backend("fate" | "aevm")', utils.constant.COMPILER_BACKEND)
139+
.option('-F, --fee [fee]', 'Spend transaction fee.')
140+
.option('-T, --ttl [ttl]', 'Validity of the spend transaction in number of blocks (default forever)', utils.constant.TX_TTL)
141+
.option('-N, --nonce [nonce]', 'Override the nonce that the transaction is going to be sent with')
142+
.description('Deploy a contract on the chain')
143+
.action(async (walletPath, path, callData, ...arguments) => await Contract.deploy(walletPath, path, callData, utils.cli.getCmdFromArguments(arguments)))
144+
145+
89146
// Handle unknown command's
90147
program.on('command:*', () => utils.errors.unknownCommandHandler(program)())
91148

bin/aecli-inspect.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const { Inspect } = require('./commands')
2929

3030
// ## Initialize `options`
3131
program
32-
.option('-u --url [hostname]', 'Node to connect to', utils.constant.EPOCH_URL)
33-
.option('--internalUrl [internal]', 'Node to connect to(internal)', utils.constant.EPOCH_INTERNAL_URL)
32+
.option('-u --url [hostname]', 'Node to connect to', utils.constant.NODE_URL)
33+
.option('--internalUrl [internal]', 'Node to connect to(internal)', utils.constant.NODE_INTERNAL_URL)
3434
.option('-f --force', 'Ignore node version compatibility check')
3535
.option('--json', 'Print result in json format')
3636

@@ -52,7 +52,7 @@ program
5252
program
5353
.arguments('<hash>')
5454
.description('Hash or Name to inspect (eg: ak_..., mk_..., name.test)')
55-
.action(async (hash, cmd) => await Inspect.inspect(hash, cmd))
55+
.action(async (hash, cmd) => Inspect.inspect(hash, cmd))
5656

5757
// Parse arguments or show `help` if argument's is empty
5858
program.parse(process.argv)

0 commit comments

Comments
 (0)