Skip to content

Commit

Permalink
Merge pull request #50 from tonlabs/0.11.0-rc
Browse files Browse the repository at this point in the history
Version 0.11.0
  • Loading branch information
d3p authored Feb 17, 2023
2 parents ce1442d + de7f4db commit 981b7c8
Show file tree
Hide file tree
Showing 246 changed files with 1,067 additions and 15,520 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
/tsconfig.tsbuildinfo
.secret/
/playwright-report/
/dist/
/integration-test/test-results/
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.


## [0.11.0] – 2022-12-14

### New

- all functions with the userId/traderId as an input now accepts:
1) hex string with `0x` prefix;
2) hex string of 64 char length without `0x` prefix;
3) decimal string.

- `Trader.deployEverWallet` accepts token parameters as `TokenValue` instead of `number`'s.

- Changed contract errors: "<contract-name> failed with exit code <exit-code>. <known-contract-error-message>.".

- Replaced `number` with `string` and `TokenValue` in SDK parameters and results.

## [0.10.2] – 2022-12-14

### Fixed

- `queryPrice` hided server errors
- `queryOrders` does not return `traderId` and `finishTime`

## [0.10.1] – 2022-12-14

### Fixed
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ for Client contract used to perform management operations of Flex.
Good choice is a Multisig Wallet because it can send payloads to other contracts.

Owner contract means that only this contract can call functions of Client contract.
One of the management funcstions is deploy of a Trader's contract.
One of the management functions is deploy of a Trader's contract.

Let's deploy Flex Client and then a Trader:

Expand All @@ -82,12 +82,12 @@ const clientAddress = await Client.deploy(flex, {
console.log(`Client: ${clientAddress}}`);
```

To deploy a Trader, a person or organization who becomes Trader must generate a pair of keys and profive Flex Client with
To deploy a Trader, a person or organization who becomes Trader must generate a pair of keys and provide Flex Client with
**the pubkey only**.

If Flex Client will be its only Teader herself, than it can use its Client pubkey.
If Flex Client will be its only Trader himself, then it can use its Client pubkey.

Then, Flex Client must generate some Trader ID (uint256) that must be unique for each its Trader.
Then, Flex Client must generate some Trader ID (uint256) that must be unique for each of its Trader.


We already generated some ID and have a Trader pubkey, let's deploy Trader contract:
Expand Down
12 changes: 5 additions & 7 deletions contracts/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ export function errorFromExitCode(contract: AccountClass, exitCode: number): Con
exitCode < 0 ? `_cpp_${Math.abs(exitCode)}` : exitCode.toString()
}`,
exitCode,
message: `${contract.name} failed with exit code ${exitCode}. See contract documentation or contact contract developers for details.`,
message: `See contract documentation or contact contract developers for details.`,
};
const error: ContractError = new Error(contractError.message);
const error: ContractError = new Error(
`${contract.name} failed with exit code ${exitCode}. ${contractError.message}.`,
);
error.code = ProcessingErrorCode.MessageRejected;
error.data = {
...error.data,
Expand Down Expand Up @@ -59,11 +61,7 @@ export function findTransactionError(
contract: AccountClass,
altErrorCode: number = 0,
): Error | undefined {
const {
id,
aborted,
account_addr,
} = transaction;
const { id, aborted, account_addr } = transaction;
const exitCode = transaction.compute?.exit_code ?? 0;
const errorCode = exitCode !== 0 ? exitCode : altErrorCode;
if (!aborted && errorCode === 0) {
Expand Down
1 change: 0 additions & 1 deletion dist/cli/index.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions dist/cli/index.js

This file was deleted.

167 changes: 0 additions & 167 deletions dist/contracts/account-ex.d.ts

This file was deleted.

102 changes: 0 additions & 102 deletions dist/contracts/account-ex.js

This file was deleted.

13 changes: 0 additions & 13 deletions dist/contracts/codegen.d.ts

This file was deleted.

Loading

0 comments on commit 981b7c8

Please sign in to comment.