-
Notifications
You must be signed in to change notification settings - Fork 173
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(relay-kit): make gas limit optional #414
Conversation
Pull Request Test Coverage Report for Build 5668577336
💛 - Coveralls |
nonce?: number | ||
} | ||
|
||
export interface MultiSendTransaction { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is MetaTransactionData
at line 21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
} else { | ||
const temporarySafeContract = await getSafeContract({ | ||
// We use the lastest version of the Safe contract to get the correct version of this Safe | ||
const latestVersionOfTheSafeContract = await getSafeContract({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that this variable name may not be accurate, as the DEFAULT_SAFE_VERSION may not be the latest.
I would rename it to defaultSafeContractInstance
What it solves
Resolves #362
Features added
GasLimit
optional in therelay-kit
relay-kit
.relay-kit
(no need to manually encode transactions by developers)New Syntax
How this PR fixes it
Added Functions:
Protocol-kit
getEncodedTransaction
in theprotocol-kit
: Returns the Safe Transaction encoded (as a string).wrapSafeTransactionIntoDeploymentBatch
in theprotocol-kit
: Wraps a Safe transaction into a Safe deployment batch.createSafeDeploymentTransaction
in theprotocol-kit
: Creates a Safe deployment transaction of the Safe.createTransactionBatch
in theprotocol-kit
: This function creates a batch transaction of the provided Safe transactions using the MultiSend contract.estimation functions
estimateTxBaseGas
: This function estimates thebaseGas
of a Safe transaction:txHash
)nonce
of the Safe.ExecutionSuccess
orExecutionFailure
Note:
estimateTxBaseGas
estimation does not include the transaction execution cost (safeTxGas
)Note:
estimateTxBaseGas
estimation does not include guards execution cost (ManualGasLimit
required in this case)estimateSafeTxGas
: This function estimates thesafeTxGas
of a Safe transaction. ThesafeTxGas
value represents the amount of gas required to execute the Safe transaction itself. The estimation method differs based on the version of the Safe:1.3.0
, thesimulate
function defined in thesimulateTxAccessor.sol
Contract is used.1.3.0
, the deprecatedrequiredTxGas
method defined in the GnosisSafe contract is used.estimateSafeDeploymentGas
: This function estimates the gas cost of deploying a Safe.Detailed Summary
Basic Tests
Safe
1/1
,v1.3.0
Goerli
chainTest 1: 1 Transfer in Goerli chain with a Safe 1/1 v1.3.0 (already deployed)
Transaction hash:
0x14e55a35cb34fb6fbf6f36c16ba320496877041d4c5b67f84b1c75f435aa9f8e
BaseGas
SafeTxGas
DeploymentGas
TotalGas
Gelato payment vs Transaction fee cost
Links
Screenshots
Test 2: 1 Contract Interaction in Goerli chain with a Safe 1/1 v1.3.0 (already deployed)
Transaction hash:
0x70115d1489133d4994ac6eebfbc80b82eab2455e8fa42102c1a6ed5f2b59aa7d
BaseGas
SafeTxGas
DeploymentGas
TotalGas
Gelato payment vs Transaction fee cost
Links
Screenshots
Test 3: a batch of 5 Transfers & 3 contract interactions in Goerli chain with a Safe 1/1 v1.3.0 (already deployed)
Transaction hash:
0x9fb36e0560834834f2c1148aed7526f18e8f96e61a477fffcf3f3271aff5558a
BaseGas
SafeTxGas
DeploymentGas
TotalGas
Gelato payment vs Transaction fee cost
Links
Screenshots
Safe
2/3
,v1.3.0
Goerli
chainTest 4: 1 Transfer in Goerli chain with a Safe 2/3 v1.3.0 (already deployed)
Transaction hash:
0xd71a3c9b59f01bc758c2d50d230d8587fbb677f2a5b3898bf26676baf68ab43d.
BaseGas
SafeTxGas
DeploymentGas
TotalGas
Gelato payment vs Transaction fee cost
Links
Screenshots
Test 5: 1 Contract Interaction in Goerli chain with a Safe 2/3 v1.3.0 (already deployed)
Transaction hash:
0x3c10b488dd44c7716825f4938b3f3c30bac1d7dc7406b48d57863edaf073c388.
BaseGas
SafeTxGas
DeploymentGas
TotalGas
Gelato payment vs Transaction fee cost
Links
Screenshots
Test 6: a batch of 5 Transfers & 3 contract interactions in Goerli chain with a Safe 2/3 v1.3.0 (already deployed)
Transaction hash:
0xdca18d1e9a92f1076fbdd1c2bd3570a26e4f958be10caea55b3bd4f6c6d73437
BaseGas
SafeTxGas
DeploymentGas
TotalGas
Gelato payment vs Transaction fee cost
Links
Screenshots
Counterfactual deployment feature
Safe
1/1
,v1.3.0
Goerli
chainTest 7: 1 Transfer & Counterfactual deployment in Goerli chain with a Safe 1/1 v1.3.0
Transaction hash:
0xc26bf2b11820be139fa1d07b173e1970dd1a0ad323ebd002dad8c370edfcaa6f
BaseGas
SafeTxGas
DeploymentGas
TotalGas
Gelato payment vs Transaction fee cost
Links
Screenshots
Test 8: 1 Contract Interaction & Counterfactual deployment in Goerli chain with a Safe 1/1 v1.3.0
Transaction hash:
0x20008d1b370f3525ae315d2411a9068495e4ae24f6cfadb0b7391fff8a554f29
BaseGas
SafeTxGas
DeploymentGas
TotalGas
Gelato payment vs Transaction fee cost
Links
Screenshots
Test 9: a batch of 5 Transfers & 3 contract interactions & Counterfactual deployment in Goerli chain with a Safe 1/1 v1.3.0
Transaction hash:
0x6df17fa801efe102d574fd6d92a7d823d5b90e2515bdf39eacfd41104c27dd4d
BaseGas
SafeTxGas
DeploymentGas
TotalGas
Gelato payment vs Transaction fee cost
Links
Screenshots
Safe
5/7
,v1.3.0
Goerli
chainTest 10: 1 Transfer & Counterfactual deployment in Goerli chain with a Safe 5/7 v1.3.0
Transaction hash:
0x2a24c3574cb6127d1c63b00ffe43c68a6d70a1ead9703234f1f4befef05ec947
BaseGas
SafeTxGas
DeploymentGas
TotalGas
Gelato payment vs Transaction fee cost
Links
Screenshots
Test 11: 1 Contract interaction & Counterfactual deployment in Goerli chain with a Safe 5/7 v1.3.0
Transaction hash:
0xa39fd07b22286cccae2365308091064a3468ccf0c77cb51b02d8d9c0b7ddeede
BaseGas
SafeTxGas
DeploymentGas
TotalGas
Gelato payment vs Transaction fee cost
Links
Screenshots
Test 12: a batch of 5 Transfers & 3 contract interactions & Counterfactual deployment in Goerli chain with a Safe 5/7 v1.3.0
Transaction hash:
0xf3c1d9723965763c058df5af7f9e09192b0a5f35c758b04af7b45403c37549d7
BaseGas
SafeTxGas
DeploymentGas
TotalGas
Gelato payment vs Transaction fee cost
Links
Screenshots
Production chains
Gnosis
chainTest 13: a batch of 5 Transfers & 3 contract interactions & Counterfactual deployment in Gnosis chain with a Safe 5/7 v1.3.0
Transaction hash:
0xec3b28b7ce9535a6197cb0aa120f9056f0cb88b1dec517218b7219c68299a52c
BaseGas
SafeTxGas
DeploymentGas
TotalGas
Gelato payment vs Transaction fee cost
Links
Screenshots
Test 14: a batch of 5 Transfers & 3 contract interactions in Gnosis chain with a Safe 5/7 v1.3.0 (already deployed)
Transaction hash:
0x5015a04d41eadf85b4379fb2bd9342a1126c28d3dac779760a963d4eb92de03b
BaseGas
SafeTxGas
DeploymentGas
TotalGas
Gelato payment vs Transaction fee cost
Links
Screenshots
Polygon
chainTest 15: 1 Transfer deployment in Gnosis chain with a Safe 2/3 v1.3.0 (already deployed)
Transaction hash:
0xa630476c12e54ed409fed1c61273584d20fc760294ac4be10ab29faa09886a0b
BaseGas
SafeTxGas
DeploymentGas
TotalGas
Gelato payment vs Transaction fee cost
Links
Screenshots
Test 16: a batch of 3 Transfers & 1 Contract Interaction & Counterfactual deployment in Polygon chain with a Safe 5/7 v1.3.0
Transaction hash:
0xb7149eaf7601ed3a22beceb89c59da7f4554a345f7bfd451daaad63d55f29bd7
BaseGas
SafeTxGas
DeploymentGas
TotalGas
Gelato payment vs Transaction fee cost
Links
Screenshots
Test 17: 5 Transfers & 3 Contract Interactions & Counterfactual deployment in Polygon chain with a Safe 5/7 v1.3.0
Transaction hash:
0x99cb0f5ab0362a7f09bba067a2c6815b60aa33f397fea3ecde778707f5051906
BaseGas
SafeTxGas
DeploymentGas
TotalGas
Gelato payment vs Transaction fee cost
Links
Screenshots
Formula used to calculate the difference estimated vs real