Skip to content

Commit

Permalink
Generated SDK #8747
Browse files Browse the repository at this point in the history
  • Loading branch information
fireblocks_dx_team committed Jun 18, 2024
1 parent 3ba1cd0 commit 57f63d8
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 19 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/create-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Create Pull Request

on:
push:
branches:
- 'fireblocks-api-spec/generated/*'

jobs:
create-pull-request:
runs-on: ubuntu-latest

steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Create pull request
run: |
gh pr create \
--title "${{ github.event.commits[0].message }}" \
--body "This PR was automatically generated." \
--base master \
--head ${{ github.ref }} \
--reviewer asafs932,zoharsf,YoavBZ
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 13 additions & 6 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5444,6 +5444,7 @@ paths:
- Algorand
- TRON
- NEAR
- Solana
operationId: registerNewAsset
parameters:
- description: "A unique identifier for the request. If the request is sent\
Expand Down Expand Up @@ -5480,6 +5481,10 @@ paths:
- The asset address is invalid. Error code: 1003

- Self serve listing an asset on the requested blockchain is currently not supported, please contact support. Error code: 1004

- Blockchain is deprecated. Error code: 1006

- The asset's standard is not supported. Error code: 1007
"403":
content:
application/json:
Expand Down Expand Up @@ -16007,11 +16012,14 @@ components:
example: "(ETH, ETH_TEST5, MATIC_POLYGON)"
type: string
address:
description: "Asset address. \n- For EVM based chains this should be the\
\ token contract address.\n- For Stellar (XLM) this should be the issuer\
\ address.\n- For Algorand (ALGO) this should be the asset ID.\n- For\
\ TRON (TRX) this should be the token contract address.\n- For NEAR this\
\ will be the token address.\n"
description: |
Asset address.
- EVM-based chains: token contract address
- Stellar (XLM): issuer address
- Algorand (ALGO): asset ID
- TRON (TRX): token contract address
- NEAR: token address
- Solana: token's mint account address
example: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991
type: string
symbol:
Expand Down Expand Up @@ -26603,7 +26611,6 @@ components:
required:
- decimals
- name
- standard
- symbol
type: object
AssetResponse_metadata:
Expand Down
2 changes: 1 addition & 1 deletion docs/AssetResponseOnchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
|**name** | **String** | The asset name | |
|**address** | **String** | The asset address | [optional] |
|**decimals** | **BigDecimal** | Number of decimals | |
|**standard** | **String** | The asset standard | |
|**standard** | **String** | The asset standard | [optional] |



4 changes: 2 additions & 2 deletions docs/BlockchainsAssetsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ No authorization required
Register an asset

Register a new asset to a workspace and return the newly created asset's details. Currently supported chains are: - EVM based chains - Stellar - Algorand - TRON - NEAR
Register a new asset to a workspace and return the newly created asset's details. Currently supported chains are: - EVM based chains - Stellar - Algorand - TRON - NEAR - Solana

### Example

Expand Down Expand Up @@ -170,7 +170,7 @@ No authorization required
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | A new asset has been created successfully | - |
| **400** | - Listing an asset on the requested blockchain is not supported. Error code: 1000 - The asset address is invalid. Error code: 1003 - Self serve listing an asset on the requested blockchain is currently not supported, please contact support. Error code: 1004 | - |
| **400** | - Listing an asset on the requested blockchain is not supported. Error code: 1000 - The asset address is invalid. Error code: 1003 - Self serve listing an asset on the requested blockchain is currently not supported, please contact support. Error code: 1004 - Blockchain is deprecated. Error code: 1006 - The asset's standard is not supported. Error code: 1007 | - |
| **403** | - The asset creation quota reached. Error code: 1005 | - |
| **404** | - Invalid address, could not get asset information. Error code 1003 | - |
| **409** | - The asset is already supported globally. Error code: 1001 - The asset has already been added to this workspace. Error code: 1002 | - |
Expand Down
2 changes: 1 addition & 1 deletion docs/RegisterNewAssetRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**blockchainId** | **String** | Native asset ID of the blockchain | |
|**address** | **String** | Asset address. - For EVM based chains this should be the token contract address. - For Stellar (XLM) this should be the issuer address. - For Algorand (ALGO) this should be the asset ID. - For TRON (TRX) this should be the token contract address. - For NEAR this will be the token address. | |
|**address** | **String** | Asset address. - EVM-based chains: token contract address - Stellar (XLM): issuer address - Algorand (ALGO): asset ID - TRON (TRX): token contract address - NEAR: token address - Solana: token's mint account address | |
|**symbol** | **String** | Required for Stellar only, asset code is expected. | [optional] |


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ private HttpRequest.Builder getSupportedAssetsRequestBuilder() throws ApiExcepti
/**
* Register an asset Register a new asset to a workspace and return the newly created
* asset's details. Currently supported chains are: - EVM based chains - Stellar - Algorand
* - TRON - NEAR
* - TRON - NEAR - Solana
*
* @param registerNewAssetRequest (optional)
* @param idempotencyKey A unique identifier for the request. If the request is sent multiple
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,15 @@ public AssetResponseOnchain standard(String standard) {
*
* @return standard
*/
@jakarta.annotation.Nonnull
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_STANDARD)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getStandard() {
return standard;
}

@JsonProperty(JSON_PROPERTY_STANDARD)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStandard(String standard) {
this.standard = standard;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ public RegisterNewAssetRequest address(String address) {
}

/**
* Asset address. - For EVM based chains this should be the token contract address. - For
* Stellar (XLM) this should be the issuer address. - For Algorand (ALGO) this should be the
* asset ID. - For TRON (TRX) this should be the token contract address. - For NEAR this will be
* the token address.
* Asset address. - EVM-based chains: token contract address - Stellar (XLM): issuer address -
* Algorand (ALGO): asset ID - TRON (TRX): token contract address - NEAR: token address -
* Solana: token's mint account address
*
* @return address
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public void getSupportedAssetsTest() throws ApiException {
* Register an asset
*
* <p>Register a new asset to a workspace and return the newly created asset&#39;s details.
* Currently supported chains are: - EVM based chains - Stellar - Algorand - TRON - NEAR
* Currently supported chains are: - EVM based chains - Stellar - Algorand - TRON - NEAR -
* Solana
*
* @throws ApiException if the Api call fails
*/
Expand Down

0 comments on commit 57f63d8

Please sign in to comment.