Skip to content

Commit

Permalink
Merge pull request #335 from StakerDAO/sane-defaults
Browse files Browse the repository at this point in the history
Add Gas and Storage Limit Defaults for `WXTZ` Operations
  • Loading branch information
anonymoussprocket committed Dec 1, 2020
2 parents a41b1d7 + d359d4c commit caaa22a
Showing 1 changed file with 16 additions and 16 deletions.
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

0 comments on commit caaa22a

Please sign in to comment.