Skip to content

Commit

Permalink
mocks: artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptotechmaker committed Oct 30, 2023
1 parent 05a3e9b commit 373506b
Show file tree
Hide file tree
Showing 6 changed files with 494 additions and 0 deletions.
99 changes: 99 additions & 0 deletions src/artifacts/tapioca-mocks/BalancerVaultMock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "BalancerVaultMock",
"sourceName": "contracts/BalancerVaultMock.sol",
"abi": [
{
"inputs": [
{
"components": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "enum BalancerVaultMock.SwapKind",
"name": "kind",
"type": "uint8"
},
{
"internalType": "contract IAsset",
"name": "assetIn",
"type": "address"
},
{
"internalType": "contract IAsset",
"name": "assetOut",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "userData",
"type": "bytes"
}
],
"internalType": "struct BalancerVaultMock.SingleSwap",
"name": "singleSwap",
"type": "tuple"
},
{
"components": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "bool",
"name": "fromInternalBalance",
"type": "bool"
},
{
"internalType": "address payable",
"name": "recipient",
"type": "address"
},
{
"internalType": "bool",
"name": "toInternalBalance",
"type": "bool"
}
],
"internalType": "struct BalancerVaultMock.FundManagement",
"name": "",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "swap",
"outputs": [
{
"internalType": "uint256",
"name": "amountCalculated",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
}
],
"bytecode": "0x6080806040523461001657610476908161001c8239f35b600080fdfe60806004908136101561001157600080fd5b600091823560e01c6352bbbe291461002857600080fd5b6003199160e0368401126103585781359167ffffffffffffffff938484116103605760c090843603011261037a5760c08201938285108186111761036757604094855283820135835260248085013596600288101561036457602097888601526044926100968488016103b6565b8887019081526064966100aa888a016103b6565b9060608101918252608081019960848101358b5260a481013590858211610342570136602382011215610360579081898d930135906100f46100eb836103dc565b9451948561037e565b8184523689838301011161035c578e8260a094938b8b9401838801378501015201526080366023190112610358578951916080830183811085821117610346578b5273ffffffffffffffffffffffffffffffffffffffff928635848116810361034257815287358015158103610342578d82015289358481168103610342578c820152608435908115158203610342579060608593920152511689518b518d8101916323b872dd60e01b83523389830152308a8301528b8201528a815260a0810181811087821117610330578d5251869283929083905af16101d46103f8565b81610300575b50156102bf575116908751908951908b82019263a9059cbb60e01b84523387840152878301528682526080820190828210908211176102ad578493929184918c5251925af16102276103f8565b8161027d575b501561023f5750505050519051908152f35b855162461bcd60e51b8152928301879052601c908301527f426f72696e6745524332303a205472616e73666572206661696c65640000000090820152fd5b80518015925089908315610295575b5050503861022d565b6102a59350820181019101610428565b38888161028c565b634e487b7160e01b8552604188528585fd5b5050875162461bcd60e51b8152948501899052505082018690527f426f72696e6745524332303a205472616e7366657246726f6d206661696c656490820152fd5b8051801592508d908315610318575b505050386101da565b6103289350820181019101610428565b388c8161030f565b634e487b7160e01b885260418b528888fd5b8680fd5b634e487b7160e01b8652604189528686fd5b8380fd5b8780fd5b8580fd5b80fd5b634e487b7160e01b865260418252602486fd5b8480fd5b90601f8019910116810190811067ffffffffffffffff8211176103a057604052565b634e487b7160e01b600052604160045260246000fd5b359073ffffffffffffffffffffffffffffffffffffffff821682036103d757565b600080fd5b67ffffffffffffffff81116103a057601f01601f191660200190565b3d15610423573d90610409826103dc565b91610417604051938461037e565b82523d6000602084013e565b606090565b908160209103126103d7575180151581036103d7579056fea2646970667358221220e560053cb5a82d8467b8176bbd05f1f380d22c7cd66d04579dab3002ac2d75c864736f6c63430008120033",
"deployedBytecode": "0x60806004908136101561001157600080fd5b600091823560e01c6352bbbe291461002857600080fd5b6003199160e0368401126103585781359167ffffffffffffffff938484116103605760c090843603011261037a5760c08201938285108186111761036757604094855283820135835260248085013596600288101561036457602097888601526044926100968488016103b6565b8887019081526064966100aa888a016103b6565b9060608101918252608081019960848101358b5260a481013590858211610342570136602382011215610360579081898d930135906100f46100eb836103dc565b9451948561037e565b8184523689838301011161035c578e8260a094938b8b9401838801378501015201526080366023190112610358578951916080830183811085821117610346578b5273ffffffffffffffffffffffffffffffffffffffff928635848116810361034257815287358015158103610342578d82015289358481168103610342578c820152608435908115158203610342579060608593920152511689518b518d8101916323b872dd60e01b83523389830152308a8301528b8201528a815260a0810181811087821117610330578d5251869283929083905af16101d46103f8565b81610300575b50156102bf575116908751908951908b82019263a9059cbb60e01b84523387840152878301528682526080820190828210908211176102ad578493929184918c5251925af16102276103f8565b8161027d575b501561023f5750505050519051908152f35b855162461bcd60e51b8152928301879052601c908301527f426f72696e6745524332303a205472616e73666572206661696c65640000000090820152fd5b80518015925089908315610295575b5050503861022d565b6102a59350820181019101610428565b38888161028c565b634e487b7160e01b8552604188528585fd5b5050875162461bcd60e51b8152948501899052505082018690527f426f72696e6745524332303a205472616e7366657246726f6d206661696c656490820152fd5b8051801592508d908315610318575b505050386101da565b6103289350820181019101610428565b388c8161030f565b634e487b7160e01b885260418b528888fd5b8680fd5b634e487b7160e01b8652604189528686fd5b8380fd5b8780fd5b8580fd5b80fd5b634e487b7160e01b865260418252602486fd5b8480fd5b90601f8019910116810190811067ffffffffffffffff8211176103a057604052565b634e487b7160e01b600052604160045260246000fd5b359073ffffffffffffffffffffffffffffffffffffffff821682036103d757565b600080fd5b67ffffffffffffffff81116103a057601f01601f191660200190565b3d15610423573d90610409826103dc565b91610417604051938461037e565b82523d6000602084013e565b606090565b908160209103126103d7575180151581036103d7579056fea2646970667358221220e560053cb5a82d8467b8176bbd05f1f380d22c7cd66d04579dab3002ac2d75c864736f6c63430008120033",
"linkReferences": {},
"deployedLinkReferences": {}
}
228 changes: 228 additions & 0 deletions src/typechain/tapioca-mocks/BalancerVaultMock.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
BigNumber,
BigNumberish,
BytesLike,
CallOverrides,
ContractTransaction,
PayableOverrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
import type { FunctionFragment, Result } from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
PromiseOrValue,
} from "./common";

export declare namespace BalancerVaultMock {
export type SingleSwapStruct = {
poolId: PromiseOrValue<BytesLike>;
kind: PromiseOrValue<BigNumberish>;
assetIn: PromiseOrValue<string>;
assetOut: PromiseOrValue<string>;
amount: PromiseOrValue<BigNumberish>;
userData: PromiseOrValue<BytesLike>;
};

export type SingleSwapStructOutput = [
string,
number,
string,
string,
BigNumber,
string
] & {
poolId: string;
kind: number;
assetIn: string;
assetOut: string;
amount: BigNumber;
userData: string;
};

export type FundManagementStruct = {
sender: PromiseOrValue<string>;
fromInternalBalance: PromiseOrValue<boolean>;
recipient: PromiseOrValue<string>;
toInternalBalance: PromiseOrValue<boolean>;
};

export type FundManagementStructOutput = [
string,
boolean,
string,
boolean
] & {
sender: string;
fromInternalBalance: boolean;
recipient: string;
toInternalBalance: boolean;
};
}

export interface BalancerVaultMockInterface extends utils.Interface {
functions: {
"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": FunctionFragment;
};

getFunction(
nameOrSignatureOrTopic:
| "swap"
| "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)"
): FunctionFragment;

encodeFunctionData(
functionFragment: "swap",
values: [
BalancerVaultMock.SingleSwapStruct,
BalancerVaultMock.FundManagementStruct,
PromiseOrValue<BigNumberish>,
PromiseOrValue<BigNumberish>
]
): string;
encodeFunctionData(
functionFragment: "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)",
values: [
BalancerVaultMock.SingleSwapStruct,
BalancerVaultMock.FundManagementStruct,
PromiseOrValue<BigNumberish>,
PromiseOrValue<BigNumberish>
]
): string;

decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)",
data: BytesLike
): Result;

events: {};
}

export interface BalancerVaultMock extends BaseContract {
contractName: "BalancerVaultMock";

connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;

interface: BalancerVaultMockInterface;

queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;

listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;

functions: {
swap(
singleSwap: BalancerVaultMock.SingleSwapStruct,
arg1: BalancerVaultMock.FundManagementStruct,
arg2: PromiseOrValue<BigNumberish>,
arg3: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;

"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)"(
singleSwap: BalancerVaultMock.SingleSwapStruct,
arg1: BalancerVaultMock.FundManagementStruct,
arg2: PromiseOrValue<BigNumberish>,
arg3: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
};

swap(
singleSwap: BalancerVaultMock.SingleSwapStruct,
arg1: BalancerVaultMock.FundManagementStruct,
arg2: PromiseOrValue<BigNumberish>,
arg3: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;

"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)"(
singleSwap: BalancerVaultMock.SingleSwapStruct,
arg1: BalancerVaultMock.FundManagementStruct,
arg2: PromiseOrValue<BigNumberish>,
arg3: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;

callStatic: {
swap(
singleSwap: BalancerVaultMock.SingleSwapStruct,
arg1: BalancerVaultMock.FundManagementStruct,
arg2: PromiseOrValue<BigNumberish>,
arg3: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<BigNumber>;

"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)"(
singleSwap: BalancerVaultMock.SingleSwapStruct,
arg1: BalancerVaultMock.FundManagementStruct,
arg2: PromiseOrValue<BigNumberish>,
arg3: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<BigNumber>;
};

filters: {};

estimateGas: {
swap(
singleSwap: BalancerVaultMock.SingleSwapStruct,
arg1: BalancerVaultMock.FundManagementStruct,
arg2: PromiseOrValue<BigNumberish>,
arg3: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;

"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)"(
singleSwap: BalancerVaultMock.SingleSwapStruct,
arg1: BalancerVaultMock.FundManagementStruct,
arg2: PromiseOrValue<BigNumberish>,
arg3: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;
};

populateTransaction: {
swap(
singleSwap: BalancerVaultMock.SingleSwapStruct,
arg1: BalancerVaultMock.FundManagementStruct,
arg2: PromiseOrValue<BigNumberish>,
arg3: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;

"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)"(
singleSwap: BalancerVaultMock.SingleSwapStruct,
arg1: BalancerVaultMock.FundManagementStruct,
arg2: PromiseOrValue<BigNumberish>,
arg3: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;
};
}
Loading

0 comments on commit 373506b

Please sign in to comment.