Skip to content

Commit

Permalink
Merge pull request #202 from dimitrov-d/main
Browse files Browse the repository at this point in the history
Update smart contract docs
  • Loading branch information
dimitrov-d authored Dec 3, 2024
2 parents 706e3e4 + 03c8d7e commit 02e9722
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 44 deletions.
36 changes: 18 additions & 18 deletions build/13-contracts-api.md → build/14-smart-contracts-api.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contracts API
# Smart Contracts API

API for creation and management of smart contracts through Apillon wallets on supported EVM chains.

Expand Down Expand Up @@ -360,7 +360,7 @@ Array item(s) format depends on value of `solidityJson` passed as query paramete
<CodeGroupItem title="cURL" active>

```sh
curl --location 'https://api.apillon.io/contracts/:uuid/deploy' \
curl --location 'https://api.apillon.io/contracts/:uuid/deploy' \
--header 'Authorization: Basic :credentials'
--data-raw '{
"name": "Test Contract 2",
Expand Down Expand Up @@ -641,7 +641,7 @@ All query parameters from [listing request](1-apillon-api.md#listing-requests) p

Response is a list of items (shorter version) described [under Response Fields above](#response-fields).

Item is a shorter version because it is a flat object and it doesn't include nested `contractVersion` (with `abi`,
Item is a shorter version because it is a flat object and it doesn't include nested `contractVersion` (with `abi`,
`methods` and `contract`), instead it exposes some details from this table:

##### Response Fields
Expand Down Expand Up @@ -857,7 +857,7 @@ All query parameters from [listing request](1-apillon-api.md#listing-requests),
| 40300000 | Not allowed to access deployed contract. |

#### Response
Endpoint returns ABI methods as an array.
Endpoint returns ABI methods as an array.

Array item(s) format depends on value of `solidityJson` passed as query parameter (human-readable ABI or ABI in Solidity JSON format).

Expand Down Expand Up @@ -1020,21 +1020,21 @@ Endpoint returns transactions for deployed contract based on filters.

| Name | Type | Description |
|-------------------------|------------|-------------------------------------|
| `contractUuid` | `string` | UUID of the contract. |
| `projectUuid` | `string` | UUID of the associated project. |
| `name` | `string` | Name of the contract. |
| `description` | `string` | Description of the contract. |
| `chainType` | `number` | Type of blockchain chain. |
| `chain` | `number` | ID of the blockchain. |
| `versionId` | `number` | Version ID of the contract. |
| `constructorArguments` | `any[]` | Arguments for the constructor. |
| `contractStatus` | `number` | Status of the contract deployment. |
| `contractAddress` | `string` | Deployed contract address. |
| `deployerAddress` | `string` | Address of the deployer. |
| `transactionHash` | `string` | Transaction hash of deployment. |
| `contractUuid` | `string` | UUID of the contract. |
| `projectUuid` | `string` | UUID of the associated project. |
| `name` | `string` | Name of the contract. |
| `description` | `string` | Description of the contract. |
| `chainType` | `number` | Type of blockchain chain. |
| `chain` | `number` | ID of the blockchain. |
| `versionId` | `number` | Version ID of the contract. |
| `constructorArguments` | `any[]` | Arguments for the constructor. |
| `contractStatus` | `number` | Status of the contract deployment. |
| `contractAddress` | `string` | Deployed contract address. |
| `deployerAddress` | `string` | Address of the deployer. |
| `transactionHash` | `string` | Transaction hash of deployment. |
| `contractVersion` | `string` | Version of the contract (nullable). |
| `createTime` | `Datetime` | Creation time of the contract. |
| `updateTime` | `Datetime` | Last update time of the contract. |
| `createTime` | `Datetime` | Creation time of the contract. |
| `updateTime` | `Datetime` | Last update time of the contract. |


</div>
Expand Down
1 change: 0 additions & 1 deletion build/6-apillon-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ Upload contents of a local folder to specified bucket.
- `-b, --bucket-uuid <string>`: UUID of the bucket to upload files to.
- `-w, --wrap`: Wrap uploaded files to an IPFS directory
- `-p, --path <string>`: Path to upload files to (e.g. main/subdir). Required when --wrap is supplied.
- `--await`: await file CIDs to be resolved

**Example**

Expand Down
25 changes: 0 additions & 25 deletions web3-services/10-web3-contracts.md

This file was deleted.

45 changes: 45 additions & 0 deletions web3-services/12-web3-smart-contracts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Smart Contracts

The Apillon Contract Service enables efficient deployment and comprehensive management of smart contracts across multiple
blockchain networks, providing a seamless and scalable solution for developers and enterprises.

This service currently supports deploying smart contracts on various EVM-compatible blockchain networks, including:
- [Astar Network](https://docs.astar.network/docs/build/introduction/astar_family)
- [Moonbeam Network](https://docs.moonbeam.network/builders/get-started/networks/moonbeam/)
- [Moonbase Network](https://docs.moonbeam.network/builders/get-started/networks/moonbase/)

## Smart Contract Deployment

Deploying a smart contract is straightforward with Apillon's streamlined process. To deploy a smart contract, follow these steps:

1. Log in to your [Apillon account](https://app.apillon.io/register).
2. Navigate to the "Contracts" section from the menu on the left and click on "New Smart Contract."
3. Select the desired smart contract for deployment.
4. Customize the contract through the provided configuration form and initiate the deployment.
5. Once deployed, utilize read and write methods to interact directly with the contract.

## Smart Contract Versioning

To ensure ongoing security and feature enhancements, Apillon employs versioned smart contracts. Each deployed contract
maintains a version to guarantee that the appropriate ABI (Application Binary Interface) is used during interactions,
safeguarding compatibility and providing a stable experience for contract users.

## Supported Smart Contract Types

Apillon supports various types of smart contracts to cater to different use cases and requirements. The currently supported smart contract types include ERC-20, ERC-721, and ERC-1155.

### ERC-20

ERC-20 is a widely adopted standard for fungible tokens on the Ethereum blockchain. These tokens are interchangeable and have the same value, making them ideal for use cases such as cryptocurrencies, utility tokens, and other digital assets. Apillon's ERC-20 smart contracts allow for seamless token creation, transfer, and management, ensuring compatibility with a wide range of wallets and exchanges.

### ERC-721

ERC-721 is the standard for non-fungible tokens (NFTs), which are unique and cannot be exchanged on a one-to-one basis like ERC-20 tokens. Each ERC-721 token has distinct properties and metadata, making them perfect for representing ownership of unique items such as digital art, collectibles, and real estate. Apillon's ERC-721 smart contracts provide robust functionality for minting, transferring, and managing NFTs, enabling developers to create and manage unique digital assets with ease.

### ERC-1155

ERC-1155 is a versatile standard that supports both fungible and non-fungible tokens within a single contract. This multi-token standard allows for more efficient transactions and storage, as multiple token types can be managed under one contract. Apillon's ERC-1155 smart contracts are ideal for applications that require a combination of fungible and non-fungible tokens, such as gaming assets, where a single contract can handle in-game currencies, items, and unique collectibles.

## Smart Contract API

To read more about the Smart Contract API, please refer to the [Apillon Smart Contracts API documentation](../build/14-smart-contracts-api.md).

0 comments on commit 02e9722

Please sign in to comment.