@flarenetwork/flare-periphery-contract-artifacts 0.1.34 → 0.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/{README.root.md → README.md} +19 -16
- package/coston/README.md +7 -0
- package/coston/artifacts/contracts/IAgentOwnerRegistry.sol/IAgentOwnerRegistry.json +233 -0
- package/coston/artifacts/contracts/IAssetManager.sol/IAssetManager.json +62 -1023
- package/coston/artifacts/contracts/IAssetManagerEvents.sol/IAssetManagerEvents.json +19 -233
- package/{coston2/artifacts/contracts/ICoreVault.sol/ICoreVault.json → coston/artifacts/contracts/ICoreVaultClient.sol/ICoreVaultClient.json} +5 -24
- package/{coston2/artifacts/contracts/ICoreVaultSettings.sol/ICoreVaultSettings.json → coston/artifacts/contracts/ICoreVaultClientSettings.sol/ICoreVaultClientSettings.json} +0 -26
- package/coston/artifacts/contracts/IFdcVerification.sol/IFdcVerification.json +107 -107
- package/coston/artifacts/contracts/IWeb2JsonVerification.sol/IWeb2JsonVerification.json +1 -1
- package/coston2/README.md +7 -0
- package/coston2/artifacts/contracts/IAgentOwnerRegistry.sol/IAgentOwnerRegistry.json +233 -0
- package/coston2/artifacts/contracts/IAssetManager.sol/IAssetManager.json +62 -1023
- package/coston2/artifacts/contracts/IAssetManagerEvents.sol/IAssetManagerEvents.json +19 -233
- package/{coston/artifacts/contracts/ICoreVault.sol/ICoreVault.json → coston2/artifacts/contracts/ICoreVaultClient.sol/ICoreVaultClient.json} +5 -24
- package/{coston/artifacts/contracts/ICoreVaultSettings.sol/ICoreVaultSettings.json → coston2/artifacts/contracts/ICoreVaultClientSettings.sol/ICoreVaultClientSettings.json} +0 -26
- package/coston2/artifacts/contracts/IFdcVerification.sol/IFdcVerification.json +107 -107
- package/coston2/artifacts/contracts/IWeb2JsonVerification.sol/IWeb2JsonVerification.json +1 -1
- package/flare/README.md +7 -0
- package/flare/artifacts/contracts/IAgentOwnerRegistry.sol/IAgentOwnerRegistry.json +223 -0
- package/flare/artifacts/contracts/IFdcVerification.sol/IFdcVerification.json +107 -107
- package/flare/artifacts/contracts/IWeb2JsonVerification.sol/IWeb2JsonVerification.json +1 -1
- package/flare/artifacts/contracts/IWhitelist.sol/IWhitelist.json +47 -0
- package/package.json +22 -6
- package/songbird/README.md +7 -0
- package/songbird/artifacts/contracts/IAgentOwnerRegistry.sol/IAgentOwnerRegistry.json +223 -0
- package/songbird/artifacts/contracts/IFdcVerification.sol/IFdcVerification.json +107 -107
- package/songbird/artifacts/contracts/IWeb2JsonVerification.sol/IWeb2JsonVerification.json +1 -1
- package/songbird/artifacts/contracts/IWhitelist.sol/IWhitelist.json +47 -0
- package/coston/artifacts/contracts/ITransferFees.sol/ITransferFees.json +0 -394
- package/coston2/artifacts/contracts/ITransferFees.sol/ITransferFees.json +0 -394
package/LICENSE
CHANGED
|
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
17
17
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
18
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
19
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -4,8 +4,8 @@ This package contains ABIs and addresses for smart contracts deployed on [Flare
|
|
|
4
4
|
|
|
5
5
|
- Flare Mainnet
|
|
6
6
|
- Songbird Canary Network
|
|
7
|
-
- Songbird Testnet Coston
|
|
8
7
|
- Flare Testnet Coston2
|
|
8
|
+
- Songbird Testnet Coston
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
@@ -21,15 +21,17 @@ yarn add @flarenetwork/flare-periphery-contract-artifacts
|
|
|
21
21
|
|
|
22
22
|
#### ABI Access Functions
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
- `interfaceToAbi(name: string, network: string): any` - interact with the contract's public API.
|
|
24
|
+
<!-- FIXME:(FilipS) This is probably not correct?! Both functions currently return the same ABI. -->
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
- `nameToAbi(name: string, network: string): any` - Get full smart contract functionality.
|
|
27
|
+
- `interfaceToAbi(name: string, network: string): any` - Interact with the contract's public API.
|
|
28
|
+
|
|
29
|
+
Both functions return an ABI array. The `network` parameter must be one of:
|
|
28
30
|
|
|
29
|
-
- `"coston"`
|
|
30
|
-
- `"coston2"`
|
|
31
|
-
- `"songbird"`
|
|
32
31
|
- `"flare"`
|
|
32
|
+
- `"songbird"`
|
|
33
|
+
- `"coston2"`
|
|
34
|
+
- `"coston"`
|
|
33
35
|
|
|
34
36
|
```typescript
|
|
35
37
|
import { nameToAbi, interfaceToAbi } from "@flarenetwork/flare-periphery-contract";
|
|
@@ -40,8 +42,8 @@ const interfaceAbi = interfaceToAbi("IFtsoManager", "flare");
|
|
|
40
42
|
|
|
41
43
|
#### Address Resolution
|
|
42
44
|
|
|
43
|
-
- `nameToAddress(name: string, provider: ethers.JsonRpcApiProvider): Promise<string>`
|
|
44
|
-
- `namesToAddresses(names: string[], provider: ethers.JsonRpcApiProvider): Promise<string[]>`
|
|
45
|
+
- `nameToAddress(name: string, network: string, provider: ethers.JsonRpcApiProvider): Promise<string>`
|
|
46
|
+
- `namesToAddresses(names: string[], network: string, provider: ethers.JsonRpcApiProvider): Promise<string[]>`
|
|
45
47
|
|
|
46
48
|
These functions fetch contract addresses from the on-chain FlareContractRegistryLibrary.
|
|
47
49
|
|
|
@@ -50,7 +52,7 @@ import { nameToAddress } from "@flarenetwork/flare-periphery-contract-artifacts"
|
|
|
50
52
|
import { ethers } from "ethers";
|
|
51
53
|
|
|
52
54
|
const provider = new ethers.JsonRpcProvider("https://flare-api.flare.network/ext/C/rpc");
|
|
53
|
-
const address = await nameToAddress("FtsoManager", provider);
|
|
55
|
+
const address = await nameToAddress("FtsoManager", "flare", provider);
|
|
54
56
|
```
|
|
55
57
|
|
|
56
58
|
#### Constants
|
|
@@ -59,7 +61,7 @@ const address = await nameToAddress("FtsoManager", provider);
|
|
|
59
61
|
|
|
60
62
|
### Network-Specific Namespaces
|
|
61
63
|
|
|
62
|
-
Each network (`
|
|
64
|
+
Each network (`flare`, `songbird`, `coston2`, `coston`) exports:
|
|
63
65
|
|
|
64
66
|
#### 1. Products
|
|
65
67
|
|
|
@@ -69,9 +71,9 @@ Access contract information through `.ContractName` syntax:
|
|
|
69
71
|
import { flare } from "@flarenetwork/flare-periphery-contract-artifacts";
|
|
70
72
|
|
|
71
73
|
const ftsoManager = flare.products.FtsoManager;
|
|
72
|
-
console.log(ftsoManager.name);
|
|
73
|
-
console.log(ftsoManager.interface);
|
|
74
|
-
console.log(ftsoManager.abi);
|
|
74
|
+
console.log(ftsoManager.name); // Contract name
|
|
75
|
+
console.log(ftsoManager.interface); // Interface name
|
|
76
|
+
console.log(ftsoManager.abi); // Contract ABI
|
|
75
77
|
|
|
76
78
|
// Get deployed address
|
|
77
79
|
const address = await ftsoManager.getAddress(provider);
|
|
@@ -94,10 +96,11 @@ It is same as top-level functions but with the pre-set network:
|
|
|
94
96
|
```typescript
|
|
95
97
|
import { flare } from "@flarenetwork/flare-periphery-contract-artifacts";
|
|
96
98
|
|
|
97
|
-
|
|
99
|
+
// Network already known
|
|
100
|
+
const abi = flare.nameToAbi("FtsoManager");
|
|
98
101
|
const iAbi = flare.interfaceToAbi("IFtsoManager");
|
|
99
102
|
```
|
|
100
103
|
|
|
101
104
|
## Support
|
|
102
105
|
|
|
103
|
-
For issues and feature requests, please visit our [GitHub repository](https://github.com/flare-foundation/flare-smart-contracts-periphery).
|
|
106
|
+
For issues and feature requests, please visit our [GitHub repository](https://github.com/flare-foundation/flare-smart-contracts-periphery).
|
package/coston/README.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Coston periphery
|
|
2
|
+
|
|
3
|
+
This is package for smart contracts on network Coston from branch `coston_network_deployed_code`.
|
|
4
|
+
|
|
5
|
+
[Coston](https://docs.flare.network/tech/glossary/#coston) is a **testnet** for Songbird network.
|
|
6
|
+
|
|
7
|
+
Explorer link: [https://coston-explorer.flare.network/](https://coston-explorer.flare.network/)
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"inputs": [],
|
|
4
|
+
"name": "AgentNotWhitelisted",
|
|
5
|
+
"type": "error"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"inputs": [],
|
|
9
|
+
"name": "WorkAddressInUse",
|
|
10
|
+
"type": "error"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"anonymous": false,
|
|
14
|
+
"inputs": [
|
|
15
|
+
{
|
|
16
|
+
"indexed": true,
|
|
17
|
+
"internalType": "address",
|
|
18
|
+
"name": "managementAddress",
|
|
19
|
+
"type": "address"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"indexed": false,
|
|
23
|
+
"internalType": "string",
|
|
24
|
+
"name": "name",
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"indexed": false,
|
|
29
|
+
"internalType": "string",
|
|
30
|
+
"name": "description",
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"indexed": false,
|
|
35
|
+
"internalType": "string",
|
|
36
|
+
"name": "iconUrl",
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"indexed": false,
|
|
41
|
+
"internalType": "string",
|
|
42
|
+
"name": "termsOfUseUrl",
|
|
43
|
+
"type": "string"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"name": "AgentDataChanged",
|
|
47
|
+
"type": "event"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"anonymous": false,
|
|
51
|
+
"inputs": [
|
|
52
|
+
{
|
|
53
|
+
"indexed": false,
|
|
54
|
+
"internalType": "address",
|
|
55
|
+
"name": "value",
|
|
56
|
+
"type": "address"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"name": "Whitelisted",
|
|
60
|
+
"type": "event"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"anonymous": false,
|
|
64
|
+
"inputs": [
|
|
65
|
+
{
|
|
66
|
+
"indexed": false,
|
|
67
|
+
"internalType": "address",
|
|
68
|
+
"name": "value",
|
|
69
|
+
"type": "address"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"name": "WhitelistingRevoked",
|
|
73
|
+
"type": "event"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"anonymous": false,
|
|
77
|
+
"inputs": [
|
|
78
|
+
{
|
|
79
|
+
"indexed": true,
|
|
80
|
+
"internalType": "address",
|
|
81
|
+
"name": "managementAddress",
|
|
82
|
+
"type": "address"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"indexed": false,
|
|
86
|
+
"internalType": "address",
|
|
87
|
+
"name": "prevWorkAddress",
|
|
88
|
+
"type": "address"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"indexed": false,
|
|
92
|
+
"internalType": "address",
|
|
93
|
+
"name": "workAddress",
|
|
94
|
+
"type": "address"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"name": "WorkAddressChanged",
|
|
98
|
+
"type": "event"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"inputs": [
|
|
102
|
+
{
|
|
103
|
+
"internalType": "address",
|
|
104
|
+
"name": "_managementAddress",
|
|
105
|
+
"type": "address"
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"name": "getAgentDescription",
|
|
109
|
+
"outputs": [
|
|
110
|
+
{
|
|
111
|
+
"internalType": "string",
|
|
112
|
+
"name": "",
|
|
113
|
+
"type": "string"
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"stateMutability": "view",
|
|
117
|
+
"type": "function"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"inputs": [
|
|
121
|
+
{
|
|
122
|
+
"internalType": "address",
|
|
123
|
+
"name": "_managementAddress",
|
|
124
|
+
"type": "address"
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"name": "getAgentIconUrl",
|
|
128
|
+
"outputs": [
|
|
129
|
+
{
|
|
130
|
+
"internalType": "string",
|
|
131
|
+
"name": "",
|
|
132
|
+
"type": "string"
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"stateMutability": "view",
|
|
136
|
+
"type": "function"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"inputs": [
|
|
140
|
+
{
|
|
141
|
+
"internalType": "address",
|
|
142
|
+
"name": "_managementAddress",
|
|
143
|
+
"type": "address"
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"name": "getAgentName",
|
|
147
|
+
"outputs": [
|
|
148
|
+
{
|
|
149
|
+
"internalType": "string",
|
|
150
|
+
"name": "",
|
|
151
|
+
"type": "string"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"stateMutability": "view",
|
|
155
|
+
"type": "function"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"inputs": [
|
|
159
|
+
{
|
|
160
|
+
"internalType": "address",
|
|
161
|
+
"name": "_managementAddress",
|
|
162
|
+
"type": "address"
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"name": "getAgentTermsOfUseUrl",
|
|
166
|
+
"outputs": [
|
|
167
|
+
{
|
|
168
|
+
"internalType": "string",
|
|
169
|
+
"name": "",
|
|
170
|
+
"type": "string"
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
"stateMutability": "view",
|
|
174
|
+
"type": "function"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"inputs": [
|
|
178
|
+
{
|
|
179
|
+
"internalType": "address",
|
|
180
|
+
"name": "_workAddress",
|
|
181
|
+
"type": "address"
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"name": "getManagementAddress",
|
|
185
|
+
"outputs": [
|
|
186
|
+
{
|
|
187
|
+
"internalType": "address",
|
|
188
|
+
"name": "",
|
|
189
|
+
"type": "address"
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
"stateMutability": "view",
|
|
193
|
+
"type": "function"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"inputs": [
|
|
197
|
+
{
|
|
198
|
+
"internalType": "address",
|
|
199
|
+
"name": "_managementAddress",
|
|
200
|
+
"type": "address"
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"name": "getWorkAddress",
|
|
204
|
+
"outputs": [
|
|
205
|
+
{
|
|
206
|
+
"internalType": "address",
|
|
207
|
+
"name": "",
|
|
208
|
+
"type": "address"
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
"stateMutability": "view",
|
|
212
|
+
"type": "function"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"inputs": [
|
|
216
|
+
{
|
|
217
|
+
"internalType": "address",
|
|
218
|
+
"name": "_address",
|
|
219
|
+
"type": "address"
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
"name": "isWhitelisted",
|
|
223
|
+
"outputs": [
|
|
224
|
+
{
|
|
225
|
+
"internalType": "bool",
|
|
226
|
+
"name": "",
|
|
227
|
+
"type": "bool"
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"stateMutability": "view",
|
|
231
|
+
"type": "function"
|
|
232
|
+
}
|
|
233
|
+
]
|