Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sdai token wrapper #561

Merged
merged 28 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
89b8eca
feat: added tests
JoaquinBattilana Aug 22, 2023
4545849
feat: added test for stable debt
JoaquinBattilana Aug 22, 2023
28189af
Merge branch 'master' into feat/repay-bundle
grothem Sep 6, 2023
9a9b693
fix: bad merge
grothem Sep 6, 2023
30c68cc
feat: added encoded tx data
JoaquinBattilana Sep 15, 2023
718b1e3
feat: added test for signed repay with l2 pool
JoaquinBattilana Sep 15, 2023
529ca8b
feat: -1 handle
JoaquinBattilana Sep 15, 2023
8d191bf
feat: added test for repay with max input (-1)
JoaquinBattilana Sep 15, 2023
2e22958
Merge branch 'master' into feat/repay-bundle
JoaquinBattilana Oct 17, 2023
f5b8cfb
feat: added encode functions for using optimized path
grothem Oct 24, 2023
46fe68f
fix: rate mode and max repay
grothem Oct 24, 2023
0efe719
test: repay amount and interest rate mode
grothem Oct 24, 2023
c7a4453
feat: sdai token wrapper
grothem Aug 31, 2023
e9c9a46
test: sdai wrapper
grothem Aug 31, 2023
ab88fdf
fix: sdai token preview
grothem Aug 31, 2023
3858435
test: coverage
grothem Sep 1, 2023
3eefd88
feat: updated typings
grothem Oct 25, 2023
08ab6cd
fix: compile errors
grothem Oct 25, 2023
a629bd5
feat: generic token wrapping service
grothem Oct 25, 2023
7dfe344
fix: export
grothem Oct 25, 2023
3c5fc7b
fix: explicit return types
grothem Oct 25, 2023
d137084
Merge branch 'master' into feat/sdai-wrapper
grothem Nov 22, 2023
c8b03e9
fix: cleanup
grothem Nov 22, 2023
44446e8
Merge branch 'master' into feat/sdai-wrapper
grothem Feb 12, 2024
ae08eed
fix: tests
grothem Feb 12, 2024
b0d1f63
test: ci
grothem Feb 13, 2024
4197d70
chore: cleanup
grothem Feb 13, 2024
82a145b
fix: types
grothem Feb 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ module.exports = {
'packages/contract-helpers/src/v3-migration-contract/typechain',
'packages/contract-helpers/src/index.ts',
'packages/math-utils/src/formatters/reserve/index.ts',
'packages/contract-helpers/src/V3-uiStakeDataProvider-contract/index.ts',
],
modulePathIgnorePatterns: ['node_modules'],
testEnvironment: 'node',
Expand Down
46 changes: 12 additions & 34 deletions packages/contract-helpers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,50 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# 1.24.0 (2024-02-05)


### Features

* abpt v2 migration ([#573](https://github.com/aave/aave-utilities/issues/573)) ([75bb4c0](https://github.com/aave/aave-utilities/commit/75bb4c038ea10b8faf42630a7fb580e7317623b8))




- abpt v2 migration ([#573](https://github.com/aave/aave-utilities/issues/573))
([75bb4c0](https://github.com/aave/aave-utilities/commit/75bb4c038ea10b8faf42630a7fb580e7317623b8))

## 1.23.1 (2024-01-24)

**Note:** Version bump only for package @aave/contract-helpers





# 1.23.0 (2024-01-19)


### Features

* add bnb ([#571](https://github.com/aave/aave-utilities/issues/571)) ([5b92d16](https://github.com/aave/aave-utilities/commit/5b92d16a39dfb47e0cae95fd3480863b8f9afc75))




- add bnb ([#571](https://github.com/aave/aave-utilities/issues/571))
([5b92d16](https://github.com/aave/aave-utilities/commit/5b92d16a39dfb47e0cae95fd3480863b8f9afc75))

# 1.22.0 (2024-01-18)


### Features

* gov v3 ([#564](https://github.com/aave/aave-utilities/issues/564)) ([335588e](https://github.com/aave/aave-utilities/commit/335588e2e04056b631a47b1ede50594baebd158e)), closes [#567](https://github.com/aave/aave-utilities/issues/567)




- gov v3 ([#564](https://github.com/aave/aave-utilities/issues/564))
([335588e](https://github.com/aave/aave-utilities/commit/335588e2e04056b631a47b1ede50594baebd158e)),
closes [#567](https://github.com/aave/aave-utilities/issues/567)

## 1.21.1 (2023-11-21)

**Note:** Version bump only for package @aave/contract-helpers





# Change Log

All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# 1.21.0 (2023-10-04)


### Features

* updated debt switch interface ([#559](https://github.com/aave/aave-utilities/issues/559)) ([b108c62](https://github.com/aave/aave-utilities/commit/b108c620cf0e3e446840c166b660695ebd66563b))




- updated debt switch interface
([#559](https://github.com/aave/aave-utilities/issues/559))
([b108c62](https://github.com/aave/aave-utilities/commit/b108c620cf0e3e446840c166b660695ebd66563b))

# 1.20.0 (2023-08-22)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import type {
PopulatedTransaction,
Signer,
utils,
} from "ethers";
import type { FunctionFragment, Result } from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
} from 'ethers';
import type { FunctionFragment, Result } from '@ethersproject/abi';
import type { Listener, Provider } from '@ethersproject/providers';
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";
} from './common';

export declare namespace IGovernanceCore {
export type VotingConfigStruct = {
Expand All @@ -33,7 +33,7 @@ export declare namespace IGovernanceCore {
number,
BigNumber,
BigNumber,
BigNumber
BigNumber,
] & {
coolDownBeforeVotingStart: number;
votingDuration: number;
Expand Down Expand Up @@ -75,7 +75,7 @@ export declare namespace IGovernanceCore {
BigNumber,
BigNumber,
BigNumber,
PayloadsControllerUtils.PayloadStructOutput[]
PayloadsControllerUtils.PayloadStructOutput[],
] & {
state: number;
accessLevel: number;
Expand Down Expand Up @@ -103,7 +103,7 @@ export declare namespace IGovernanceDataHelper {

export type VotingConfigStructOutput = [
number,
IGovernanceCore.VotingConfigStructOutput
IGovernanceCore.VotingConfigStructOutput,
] & { accessLevel: number; config: IGovernanceCore.VotingConfigStructOutput };

export type ConstantsStruct = {
Expand All @@ -119,7 +119,7 @@ export declare namespace IGovernanceDataHelper {
BigNumber,
BigNumber,
BigNumber,
BigNumber
BigNumber,
] & {
votingConfigs: IGovernanceDataHelper.VotingConfigStructOutput[];
precisionDivider: BigNumber;
Expand All @@ -137,7 +137,7 @@ export declare namespace IGovernanceDataHelper {
export type ProposalStructOutput = [
BigNumber,
BigNumber,
IGovernanceCore.ProposalStructOutput
IGovernanceCore.ProposalStructOutput,
] & {
id: BigNumber;
votingChainId: BigNumber;
Expand Down Expand Up @@ -183,42 +183,42 @@ export declare namespace PayloadsControllerUtils {

export interface GovernanceDataHelperInterface extends utils.Interface {
functions: {
"getConstants(address,uint8[])": FunctionFragment;
"getProposalsData(address,uint256,uint256,uint256)": FunctionFragment;
"getRepresentationData(address,address,uint256[])": FunctionFragment;
'getConstants(address,uint8[])': FunctionFragment;
'getProposalsData(address,uint256,uint256,uint256)': FunctionFragment;
'getRepresentationData(address,address,uint256[])': FunctionFragment;
};

getFunction(
nameOrSignatureOrTopic:
| "getConstants"
| "getProposalsData"
| "getRepresentationData"
| 'getConstants'
| 'getProposalsData'
| 'getRepresentationData',
): FunctionFragment;

encodeFunctionData(
functionFragment: "getConstants",
values: [string, BigNumberish[]]
functionFragment: 'getConstants',
values: [string, BigNumberish[]],
): string;
encodeFunctionData(
functionFragment: "getProposalsData",
values: [string, BigNumberish, BigNumberish, BigNumberish]
functionFragment: 'getProposalsData',
values: [string, BigNumberish, BigNumberish, BigNumberish],
): string;
encodeFunctionData(
functionFragment: "getRepresentationData",
values: [string, string, BigNumberish[]]
functionFragment: 'getRepresentationData',
values: [string, string, BigNumberish[]],
): string;

decodeFunctionResult(
functionFragment: "getConstants",
data: BytesLike
functionFragment: 'getConstants',
data: BytesLike,
): Result;
decodeFunctionResult(
functionFragment: "getProposalsData",
data: BytesLike
functionFragment: 'getProposalsData',
data: BytesLike,
): Result;
decodeFunctionResult(
functionFragment: "getRepresentationData",
data: BytesLike
functionFragment: 'getRepresentationData',
data: BytesLike,
): Result;

events: {};
Expand All @@ -234,15 +234,15 @@ export interface GovernanceDataHelper extends BaseContract {
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
toBlock?: string | number | undefined,
): Promise<Array<TEvent>>;

listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
eventFilter?: TypedEventFilter<TEvent>,
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
eventFilter: TypedEventFilter<TEvent>,
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
Expand All @@ -254,80 +254,80 @@ export interface GovernanceDataHelper extends BaseContract {
getConstants(
govCore: string,
accessLevels: BigNumberish[],
overrides?: CallOverrides
overrides?: CallOverrides,
): Promise<[IGovernanceDataHelper.ConstantsStructOutput]>;

getProposalsData(
govCore: string,
from: BigNumberish,
to: BigNumberish,
pageSize: BigNumberish,
overrides?: CallOverrides
overrides?: CallOverrides,
): Promise<[IGovernanceDataHelper.ProposalStructOutput[]]>;

getRepresentationData(
govCore: string,
wallet: string,
chainIds: BigNumberish[],
overrides?: CallOverrides
overrides?: CallOverrides,
): Promise<
[
IGovernanceDataHelper.RepresentativesStructOutput[],
IGovernanceDataHelper.RepresentedStructOutput[]
IGovernanceDataHelper.RepresentedStructOutput[],
]
>;
};

getConstants(
govCore: string,
accessLevels: BigNumberish[],
overrides?: CallOverrides
overrides?: CallOverrides,
): Promise<IGovernanceDataHelper.ConstantsStructOutput>;

getProposalsData(
govCore: string,
from: BigNumberish,
to: BigNumberish,
pageSize: BigNumberish,
overrides?: CallOverrides
overrides?: CallOverrides,
): Promise<IGovernanceDataHelper.ProposalStructOutput[]>;

getRepresentationData(
govCore: string,
wallet: string,
chainIds: BigNumberish[],
overrides?: CallOverrides
overrides?: CallOverrides,
): Promise<
[
IGovernanceDataHelper.RepresentativesStructOutput[],
IGovernanceDataHelper.RepresentedStructOutput[]
IGovernanceDataHelper.RepresentedStructOutput[],
]
>;

callStatic: {
getConstants(
govCore: string,
accessLevels: BigNumberish[],
overrides?: CallOverrides
overrides?: CallOverrides,
): Promise<IGovernanceDataHelper.ConstantsStructOutput>;

getProposalsData(
govCore: string,
from: BigNumberish,
to: BigNumberish,
pageSize: BigNumberish,
overrides?: CallOverrides
overrides?: CallOverrides,
): Promise<IGovernanceDataHelper.ProposalStructOutput[]>;

getRepresentationData(
govCore: string,
wallet: string,
chainIds: BigNumberish[],
overrides?: CallOverrides
overrides?: CallOverrides,
): Promise<
[
IGovernanceDataHelper.RepresentativesStructOutput[],
IGovernanceDataHelper.RepresentedStructOutput[]
IGovernanceDataHelper.RepresentedStructOutput[],
]
>;
};
Expand All @@ -338,45 +338,45 @@ export interface GovernanceDataHelper extends BaseContract {
getConstants(
govCore: string,
accessLevels: BigNumberish[],
overrides?: CallOverrides
overrides?: CallOverrides,
): Promise<BigNumber>;

getProposalsData(
govCore: string,
from: BigNumberish,
to: BigNumberish,
pageSize: BigNumberish,
overrides?: CallOverrides
overrides?: CallOverrides,
): Promise<BigNumber>;

getRepresentationData(
govCore: string,
wallet: string,
chainIds: BigNumberish[],
overrides?: CallOverrides
overrides?: CallOverrides,
): Promise<BigNumber>;
};

populateTransaction: {
getConstants(
govCore: string,
accessLevels: BigNumberish[],
overrides?: CallOverrides
overrides?: CallOverrides,
): Promise<PopulatedTransaction>;

getProposalsData(
govCore: string,
from: BigNumberish,
to: BigNumberish,
pageSize: BigNumberish,
overrides?: CallOverrides
overrides?: CallOverrides,
): Promise<PopulatedTransaction>;

getRepresentationData(
govCore: string,
wallet: string,
chainIds: BigNumberish[],
overrides?: CallOverrides
overrides?: CallOverrides,
): Promise<PopulatedTransaction>;
};
}
Loading
Loading