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

Add Gas and Storage Limit Defaults for WXTZ Operations #335

Merged
merged 3 commits into from
Dec 1, 2020
Merged
Changes from all commits
Commits
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
32 changes: 16 additions & 16 deletions src/chain/tezos/contracts/WrappedTezosHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ export namespace WrappedTezosHelper {
sourceAddress: string,
destinationAddress: string,
amount: number,
gasLimit: number,
storageLimit: number
gasLimit: number = 51_300,
storageLimit: number = 70
): Promise<string> {
const parameters = `Pair "${sourceAddress}" (Pair "${destinationAddress}" ${amount})`;

Expand Down Expand Up @@ -237,8 +237,8 @@ export namespace WrappedTezosHelper {
ovenAddress: string,
fee: number,
amountMutez: number,
gasLimit: number,
storageLimit: number
gasLimit: number = 126_500,
storageLimit: number = 10
): Promise<string> {
const parameters = 'Unit'

Expand Down Expand Up @@ -284,8 +284,8 @@ export namespace WrappedTezosHelper {
ovenAddress: string,
fee: number,
amountMutez: number,
gasLimit: number,
storageLimit: number
gasLimit: number = 121_000,
storageLimit: number = 0
): Promise<string> {
const parameters = `${amountMutez}`

Expand Down Expand Up @@ -380,8 +380,8 @@ export namespace WrappedTezosHelper {
keystore: KeyStore,
fee: number,
coreAddress: string,
gasLimit: number,
storageLimit: number
gasLimit: number = 115_000,
storageLimit: number = 1100
): Promise<OpenOvenResult> {
const entryPoint = 'runEntrypointLambda'
const lambdaName = 'createOven'
Expand Down Expand Up @@ -419,21 +419,21 @@ export namespace WrappedTezosHelper {
* @param signer A Signer for the sourceAddress.
* @param keystore A Keystore for the sourceAddress.
* @param fee The fee to use.
* @param gasLimit The gas limit to use.
* @param storageLimit The storage limit to use.
* @param ovenAddress The address of the oven contract.
* @param bakerAddress The address of the baker for the oven.
* @param gasLimit The gas limit to use.
* @param storageLimit The storage limit to use.
* @returns A string representing the operation hash.
*/
export async function setOvenBaker(
nodeUrl: string,
signer: Signer,
keystore: KeyStore,
fee: number,
gasLimit: number,
storageLimit: number,
ovenAddress: string,
bakerAddress: string
bakerAddress: string,
gasLimit: number = 19_500,
storageLimit: number = 0,
): Promise<string> {
const parameters = `Some "${bakerAddress}"`

Expand Down Expand Up @@ -464,19 +464,19 @@ export namespace WrappedTezosHelper {
* @param signer A Signer for the sourceAddress.
* @param keystore A Keystore for the sourceAddress.
* @param fee The fee to use.
* @param ovenAddress The address of the oven contract.
* @param gasLimit The gas limit to use.
* @param storageLimit The storage limit to use.
* @param ovenAddress The address of the oven contract.
* @returns A string representing the operation hash.
*/
export async function clearOvenBaker(
nodeUrl: string,
signer: Signer,
keystore: KeyStore,
fee: number,
gasLimit: number,
storageLimit: number,
ovenAddress: string,
gasLimit: number = 19_500,
storageLimit: number = 0,
): Promise<string> {
const parameters = `None`

Expand Down