Skip to content

Commit

Permalink
feat!: generate compiler api in TypeScript using autorest
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `filesystem` option renamed to `fileSystem`

BREAKING CHANGE: methods of `compilerApi` requires `options` object according to their specification

BREAKING CHANGE: methods of `compilerApi` returns and accepts keys named in camelCase
instead of snake_case
  • Loading branch information
davidyuk committed Apr 22, 2022
1 parent 02e5732 commit 777e990
Show file tree
Hide file tree
Showing 10 changed files with 531 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = {
plugins: [
'@typescript-eslint'
],
ignorePatterns: ['dist', 'es'],
ignorePatterns: ['dist', 'es', 'src/apis'],
rules: {
'max-len': ['error', 100, 2, {
ignoreUrls: true,
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ coverage.*
.history
.site
site
/src/apis/
6 changes: 3 additions & 3 deletions docs/guides/contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ Note:

- If your contract includes external dependencies which are not part of the [standard library](https://aeternity.com/aesophia/latest/sophia_stdlib) you should initialize the contract using:
```js
const filesystem = ... // key-value map with name of the include as key and source code of the include as value
const contractInstance = await aeSdk.getContractInstance({ source: CONTRACT_SOURCE, filesystem })
const fileSystem = ... // key-value map with name of the include as key and source code of the include as value
const contractInstance = await aeSdk.getContractInstance({ source: CONTRACT_SOURCE, fileSystem })
```

### By ACI and bytecode
Expand Down Expand Up @@ -93,7 +93,7 @@ const contractInstance = await aeSdk.getContractInstance({ aci, contractAddress
- `contractAddress`
- The address where the contract is located at.
- To be used if a contract is already deployed.
- `filesystem` (default: {})
- `fileSystem` (default: {})
- Key-value map with name of the include as key and source code of the include as value.
- `validateBytecode` (default: false)
- Compare source code with on-chain version.
Expand Down
Loading

0 comments on commit 777e990

Please sign in to comment.