1
1
# Contracts API
2
2
3
- API for creation and management of smart contracts through Apillon wallets on all supported EVM chains.
3
+ API for creation and management of smart contracts through Apillon wallets on supported EVM chains.
4
4
5
- Enables developers without blockchain experience to automate, scale, efficiently manage, secure, and ensure transparency
6
- in smart contract operations on the blockchain through simple API calls.
5
+ Enables developers (even without blockchain experience) to deploy, automate, scale, and efficiently manage smart contracts
6
+ on the blockchain through simple API calls.
7
7
8
8
### Get Contract
9
9
10
- > Get contracts (available for deploy) by UUID
10
+ > Get contract (available for deploy) by UUID
11
11
12
12
<CodeDiv >GET /contracts/: uuid </CodeDiv >
13
13
@@ -26,25 +26,28 @@ in smart contract operations on the blockchain through simple API calls.
26
26
| -------- | ---------------------|
27
27
| 40421001 | Contract not found. |
28
28
29
- #### Response
30
-
31
- Response is a list of items (shorter version) described [ under Response Fields above] ( #response-fields-2 ) .
29
+ #### Response Fields
30
+ Contract that can be used to create an instance of deployed contract.
32
31
33
- Item is a shorter version because it is a flat object and it doesn't include nested ` contractVersion ` (with ` abi ` ,
34
- ` methods ` and ` contract ` ), instead it exposes some details from this table:
32
+ | Name | Type | Description |
33
+ | --------------- | ------------| -----------------------------------------------------|
34
+ | contractUuid | ` string ` | Unique identifier for the contract. |
35
+ | contractType | ` number ` | Type identifier of the contract (described bellow). |
36
+ | chainType | ` number ` | Type of blockchain the contract is deployed on. |
37
+ | name | ` string ` | Name of the contract. |
38
+ | description | ` string ` | Description of the contract. |
39
+ | contractVersion | ` string ` | Version of the contract. |
40
+ | createTime | ` DateTime ` | Creation time of the contract. |
41
+ | updateTime | ` DateTime ` | Update time of the contract. |
35
42
36
- ##### Response Fields
43
+ ##### Contract Types
37
44
38
- | Name | Type | Description |
39
- | --------------- | -------------------| -----------------------------------------------------|
40
- | contractUuid | ` string ` | Unique identifier for the contract. |
41
- | contractType | ` number ` | Type identifier of the contract (described bellow). |
42
- | chainType | ` number ` | Type of blockchain the contract is deployed on. |
43
- | name | ` string ` | Name of the contract. |
44
- | description | ` string ` | Description of the contract. |
45
- | contractVersion | ` ContractVersion ` | Version of the contract (if available). |
46
- | createTime | ` DateTime ` | Creation time of the contract. |
47
- | updateTime | ` DateTime ` | Update time of the contract. |
45
+ | Name | Value | Description |
46
+ | -----------| -------| -------------------------------|
47
+ | OTHER | 1 | Other Contracts |
48
+ | ERC_20 | 2 | ERC-20 Compatible Contracts |
49
+ | ERC_721 | 3 | ERC-721 Compatible Contracts |
50
+ | ERC_1155 | 4 | ERC-1155 Compatible Contracts |
48
51
49
52
##### Contract Version
50
53
Version of the contract used for deploying.
@@ -58,6 +61,7 @@ Version of the contract used for deploying.
58
61
| updateTime | ` DateTime ` | Contract last update time. |
59
62
60
63
###### Contract ABI
64
+ ABI for deployable contract.
61
65
62
66
| Name | Type | Description |
63
67
| --------------- | -------------- | -------------------------------------------- |
@@ -67,6 +71,7 @@ Version of the contract used for deploying.
67
71
| outputs | ` Output[] ` | List of output parameters for the function. |
68
72
69
73
###### Contract Method
74
+ Methods of deployable contract.
70
75
71
76
| Name | Type | Description |
72
77
| ------------- | ---------- | ------------------------------------ |
@@ -76,6 +81,7 @@ Version of the contract used for deploying.
76
81
| createTime | ` DateTime ` | Creation time of the method. |
77
82
| updateTime | ` DateTime ` | Update time of the method. |
78
83
84
+
79
85
</div >
80
86
<div class =" split_side " >
81
87
@@ -292,15 +298,17 @@ All query parameters from [listing request](1-apillon-api.md#listing-requests),
292
298
#### Response Fields
293
299
Endpoint returns ABI methods as an array.
294
300
295
- Array item(s) format depends on value of ` solidityJson ` passed as query parameter (human-readable ABI or ABI in Solidity JSON format).
301
+ Array item(s) format depends on value of ` solidityJson ` passed as query parameter:
302
+ - Human-readable ABI (solidityJson=false)
303
+ - ABI in Solidity JSON format (solidityJson=true)
296
304
297
305
</div >
298
306
</div >
299
307
300
308
301
309
### Deploy Contract
302
310
303
- > Deploy a new contract
311
+ > Deploy an instance of contract
304
312
305
313
<CodeDiv >POST /contracts/: uuid /deploy</CodeDiv >
306
314
@@ -423,7 +431,7 @@ curl --location 'https://api.apillon.io/contracts/:uuid/deploy' \
423
431
424
432
#### Response Fields
425
433
426
- | Name | Type | Description |
434
+ | Field | Type | Description |
427
435
| ----------------------| ------------------------------| ------------------------------------------------------------------------|
428
436
| contractUuid | ` string ` | Unique identifier of the contract. |
429
437
| projectUuid | ` string ` | Unique identifier of the project. |
@@ -441,19 +449,6 @@ curl --location 'https://api.apillon.io/contracts/:uuid/deploy' \
441
449
| createTime | ` DateTime ` | Collection create time. |
442
450
| updateTime | ` DateTime ` | Collection last update time. |
443
451
444
- ###### Contract
445
- Contract details can be found under contractVersion.contract.
446
-
447
- | Name | Type | Description |
448
- | --------------- | ------------| -----------------------------------------------------|
449
- | contractUuid | ` string ` | Unique identifier for the contract. |
450
- | contractType | ` number ` | Type identifier of the contract (described bellow). |
451
- | chainType | ` number ` | Type of blockchain the contract is deployed on. |
452
- | name | ` string ` | Name of the contract. |
453
- | description | ` string ` | Description of the contract. |
454
- | contractVersion | ` string ` | Version of the contract. |
455
- | createTime | ` DateTime ` | Creation time of the contract. |
456
- | updateTime | ` DateTime ` | Update time of the contract. |
457
452
458
453
</div >
459
454
<div class =" split_side " >
@@ -603,15 +598,6 @@ curl --location 'https://api.apillon.io/contracts/deployed/:uuid' --header 'Auth
603
598
| Moonbase | 1287 | Moonbase Network |
604
599
| Moonbeam | 1284 | Moonbeam Network |
605
600
606
- ###### Contract Types
607
-
608
- | Name | Value | Description |
609
- | -----------| -------| -------------------------------|
610
- | OTHER | 1 | Other Contracts |
611
- | ERC_20 | 2 | ERC-20 Compatible Contracts |
612
- | ERC_721 | 3 | ERC-721 Compatible Contracts |
613
- | ERC_1155 | 4 | ERC-1155 Compatible Contracts |
614
-
615
601
##### Contract Statuses
616
602
617
603
| Name | Value | Description |
@@ -635,6 +621,7 @@ curl --location 'https://api.apillon.io/contracts/deployed/:uuid' --header 'Auth
635
621
### List Deployed Contracts
636
622
637
623
> Get a list of deployed contracts
624
+
638
625
> Items are paginated and can be filtered and ordered through query parameters.
639
626
640
627
<CodeDiv >GET /contracts/deployed</CodeDiv >
@@ -652,7 +639,7 @@ All query parameters from [listing request](1-apillon-api.md#listing-requests) p
652
639
653
640
#### Response
654
641
655
- Response is a list of items (shorter version) described [ under Response Fields above] ( #response-fields-2 ) .
642
+ Response is a list of items (shorter version) described [ under Response Fields above] ( #response-fields ) .
656
643
657
644
Item is a shorter version because it is a flat object and it doesn't include nested ` contractVersion ` (with ` abi ` ,
658
645
` methods ` and ` contract ` ), instead it exposes some details from this table:
@@ -742,7 +729,7 @@ curl --location 'https://api.apillon.io/contracts/deployed' --header 'Authorizat
742
729
743
730
### Call Deployed Contract
744
731
745
- > Execute a function on a deployed contract
732
+ > Execute a write function on a deployed contract
746
733
747
734
<CodeDiv >POST /contracts/deployed/: uuid /call</CodeDiv >
748
735
@@ -776,10 +763,9 @@ NOTE: See contract ABI for available methods and arguments required for calling
776
763
| 50021006 | Contract address missing. |
777
764
778
765
#### Response
779
- A response is an instance of the newly created [ contract ] ( /build/8-computing-api.html#response-fields-computing-contract ) .
766
+ Response contains transaction details .
780
767
781
768
##### Response Fields
782
- Response with transaction details.
783
769
784
770
| Name | Type | Description |
785
771
| -------------------| -------------| --------------------------------------------- |
@@ -792,7 +778,7 @@ Response with transaction details.
792
778
| transactionHash | ` string ` | Hash of the transaction. |
793
779
| referenceTable | ` string ` | Reference table for the transaction metadata. |
794
780
| referenceId | ` string ` | Reference identifier for related data. |
795
- | data | ` null ` | Additional transaction data (if any). |
781
+ | data | ` any ` | Additional transaction data (if any). |
796
782
| projectUuid | ` string ` | Unique identifier of the project. |
797
783
798
784
</div >
@@ -931,9 +917,7 @@ curl --location --request GET 'https://api.apillon.io/contracts/deployed/:uuid/a
931
917
| 40300000 | Not allowed to access deployed contract. |
932
918
933
919
#### Response
934
- Endpoint returns archived contract.
935
-
936
- Array item(s) format depends on value of ` solidityJson ` passed as query parameter (human-readable ABI or ABI in Solidity JSON format).
920
+ Response includes details about archived contract.
937
921
938
922
##### Response Fields
939
923
@@ -1002,7 +986,7 @@ curl --location --request GET 'https://api.apillon.io/contracts/deployed/:uuid/a
1002
986
1003
987
### List Contract Transactions
1004
988
1005
- > Get a list of transactions for a deployed contract
989
+ > Get a list of transactions for deployed contract
1006
990
1007
991
<CodeDiv >GET /contracts/deployed/: uuid /transactions</CodeDiv >
1008
992
@@ -1034,9 +1018,24 @@ Endpoint returns transactions for deployed contract based on filters.
1034
1018
1035
1019
##### Response Fields
1036
1020
1037
- | Name | Type | Description |
1038
- | --------------------- | --------------------| --------------------------------------------- |
1039
- | createTime | ` DateTime ` | Creation time of the contract. |
1021
+ | Name | Type | Description |
1022
+ | -------------------------| ------------| -------------------------------------|
1023
+ | ` contractUuid ` | ` string ` | UUID of the contract. |
1024
+ | ` projectUuid ` | ` string ` | UUID of the associated project. |
1025
+ | ` name ` | ` string ` | Name of the contract. |
1026
+ | ` description ` | ` string ` | Description of the contract. |
1027
+ | ` chainType ` | ` number ` | Type of blockchain chain. |
1028
+ | ` chain ` | ` number ` | ID of the blockchain. |
1029
+ | ` versionId ` | ` number ` | Version ID of the contract. |
1030
+ | ` constructorArguments ` | ` any[] ` | Arguments for the constructor. |
1031
+ | ` contractStatus ` | ` number ` | Status of the contract deployment. |
1032
+ | ` contractAddress ` | ` string ` | Deployed contract address. |
1033
+ | ` deployerAddress ` | ` string ` | Address of the deployer. |
1034
+ | ` transactionHash ` | ` string ` | Transaction hash of deployment. |
1035
+ | ` contractVersion ` | ` string ` | Version of the contract (nullable). |
1036
+ | ` createTime ` | ` Datetime ` | Creation time of the contract. |
1037
+ | ` updateTime ` | ` Datetime ` | Last update time of the contract. |
1038
+
1040
1039
1041
1040
</div >
1042
1041
<div class =" split_side " >
@@ -1045,7 +1044,7 @@ Endpoint returns transactions for deployed contract based on filters.
1045
1044
<CodeGroupItem title="cURL" active>
1046
1045
1047
1046
``` sh
1048
- curl --location --request GET ' https://api.apillon.io/contracts/deployed/:uuid' --header ' Authorization: Basic :credentials'
1047
+ curl --location --request GET ' https://api.apillon.io/contracts/deployed/:uuid/transactions ' --header ' Authorization: Basic :credentials'
1049
1048
```
1050
1049
1051
1050
</CodeGroupItem >
0 commit comments