@pearcurve/sdk 0.0.0-stage → 0.1.0
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 +64 -0
- package/README.md +122 -2
- package/dist/abis/json/collateralTokenRegistry.json +257 -0
- package/dist/abis/json/errors.json +1034 -0
- package/dist/abis/json/feeManager.json +668 -0
- package/dist/abis/json/intentRegistry.json +1169 -0
- package/dist/abis/json/intentRegistryViews.json +958 -0
- package/dist/abis/json/loanAssetRegistry.json +220 -0
- package/dist/abis/json/loanHealthViewer.json +176 -0
- package/dist/abis/json/loanManager.json +1404 -0
- package/dist/abis/json/loanMarketCaps.json +1642 -0
- package/dist/abis/json/loanPositionToken.json +650 -0
- package/dist/abis/json/main.json +1951 -0
- package/dist/abis/json/matchingEngine.json +2060 -0
- package/dist/abis/json/priceOracle.json +453 -0
- package/dist/abis/json/protocolViewer.json +959 -0
- package/dist/abis/json/secondaryMarket.json +1348 -0
- package/dist/abis/json/strategyRegistry.json +237 -0
- package/dist/abis/json/termCurveOracle.json +346 -0
- package/dist/abis/json/yieldSource.json +298 -0
- package/dist/abis/json/yieldSourceRegistry.json +295 -0
- package/dist/abis.d.ts +21 -0
- package/dist/abis.d.ts.map +1 -0
- package/dist/abis.js +39 -0
- package/dist/abis.js.map +1 -0
- package/dist/borrowerSubmitPreflight.d.ts +14 -0
- package/dist/borrowerSubmitPreflight.d.ts.map +1 -0
- package/dist/borrowerSubmitPreflight.js +28 -0
- package/dist/borrowerSubmitPreflight.js.map +1 -0
- package/dist/bps.d.ts +11 -0
- package/dist/bps.d.ts.map +1 -0
- package/dist/bps.js +25 -0
- package/dist/bps.js.map +1 -0
- package/dist/clients.d.ts +23 -0
- package/dist/clients.d.ts.map +1 -0
- package/dist/clients.js +59 -0
- package/dist/clients.js.map +1 -0
- package/dist/decodeError.d.ts +24 -0
- package/dist/decodeError.d.ts.map +1 -0
- package/dist/decodeError.js +358 -0
- package/dist/decodeError.js.map +1 -0
- package/dist/encoding.d.ts +18 -0
- package/dist/encoding.d.ts.map +1 -0
- package/dist/encoding.js +94 -0
- package/dist/encoding.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/lenderSubmitPreflight.d.ts +20 -0
- package/dist/lenderSubmitPreflight.d.ts.map +1 -0
- package/dist/lenderSubmitPreflight.js +42 -0
- package/dist/lenderSubmitPreflight.js.map +1 -0
- package/dist/loanPositions.d.ts +23 -0
- package/dist/loanPositions.d.ts.map +1 -0
- package/dist/loanPositions.js +37 -0
- package/dist/loanPositions.js.map +1 -0
- package/dist/marketStats.d.ts +70 -0
- package/dist/marketStats.d.ts.map +1 -0
- package/dist/marketStats.js +117 -0
- package/dist/marketStats.js.map +1 -0
- package/dist/networkConfig.d.ts +48 -0
- package/dist/networkConfig.d.ts.map +1 -0
- package/dist/networkConfig.js +48 -0
- package/dist/networkConfig.js.map +1 -0
- package/dist/pause.d.ts +20 -0
- package/dist/pause.d.ts.map +1 -0
- package/dist/pause.js +40 -0
- package/dist/pause.js.map +1 -0
- package/dist/reads.d.ts +187 -0
- package/dist/reads.d.ts.map +1 -0
- package/dist/reads.js +353 -0
- package/dist/reads.js.map +1 -0
- package/dist/strategies.d.ts +14 -0
- package/dist/strategies.d.ts.map +1 -0
- package/dist/strategies.js +49 -0
- package/dist/strategies.js.map +1 -0
- package/dist/txGas.d.ts +19 -0
- package/dist/txGas.d.ts.map +1 -0
- package/dist/txGas.js +37 -0
- package/dist/txGas.js.map +1 -0
- package/dist/types.d.ts +69 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +11 -0
- package/dist/types.js.map +1 -0
- package/dist/yieldMigrationPreflight.d.ts +29 -0
- package/dist/yieldMigrationPreflight.d.ts.map +1 -0
- package/dist/yieldMigrationPreflight.js +61 -0
- package/dist/yieldMigrationPreflight.js.map +1 -0
- package/dist/yieldSources.d.ts +33 -0
- package/dist/yieldSources.d.ts.map +1 -0
- package/dist/yieldSources.js +106 -0
- package/dist/yieldSources.js.map +1 -0
- package/package.json +47 -4
- package/src/abis/json/collateralTokenRegistry.json +257 -0
- package/src/abis/json/errors.json +1034 -0
- package/src/abis/json/feeManager.json +668 -0
- package/src/abis/json/intentRegistry.json +1169 -0
- package/src/abis/json/intentRegistryViews.json +958 -0
- package/src/abis/json/loanAssetRegistry.json +220 -0
- package/src/abis/json/loanHealthViewer.json +176 -0
- package/src/abis/json/loanManager.json +1404 -0
- package/src/abis/json/loanMarketCaps.json +1642 -0
- package/src/abis/json/loanPositionToken.json +650 -0
- package/src/abis/json/main.json +1951 -0
- package/src/abis/json/matchingEngine.json +2060 -0
- package/src/abis/json/priceOracle.json +453 -0
- package/src/abis/json/protocolViewer.json +959 -0
- package/src/abis/json/secondaryMarket.json +1348 -0
- package/src/abis/json/strategyRegistry.json +237 -0
- package/src/abis/json/termCurveOracle.json +346 -0
- package/src/abis/json/yieldSource.json +298 -0
- package/src/abis/json/yieldSourceRegistry.json +295 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
Business Source License
|
|
2
|
+
|
|
3
|
+
Licensor: Pearcurve Labs
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**Definitions**
|
|
8
|
+
|
|
9
|
+
For purposes of this License:
|
|
10
|
+
|
|
11
|
+
**"Competitive Product or Service"** means any product or service providing lending, borrowing, liquidity, or closely substitutable functionality that is materially similar in purpose or function to those provided by the Pearcurve Protocol.
|
|
12
|
+
|
|
13
|
+
**"Derivative"** means any work that modifies, incorporates, is based upon, or would otherwise be considered a derivative work of, the Licensed Work, including under applicable copyright law.
|
|
14
|
+
|
|
15
|
+
**"Production Environment"** means an environment in which users interact with the Licensed Work using "live", real, economically meaningful or value-bearing digital assets.
|
|
16
|
+
|
|
17
|
+
**"Test Environment"** means an environment in which users interact with the Licensed Work using non-live test, simulated, or synthetic data.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
**Terms**
|
|
22
|
+
|
|
23
|
+
1. **Scope**
|
|
24
|
+
|
|
25
|
+
All copies of the original or modified Licensed Work, and any Derivative works of the Licensed Work, are subject to this License. This License applies separately for each version of the Licensed Work, and the Change Date may vary for each version. You must conspicuously reproduce this License in each copy of the Licensed Work or Derivative work.
|
|
26
|
+
|
|
27
|
+
2. **Grant of Rights**
|
|
28
|
+
|
|
29
|
+
Licensor hereby grants you a non-exclusive, non-transferable, non-sublicensable right to copy, modify, create Derivative works, redistribute, and use the Licensed Work solely in a Test Environment, subject to the conditions set forth in this License.
|
|
30
|
+
|
|
31
|
+
3. **No Competitive Production Deployment**
|
|
32
|
+
|
|
33
|
+
Any use of the Licensed Work, or any Derivative thereof, in a Production Environment is strictly prohibited. Licensor may grant waivers or commercial licenses for specific parties or use cases, at the direction of Pearcurve Protocol governance. If you are uncertain whether your intended use complies with this License, you must obtain a separate commercial license from Licensor before proceeding.
|
|
34
|
+
|
|
35
|
+
4. **No Prior Competitive Fork Operators**
|
|
36
|
+
|
|
37
|
+
You represent that you are not currently, and have not been within the four years prior to your first use of the Licensed Work, a Materially Involved Contributor to any project that has deployed or is seeking to deploy a Competitive Product or Service. This License automatically terminates at such time that this representation is no longer accurate. "Materially Involved Contributor" means direct participation in protocol design, smart contract development, deployment execution, or governance or operational decision-making relating to a Competitive Product or Service.
|
|
38
|
+
|
|
39
|
+
5. **No Material Misrepresentation of Affiliation**
|
|
40
|
+
|
|
41
|
+
You may not materially misrepresent affiliation with, or endorsement by, the Pearcurve Protocol or the Pearcurve brand even when using the Licensed Work.
|
|
42
|
+
|
|
43
|
+
6. **Change Date**
|
|
44
|
+
|
|
45
|
+
The Change Date is the earlier of:
|
|
46
|
+
|
|
47
|
+
- 5 years after the deployment date of the Pearcurve Protocol on Ethereum Mainnet
|
|
48
|
+
- If specified, a date designated by Pearcurve Protocol governance and recorded in the "changedate" text record at [designated address]
|
|
49
|
+
|
|
50
|
+
A Change Date set through governance takes precedence over the stated date above.
|
|
51
|
+
|
|
52
|
+
7. **Change License**
|
|
53
|
+
|
|
54
|
+
The Change License shall be the MIT License.
|
|
55
|
+
|
|
56
|
+
8. **General**
|
|
57
|
+
|
|
58
|
+
If your use of the Licensed Work does not comply with the requirements of this License, your rights under this License automatically terminate and you must either refrain from using the Licensed Work or obtain a separate commercial license from Licensor or its authorized delegates.
|
|
59
|
+
|
|
60
|
+
If any condition of this License is held unenforceable as applied, such condition shall be severed to the minimum extent necessary, and the remaining conditions shall remain in full force and effect.
|
|
61
|
+
|
|
62
|
+
This License does not grant you any right in any trademark or logo of Pearcurve, except as required for accurate attribution.
|
|
63
|
+
|
|
64
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,123 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Pearcurve TypeScript SDK (`@pearcurve/sdk`)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Install this package to write on-chain** — encode calldata and submit transactions via [ethers v6](https://docs.ethers.org/v6/).
|
|
4
|
+
|
|
5
|
+
For **reading** protocol state (intent book, loans, health), use the **public read API** — no install. See the [pearcurve-api](https://github.com/pearcurve/pearcurve-api) README.
|
|
6
|
+
|
|
7
|
+
> **Repo note:** The SDK moved here from the `pearcurve-solidity` monorepo and publishes as `@pearcurve/sdk` on npm. Its ABIs and addresses come from `@pearcurve/contracts`, published by pearcurve-solidity.
|
|
8
|
+
|
|
9
|
+
## Contents
|
|
10
|
+
|
|
11
|
+
- **ABIs** — `Main`, `MatchingEngine`, `IntentRegistry` (core), **`IntentRegistryViews`**, `YieldSourceRegistry`, `IYieldSource`, and **`Errors.sol`** (`src/abis/json/errors.json`). Refresh after a contracts release with `npm run sync-abis`, which always copies `abis/` from `@pearcurve/contracts@latest` (the contracts package builds them from Foundry `out/` + `Errors.sol` error fragments + enum normalization). Or manually copy ABIs and run `npm run normalize-abis` so enum fields use `uint8` (avoids ethers `[Warning] Invalid Fragment`).
|
|
12
|
+
- **Custom errors** — `decodeProtocolError` / `formatProtocolError` map revert selectors (`bytes4(keccak256("FillExceedsCapacity()"))`) from `Errors.sol` to human-readable copy. UI, API, and bots should use this instead of scraping wallet text.
|
|
13
|
+
- **Preflight** — `assertLenderSubmitLiquidity(provider, …)` mirrors on-chain checks for `committedCapacity + maxPrincipal` vs yield `balanceOf` or wallet `min(balance, allowance)` before `submitLenderIntent`.
|
|
14
|
+
- **Encoding** — `encodeSubmitLenderIntent`, `encodeMatchBundleOnChain`, etc.
|
|
15
|
+
- **Clients** — `getMain`, `getMatchingEngine`, `getIntentRegistry` (core), **`getIntentRegistryViews`**, `getYieldSourceRegistry`, `getYieldSource` helpers.
|
|
16
|
+
- **Loan positions** — `transferLoanPosition`, `listLoanPosition`, `delistLoanPosition`, and `getLoanPositionTokenFromMain` for direct lender position NFT ownership flows.
|
|
17
|
+
- **Yield sources** — `listApprovedYieldSourceAddresses`, `fetchSupportedYieldSourceApys`, `fetchSupportedYieldSourceApysFromMain` (wraps registry + `IYieldSource.currentApy` / `name`).
|
|
18
|
+
- **Network config** — `src/networkConfig.ts`: `deployments`, `getDeployment`, `requireDeployment`, and `PearcurveChainId` (regenerate after a deployment with `npm run sync-deployments -- @pearcurve/contracts@<version> <chainId>`, then `npm run build`).
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Consumers should depend on **`ethers` ^6.16** (see `peerDependencies`).
|
|
27
|
+
|
|
28
|
+
## API vs SDK
|
|
29
|
+
|
|
30
|
+
| | Read API | SDK (this package) |
|
|
31
|
+
|--|----------|---------------------|
|
|
32
|
+
| **Install** | **None** — public URL | `npm install @pearcurve/sdk` |
|
|
33
|
+
| **Access** | `GET https://api.pearcurve.io/v1/...` | Import + wallet / signer |
|
|
34
|
+
| **Use for** | Dashboards, analytics, bot polling | Submit intents, matches, liquidations |
|
|
35
|
+
| **Location** | Hosted service (pearcurve-api) | This repository |
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Reading — no install
|
|
39
|
+
curl https://api.pearcurve.io/v1/intents/book
|
|
40
|
+
|
|
41
|
+
# Writing — install SDK
|
|
42
|
+
npm install @pearcurve/sdk ethers
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The solver bot reads the on-chain intent book via this SDK (IntentRegistryViews + PriceOracle) and submits `matchBundleOnChain`. Other bots/apps may still fetch the public API for state.
|
|
46
|
+
|
|
47
|
+
### On-chain solver match (integrator / solver bot)
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
import { Wallet } from 'ethers'
|
|
51
|
+
import { getMain, type SolverSolution } from '@pearcurve/sdk'
|
|
52
|
+
|
|
53
|
+
const wallet = new Wallet(privateKey, provider)
|
|
54
|
+
|
|
55
|
+
const sol: SolverSolution = {
|
|
56
|
+
lenderIntentIds: [lenderIntentId],
|
|
57
|
+
borrowerIntentIds: [borrowerIntentId],
|
|
58
|
+
agreedRates: [agreedRateBps],
|
|
59
|
+
fillAmounts: [fillAmount],
|
|
60
|
+
solverTip: 0n,
|
|
61
|
+
solver: wallet.address,
|
|
62
|
+
deadline,
|
|
63
|
+
signature,
|
|
64
|
+
}
|
|
65
|
+
await getMain(mainAddress, wallet).matchBundleOnChain(sol)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Build
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npm run build
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Output: `dist/` (TypeScript declarations included).
|
|
75
|
+
|
|
76
|
+
## Publish
|
|
77
|
+
|
|
78
|
+
`npm run publish:sdk` publishes this package as `@pearcurve/sdk`. It copies ABIs from `@pearcurve/contracts@latest`, runs the test suite, then `npm publish --access public`. A merge does not publish it.
|
|
79
|
+
|
|
80
|
+
Bump `version` in `package.json` first. npm rejects a second publish of the same version. You need to be logged in as a member of the `pearcurve` npm org.
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm run publish:sdk
|
|
84
|
+
npm run publish:sdk -- --dry-run
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Integration tests
|
|
88
|
+
|
|
89
|
+
Tests deploy the same mock stack as `test/TestBase.sol` in pearcurve-solidity against a local **Anvil** instance (spawned by Vitest on port **19545** by default).
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# pearcurve-solidity cloned next to this repo, or set PEARCURVE_CONTRACTS_DIR to it
|
|
93
|
+
(cd ../pearcurve-solidity && forge build) && npm test
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Override port: `ANVIL_PORT=19546 npm test`. Use an existing node: `SKIP_ANVIL=1 ANVIL_RPC_URL=http://127.0.0.1:8545 npm test`.
|
|
97
|
+
|
|
98
|
+
### ethers + Anvil nonces
|
|
99
|
+
|
|
100
|
+
ethers v6’s `Wallet` can cache the account nonce incorrectly across rapid `ContractFactory.deploy` / contract calls. The test helpers use an explicit nonce counter for the deployer during setup, and per-actor counters in integration tests. In your app, prefer `provider.getTransactionCount(address, 'latest')` (or a `NonceManager`-style pattern) when automating many txs from the same key.
|
|
101
|
+
|
|
102
|
+
## Loan Position Helpers
|
|
103
|
+
|
|
104
|
+
```typescript
|
|
105
|
+
import {
|
|
106
|
+
getMain,
|
|
107
|
+
getLoanPositionTokenFromMain,
|
|
108
|
+
transferLoanPosition,
|
|
109
|
+
listLoanPosition,
|
|
110
|
+
delistLoanPosition,
|
|
111
|
+
} from '@pearcurve/sdk'
|
|
112
|
+
|
|
113
|
+
const main = getMain(mainAddress, signer)
|
|
114
|
+
const loanPositionToken = await getLoanPositionTokenFromMain(main)
|
|
115
|
+
|
|
116
|
+
await transferLoanPosition(loanPositionToken, signer.address, recipient, 42n)
|
|
117
|
+
await listLoanPosition(main, 42n, 1_050_000000n, usdcAddress, BigInt(Math.floor(Date.now() / 1000) + 7 * 86400))
|
|
118
|
+
await delistLoanPosition(main, 42n)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## License
|
|
122
|
+
|
|
123
|
+
Business Source License — see [`LICENSE`](LICENSE); contracts use `LicenseRef-BUSL` SPDX.
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "constructor",
|
|
4
|
+
"inputs": [
|
|
5
|
+
{
|
|
6
|
+
"name": "governor_",
|
|
7
|
+
"type": "address",
|
|
8
|
+
"internalType": "address"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"name": "_priceOracle",
|
|
12
|
+
"type": "address",
|
|
13
|
+
"internalType": "address"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"stateMutability": "nonpayable"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "function",
|
|
20
|
+
"name": "acceptGovernance",
|
|
21
|
+
"inputs": [],
|
|
22
|
+
"outputs": [],
|
|
23
|
+
"stateMutability": "nonpayable"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "function",
|
|
27
|
+
"name": "governor",
|
|
28
|
+
"inputs": [],
|
|
29
|
+
"outputs": [
|
|
30
|
+
{
|
|
31
|
+
"name": "",
|
|
32
|
+
"type": "address",
|
|
33
|
+
"internalType": "address"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"stateMutability": "view"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "function",
|
|
40
|
+
"name": "isApproved",
|
|
41
|
+
"inputs": [
|
|
42
|
+
{
|
|
43
|
+
"name": "",
|
|
44
|
+
"type": "address",
|
|
45
|
+
"internalType": "address"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"outputs": [
|
|
49
|
+
{
|
|
50
|
+
"name": "",
|
|
51
|
+
"type": "bool",
|
|
52
|
+
"internalType": "bool"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"stateMutability": "view"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "function",
|
|
59
|
+
"name": "listApprovedCollateralTokens",
|
|
60
|
+
"inputs": [],
|
|
61
|
+
"outputs": [
|
|
62
|
+
{
|
|
63
|
+
"name": "",
|
|
64
|
+
"type": "address[]",
|
|
65
|
+
"internalType": "address[]"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"stateMutability": "view"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "function",
|
|
72
|
+
"name": "listPricedCollateralTokensForLoanAsset",
|
|
73
|
+
"inputs": [
|
|
74
|
+
{
|
|
75
|
+
"name": "loanAsset",
|
|
76
|
+
"type": "address",
|
|
77
|
+
"internalType": "address"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"outputs": [
|
|
81
|
+
{
|
|
82
|
+
"name": "",
|
|
83
|
+
"type": "address[]",
|
|
84
|
+
"internalType": "address[]"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"stateMutability": "view"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "function",
|
|
91
|
+
"name": "pendingGovernor",
|
|
92
|
+
"inputs": [],
|
|
93
|
+
"outputs": [
|
|
94
|
+
{
|
|
95
|
+
"name": "",
|
|
96
|
+
"type": "address",
|
|
97
|
+
"internalType": "address"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"stateMutability": "view"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"type": "function",
|
|
104
|
+
"name": "priceOracle",
|
|
105
|
+
"inputs": [],
|
|
106
|
+
"outputs": [
|
|
107
|
+
{
|
|
108
|
+
"name": "",
|
|
109
|
+
"type": "address",
|
|
110
|
+
"internalType": "address"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"stateMutability": "view"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"type": "function",
|
|
117
|
+
"name": "registerCollateral",
|
|
118
|
+
"inputs": [
|
|
119
|
+
{
|
|
120
|
+
"name": "token",
|
|
121
|
+
"type": "address",
|
|
122
|
+
"internalType": "address"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"outputs": [],
|
|
126
|
+
"stateMutability": "nonpayable"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"type": "function",
|
|
130
|
+
"name": "removeCollateral",
|
|
131
|
+
"inputs": [
|
|
132
|
+
{
|
|
133
|
+
"name": "token",
|
|
134
|
+
"type": "address",
|
|
135
|
+
"internalType": "address"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"outputs": [],
|
|
139
|
+
"stateMutability": "nonpayable"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"type": "function",
|
|
143
|
+
"name": "requireApproved",
|
|
144
|
+
"inputs": [
|
|
145
|
+
{
|
|
146
|
+
"name": "token",
|
|
147
|
+
"type": "address",
|
|
148
|
+
"internalType": "address"
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"outputs": [],
|
|
152
|
+
"stateMutability": "view"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"type": "function",
|
|
156
|
+
"name": "transferGovernance",
|
|
157
|
+
"inputs": [
|
|
158
|
+
{
|
|
159
|
+
"name": "newGovernor",
|
|
160
|
+
"type": "address",
|
|
161
|
+
"internalType": "address"
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
"outputs": [],
|
|
165
|
+
"stateMutability": "nonpayable"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"type": "event",
|
|
169
|
+
"name": "CollateralRegistered",
|
|
170
|
+
"inputs": [
|
|
171
|
+
{
|
|
172
|
+
"name": "token",
|
|
173
|
+
"type": "address",
|
|
174
|
+
"indexed": true,
|
|
175
|
+
"internalType": "address"
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
"anonymous": false
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"type": "event",
|
|
182
|
+
"name": "CollateralRemoved",
|
|
183
|
+
"inputs": [
|
|
184
|
+
{
|
|
185
|
+
"name": "token",
|
|
186
|
+
"type": "address",
|
|
187
|
+
"indexed": true,
|
|
188
|
+
"internalType": "address"
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"anonymous": false
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"type": "event",
|
|
195
|
+
"name": "GovernorTransferInitiated",
|
|
196
|
+
"inputs": [
|
|
197
|
+
{
|
|
198
|
+
"name": "currentGovernor",
|
|
199
|
+
"type": "address",
|
|
200
|
+
"indexed": true,
|
|
201
|
+
"internalType": "address"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"name": "pendingGovernor_",
|
|
205
|
+
"type": "address",
|
|
206
|
+
"indexed": true,
|
|
207
|
+
"internalType": "address"
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
"anonymous": false
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"type": "event",
|
|
214
|
+
"name": "GovernorUpdated",
|
|
215
|
+
"inputs": [
|
|
216
|
+
{
|
|
217
|
+
"name": "oldGovernor",
|
|
218
|
+
"type": "address",
|
|
219
|
+
"indexed": true,
|
|
220
|
+
"internalType": "address"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"name": "newGovernor",
|
|
224
|
+
"type": "address",
|
|
225
|
+
"indexed": true,
|
|
226
|
+
"internalType": "address"
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
"anonymous": false
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"type": "error",
|
|
233
|
+
"name": "CallerIsNotGovernor",
|
|
234
|
+
"inputs": []
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"type": "error",
|
|
238
|
+
"name": "CallerIsNotPendingGovernor",
|
|
239
|
+
"inputs": []
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"type": "error",
|
|
243
|
+
"name": "UnsupportedCollateral",
|
|
244
|
+
"inputs": [
|
|
245
|
+
{
|
|
246
|
+
"name": "token",
|
|
247
|
+
"type": "address",
|
|
248
|
+
"internalType": "address"
|
|
249
|
+
}
|
|
250
|
+
]
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"type": "error",
|
|
254
|
+
"name": "ZeroAddress",
|
|
255
|
+
"inputs": []
|
|
256
|
+
}
|
|
257
|
+
]
|