Skip to content

Commit 56ae522

Browse files
Update gas station contract addresses and modify intent builder types for post-audit contract
1 parent dbf451b commit 56ae522

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

.changeset/ready-views-open.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@turnkey/gas-station": minor
3+
---
4+
5+
Update gas station contract addresses and modify intent builder types for post-audit contract

packages/gas-station/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Turnkey Gas Station SDK
22

3-
> **⚠️ BETA WARNING**: This SDK is currently in beta. The underlying smart contracts are **unaudited** and should not be used in production environments. Use at your own risk.
4-
53
A reusable SDK for implementing gasless transactions using EIP-7702, Turnkey wallet management, and your own paymaster. This package provides clean abstractions and utility methods to quickly integrate with Turnkey's contracts for sponsored transaction execution.
64

75
## What is This?
@@ -363,8 +361,8 @@ const eoaPolicy = buildIntentSigningPolicy({
363361
// condition: "activity.resource == 'PRIVATE_KEY' && " +
364362
// "activity.action == 'SIGN' && " +
365363
// "eth.eip_712.primary_type == 'Execution' && " +
366-
// "(eth.eip_712.message['outputContract'] == '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913') && " +
367-
// "eth.eip_712.message['ethAmount'] == '0'",
364+
// "(eth.eip_712.message['to'] == '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913') && " +
365+
// "eth.eip_712.message['value'] == '0'",
368366
// notes: "Restricts which EIP-712 intents the EOA can sign for gas station execution"
369367
// }
370368
```
@@ -491,7 +489,7 @@ When the paymaster signs an execution transaction calling `execute(address _targ
491489
**Check execution contract address:**
492490

493491
```typescript
494-
eth.tx.to == "0x576a4d741b96996cc93b4919a04c16545734481f";
492+
eth.tx.to == "0x00000000008c57a1ce37836a5e9d36759d070d8c";
495493
```
496494

497495
**Check which EOA is executing:**
@@ -537,7 +535,7 @@ const policy = {
537535
condition: [
538536
"activity.resource == 'PRIVATE_KEY'",
539537
"activity.action == 'SIGN'",
540-
"eth.tx.to == '0x576a4d741b96996cc93b4919a04c16545734481f'",
538+
"eth.tx.to == '0x00000000008c57a1ce37836a5e9d36759d070d8c'",
541539
// Allow USDC or DAI
542540
"(eth.tx.data[74..138] == '0000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913' || eth.tx.data[74..138] == '00000000000000000000006b175474e89094c44da98b954eedeac495271d0f')",
543541
// Gas limits
@@ -575,7 +573,7 @@ const policy = {
575573
condition: [
576574
"activity.resource == 'PRIVATE_KEY'",
577575
"activity.action == 'SIGN'",
578-
"eth.tx.to == '0x576a4d741b96996cc93b4919a04c16545734481f'",
576+
"eth.tx.to == '0x00000000008c57a1ce37836a5e9d36759d070d8c'",
579577
`(${eoaConditions})`,
580578
].join(" && "),
581579
};

packages/gas-station/src/policyUtils.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export function buildIntentSigningPolicy(config: {
181181
* const policy = buildPaymasterExecutionPolicy({
182182
* organizationId: "org-paymaster",
183183
* paymasterUserId: "paymaster-user-123",
184-
* executionContractAddress: "0x576A4D741b96996cc93B4919a04c16545734481f",
184+
* executionContractAddress: "0x00000000008c57a1CE37836a5e9d36759D070d8c",
185185
* restrictions: {
186186
* allowedEOAs: ["0xAli...ce", "0xBob...by"],
187187
* allowedContracts: ["0x833...USDC", "0x6B1...DAI"],
@@ -199,7 +199,7 @@ export function buildIntentSigningPolicy(config: {
199199
* effect: "EFFECT_ALLOW",
200200
* consensus: "approvers.any(user, user.id == 'paymaster-user-123')",
201201
* condition: "activity.resource == 'PRIVATE_KEY' && activity.action == 'SIGN' && " +
202-
* "eth.tx.to == '0x576a...481f' && " +
202+
* "eth.tx.to == '0x00000000008c57a1ce37836a5e9d36759d070d8c' && " +
203203
* "(eth.tx.contract_call_args['_to'] == '0x833...usdc' || " +
204204
* "eth.tx.contract_call_args['_to'] == '0x6b1...dai') && " +
205205
* "(eth.tx.contract_call_args['_targetEoA'] == '0xali...ce' || " +
@@ -215,7 +215,7 @@ export function buildIntentSigningPolicy(config: {
215215
* organizationId: "org-paymaster",
216216
* paymasterUserId: "paymaster-user-123",
217217
* additionalApprovers: ["backup-paymaster-456"],
218-
* executionContractAddress: "0x576A4D741b96996cc93B4919a04c16545734481f",
218+
* executionContractAddress: "0x00000000008c57a1CE37836a5e9d36759D070d8c",
219219
* restrictions: {
220220
* allowedEOAs: ["0xAli...ce"],
221221
* maxEthAmount: parseEther("1"), // Max 1 ETH
@@ -231,7 +231,7 @@ export function buildIntentSigningPolicy(config: {
231231
* consensus: "approvers.any(user, user.id == 'paymaster-user-123' || " +
232232
* "user.id == 'backup-paymaster-456')",
233233
* condition: "activity.resource == 'PRIVATE_KEY' && activity.action == 'SIGN' && " +
234-
* "eth.tx.to == '0x576a...481f' && " +
234+
* "eth.tx.to == '0x00000000008c57a1ce37836a5e9d36759d070d8c' && " +
235235
* "(eth.tx.contract_call_args['_targetEoA'] == '0xali...ce') && " +
236236
* "eth.tx.contract_call_args['ethAmount'] <= 1000000000000000000 && " +
237237
* "eth.tx.gasPrice <= 100000000000",
@@ -244,7 +244,7 @@ export function buildIntentSigningPolicy(config: {
244244
* organizationId: "org-paymaster",
245245
* paymasterUserId: "paymaster-user-123",
246246
* customConsensus: "approvers.count() >= 2",
247-
* executionContractAddress: "0x576A4D741b96996cc93B4919a04c16545734481f",
247+
* executionContractAddress: "0x00000000008c57a1CE37836a5e9d36759D070d8c",
248248
* restrictions: { ... },
249249
* });
250250
*

0 commit comments

Comments
 (0)