Skip to content

Commit

Permalink
Merge pull request #124 from clober-dex/feat/vault-final
Browse files Browse the repository at this point in the history
feat: vault final
  • Loading branch information
Dorvin authored Oct 22, 2024
2 parents 7bfe607 + 6ae8879 commit f9e7ec7
Show file tree
Hide file tree
Showing 14 changed files with 465 additions and 134 deletions.
1 change: 1 addition & 0 deletions examples/pool/set-strategy-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const main = async () => {
salt: zeroHash,
config: {
referenceThreshold: '0.1',
rebalanceThreshold: '0.1',
rateA: '0.1',
rateB: '0.1',
minRateA: '0.003',
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@clober/v2-sdk",
"version": "0.0.75.dev.2",
"version": "0.0.76",
"description": "🛠 An SDK for building applications on top of Clober V2",
"files": [
"dist"
Expand Down
32 changes: 32 additions & 0 deletions src/abis/rebalancer/minter-abi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,43 @@ export const MINTER_ABI = [
stateMutability: 'nonpayable',
type: 'constructor',
},
{
inputs: [
{
internalType: 'address',
name: 'target',
type: 'address',
},
],
name: 'AddressEmptyCode',
type: 'error',
},
{
inputs: [],
name: 'ERC20TransferFailed',
type: 'error',
},
{
inputs: [],
name: 'FailedCall',
type: 'error',
},
{
inputs: [
{
internalType: 'uint256',
name: 'balance',
type: 'uint256',
},
{
internalType: 'uint256',
name: 'needed',
type: 'uint256',
},
],
name: 'InsufficientBalance',
type: 'error',
},
{
inputs: [],
name: 'NativeTransferFailed',
Expand Down
86 changes: 23 additions & 63 deletions src/abis/rebalancer/operator-abi.ts
Original file line number Diff line number Diff line change
@@ -1,56 +1,19 @@
export const OPERATOR_ABI = [
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'address',
name: 'previousAdmin',
type: 'address',
},
{
indexed: false,
internalType: 'address',
name: 'newAdmin',
type: 'address',
},
],
name: 'AdminChanged',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'beacon',
internalType: 'contract ISimpleOracleStrategy',
name: 'oracleStrategy_',
type: 'address',
},
],
name: 'BeaconUpgraded',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'implementation',
internalType: 'contract IRebalancer',
name: 'rebalancer_',
type: 'address',
},
],
name: 'Upgraded',
type: 'event',
},
{
stateMutability: 'payable',
type: 'fallback',
},
{
stateMutability: 'payable',
type: 'receive',
stateMutability: 'nonpayable',
type: 'constructor',
},
{
inputs: [
Expand Down Expand Up @@ -183,6 +146,19 @@ export const OPERATOR_ABI = [
name: 'OwnershipTransferred',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'implementation',
type: 'address',
},
],
name: 'Upgraded',
type: 'event',
},
{
inputs: [],
name: 'UPGRADE_INTERFACE_VERSION',
Expand Down Expand Up @@ -324,12 +300,12 @@ export const OPERATOR_ABI = [
type: 'int24',
},
{
internalType: 'uint64',
name: 'alpha',
type: 'uint64',
internalType: 'uint24',
name: 'rate',
type: 'uint24',
},
],
name: 'updatePrice',
name: 'updatePosition',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
Expand All @@ -352,20 +328,4 @@ export const OPERATOR_ABI = [
stateMutability: 'payable',
type: 'function',
},
{
inputs: [
{
internalType: 'address',
name: '_logic',
type: 'address',
},
{
internalType: 'bytes',
name: '_data',
type: 'bytes',
},
],
stateMutability: 'payable',
type: 'constructor',
},
] as const
32 changes: 32 additions & 0 deletions src/abis/rebalancer/rebalancer-abi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ export const REBALANCER_ABI = [
stateMutability: 'nonpayable',
type: 'constructor',
},
{
inputs: [
{
internalType: 'address',
name: 'target',
type: 'address',
},
],
name: 'AddressEmptyCode',
type: 'error',
},
{
inputs: [],
name: 'AlreadyOpened',
Expand All @@ -25,6 +36,27 @@ export const REBALANCER_ABI = [
name: 'ERC20TransferFailed',
type: 'error',
},
{
inputs: [],
name: 'FailedCall',
type: 'error',
},
{
inputs: [
{
internalType: 'uint256',
name: 'balance',
type: 'uint256',
},
{
internalType: 'uint256',
name: 'needed',
type: 'uint256',
},
],
name: 'InsufficientBalance',
type: 'error',
},
{
inputs: [],
name: 'InvalidAmount',
Expand Down
Loading

0 comments on commit f9e7ec7

Please sign in to comment.