Add safe account abstraction into any application
wrapscan.io/polywrap/safe-account-abstraction-kit@0.0.1
0.1
type Module @imports(
types: [
"Ethers_Module",
"Ethers_Connection",
"Ethers_Eip1559FeesEstimate",
"Ethers_TxOptions",
"Ethers_StaticTxResult",
"Ethers_TxResponse",
"Ethers_AccessItem",
"Ethers_TxRequest",
"Ethers_TxReceipt",
"Ethers_Log",
"Relayer_Module",
"Relayer_RelayTransaction",
"Relayer_MetaTransactionOptions",
"Relayer_RelayResponse",
"Safe_Module",
"Safe_Ethers_Connection",
"Safe_Ethers_TxOptions",
"Safe_TransactionOptions",
"Safe_Ethers_TxReceipt",
"Safe_Ethers_Log",
"Safe_ContractNetworksFilter",
"Safe_ContractNetworksConfig",
"Safe_SafeTransaction",
"Safe_SafeSignature",
"Safe_SafeTransactionData",
"Safe_OperationType",
"Safe_MetaTransactionData",
"Safe_DeploymentInput",
"Safe_SafeAccountConfig",
"Safe_SafeDeploymentConfig",
"Safe_CustomContract",
"Safe_SafeTransactionDataPartial",
"Safe_SafeTransactionOptions"
]
) {
relayTransaction(
transaction: MetaTransactionData!
options: MetaTransactionOptions!
config: DeploymentParameters
): String! @env(required: true)
getSafeAddress(
config: DeploymentParameters
): String! @env(required: true)
}
type Env {
connection: Ethers_Connection
}
type DeploymentParameters {
saltNonce: String
customContractAddresses: Safe_CustomContract
}
type MetaTransactionData {
to: String!
value: BigInt!
data: String!
operation: OperationType
}
type MetaTransactionOptions {
gasLimit: BigInt!
gasToken: String
isSponsored: Boolean
}
type RelayTransaction {
target: String!
encodedTransaction: String!
chainId: Int!
options: MetaTransactionOptions!
}
enum OperationType {
Call
DelegateCall
}
### Imported Modules START ###
type Ethers_Module @imported(
uri: "wrapscan.io/polywrap/ethers@1.1.1",
namespace: "Ethers",
nativeType: "Module"
) {
getChainId(
connection: Ethers_Connection
): String!
getSignerAddress(
connection: Ethers_Connection
): String!
getSignerBalance(
blockTag: BigInt
connection: Ethers_Connection
): BigInt!
getGasPrice(
connection: Ethers_Connection
): BigInt!
estimateEip1559Fees(
connection: Ethers_Connection
): Ethers_Eip1559FeesEstimate!
getSignerTransactionCount(
blockTag: BigInt
connection: Ethers_Connection
): BigInt!
checkAddress(
address: String!
connection: Ethers_Connection
): Boolean!
callContractView(
address: String!
method: String!
args: [String!]
connection: Ethers_Connection
): String!
callContractStatic(
address: String!
method: String!
args: [String!]
options: Ethers_TxOptions
connection: Ethers_Connection
): Ethers_StaticTxResult!
getBalance(
address: String!
blockTag: BigInt
connection: Ethers_Connection
): BigInt!
getTransaction(
hash: String!
connection: Ethers_Connection
): Ethers_TxResponse!
sendRpc(
method: String!
params: [String!]!
connection: Ethers_Connection
): String!
estimateTransactionGas(
tx: Ethers_TxRequest!
connection: Ethers_Connection
): BigInt!
awaitTransaction(
txHash: String!
confirmations: UInt32!
timeout: UInt32
connection: Ethers_Connection
): Ethers_TxReceipt!
sendTransaction(
tx: Ethers_TxRequest!
connection: Ethers_Connection
): Ethers_TxResponse!
sendTransactionAndWait(
tx: Ethers_TxRequest!
connection: Ethers_Connection
): Ethers_TxReceipt!
deployContract(
abi: String!
bytecode: String!
args: [String!]
options: Ethers_TxOptions
connection: Ethers_Connection
): String!
estimateContractCallGas(
address: String!
method: String!
args: [String!]
options: Ethers_TxOptions
connection: Ethers_Connection
): BigInt!
callContractMethod(
address: String!
method: String!
args: [String!]
options: Ethers_TxOptions
connection: Ethers_Connection
): Ethers_TxResponse!
callContractMethodAndWait(
address: String!
method: String!
args: [String!]
options: Ethers_TxOptions
connection: Ethers_Connection
): Ethers_TxReceipt!
signMessage(
message: String!
connection: Ethers_Connection
): String!
signMessageBytes(
bytes: Bytes!
connection: Ethers_Connection
): String!
signTransaction(
tx: Ethers_TxRequest!
connection: Ethers_Connection
): String!
signTypedData(
payload: JSON!
connection: Ethers_Connection
): String!
generateCreate2Address(
address: String!
salt: String!
initCode: String!
): String!
keccak256BytesEncodePacked(
value: String!
): String!
keccak256(
value: String!
): String!
encodeMetaTransaction(
operation: BigInt
to: String!
value: BigInt!
data: String!
): String!
encodeParams(
types: [String!]!
values: [String!]!
): String!
encodeFunction(
method: String!
args: [String!]
): String!
toWei(
eth: String!
): String!
toEth(
wei: String!
): String!
solidityPack(
types: [String!]!
values: [String!]!
): String!
}
type Relayer_Module @imported(
uri: "wrapscan.io/polywrap/relay-kit@0.1.0",
namespace: "Relayer",
nativeType: "Module"
) {
getFeeCollector: String!
getEstimateFee(
chainId: Int!
gasLimit: BigInt!
gasToken: String
): BigInt!
relayTransaction(
transaction: Relayer_RelayTransaction!
): Relayer_RelayResponse! @env(required: false)
}
type Safe_Module @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "Module"
) {
createProxy(
address: String!
safeMasterCopyAddress: String!
initializer: String!
saltNonce: UInt32!
connection: Safe_Ethers_Connection
txOptions: Safe_Ethers_TxOptions
): String!
proxyCreationCode(
address: String!
connection: Safe_Ethers_Connection
): String!
"""
GnosisSafeContractEthers methods
"""
getNonce(
address: String!
connection: Safe_Ethers_Connection
): BigInt!
getVersion(
address: String!
connection: Safe_Ethers_Connection
): String!
approvedHashes(
address: String!
ownerAddress: String!
hash: String!
connection: Safe_Ethers_Connection
): BigInt!
approveHash(
safeAddress: String!
hash: String!
options: Safe_TransactionOptions
connection: Safe_Ethers_Connection
): Safe_Ethers_TxReceipt!
getSafeContractNetworks(
version: String!
chainId: String!
isL1Safe: Boolean
filter: Safe_ContractNetworksFilter
): Safe_ContractNetworksConfig!
encodeExecTransaction(
safeAddress: String!
safeTransaction: Safe_SafeTransaction!
): String!
deploySafe(
input: Safe_DeploymentInput!
txOptions: Safe_Ethers_TxOptions
): String!
predictSafeAddress(
input: Safe_DeploymentInput!
): String!
encodeDeploySafe(
input: Safe_DeploymentInput!
): String!
safeIsDeployed(
safeAddress: String!
connection: Safe_Ethers_Connection!
): Boolean!
getSafeInitializer(
config: Safe_SafeAccountConfig!
): String!
"""
Safe methods
"""
createTransaction(
tx: Safe_SafeTransactionDataPartial!
): Safe_SafeTransaction!
createMultiSendTransaction(
txs: [Safe_SafeTransactionDataPartial!]!
options: Safe_SafeTransactionOptions
onlyCalls: Boolean
customMultiSendContractAddress: String
): Safe_SafeTransaction! @env(required: true)
addSignature(
tx: Safe_SafeTransaction!
signingMethod: String
): Safe_SafeTransaction! @env(required: true)
getTransactionHash(
tx: Safe_SafeTransactionData!
): String! @env(required: true)
signTransactionHash(
hash: String!
): Safe_SafeSignature! @env(required: true)
approveTransactionHash(
hash: String!
options: Safe_TransactionOptions
): Safe_Ethers_TxReceipt! @env(required: true)
executeTransaction(
tx: Safe_SafeTransaction!
options: Safe_TransactionOptions
): Safe_Ethers_TxReceipt! @env(required: true)
getOwnersWhoApprovedTx(
hash: String!
): [String!]! @env(required: true)
getSignature(
tx: Safe_SafeTransaction!
signingMethod: String
safeAddress: String!
connection: Safe_Ethers_Connection!
): Safe_SafeTransaction!
"""
Owner manager methods
"""
getOwners(
safeAddress: String!
connection: Safe_Ethers_Connection
): [String!]!
getThreshold(
safeAddress: String!
connection: Safe_Ethers_Connection
): UInt32!
isOwner(
ownerAddress: String!
safeAddress: String!
connection: Safe_Ethers_Connection
): Boolean!
"""
Module manager methods
"""
getModules: [String!]! @env(required: true)
isModuleEnabled(
moduleAddress: String!
): Boolean! @env(required: true)
"""
Utilities for transactions
"""
encodeEnableModuleData(
moduleAddress: String!
): String! @env(required: true)
encodeDisableModuleData(
moduleAddress: String!
): String! @env(required: true)
encodeMultiSendData(
txs: [Safe_SafeTransactionDataPartial!]!
): String!
encodeAddOwnerWithThresholdData(
ownerAddress: String!
threshold: UInt32
): String! @env(required: true)
encodeRemoveOwnerData(
ownerAddress: String!
threshold: UInt32
): String! @env(required: true)
encodeSwapOwnerData(
oldOwnerAddress: String!
newOwnerAddress: String!
): String! @env(required: true)
encodeChangeThresholdData(
threshold: UInt32!
): String! @env(required: true)
}
### Imported Modules END ###
### Imported Objects START ###
type Ethers_Connection @imported(
uri: "wrapscan.io/polywrap/ethers@1.1.1",
namespace: "Ethers",
nativeType: "Connection"
) {
node: String
networkNameOrChainId: String
}
type Ethers_Eip1559FeesEstimate @imported(
uri: "wrapscan.io/polywrap/ethers@1.1.1",
namespace: "Ethers",
nativeType: "Eip1559FeesEstimate"
) {
maxFeePerGas: BigInt!
maxPriorityFeePerGas: BigInt!
}
type Ethers_TxOptions @imported(
uri: "wrapscan.io/polywrap/ethers@1.1.1",
namespace: "Ethers",
nativeType: "TxOptions"
) {
"""
Gas supplied for the transaction
"""
gasLimit: BigInt
"""
The max total fee to pay per unit of gas.
The difference between maxFeePerGas and baseFeePerGas + maxPriorityFeePerGas is “refunded” to the user.
This property is ignored when gasPrice is not null.
"""
maxFeePerGas: BigInt
"""
The gas price paid is baseFeePerGas + maxPriorityFeePerGas.
The difference between maxFeePerGas and baseFeePerGas + maxPriorityFeePerGas is “refunded” to the user.
This property is ignored when gasPrice is not null.
"""
maxPriorityFeePerGas: BigInt
"""
The gas price for legacy transactions.
If this property is not null, a legacy transaction will be sent and maxFeePerGas and maxPriorityFeePerGas will be ignored.
"""
gasPrice: BigInt
"""
Ether value sent with transaction
"""
value: BigInt
"""
Override default nonce
"""
nonce: UInt32
}
type Ethers_StaticTxResult @imported(
uri: "wrapscan.io/polywrap/ethers@1.1.1",
namespace: "Ethers",
nativeType: "StaticTxResult"
) {
result: String!
error: Boolean!
}
type Ethers_TxResponse @imported(
uri: "wrapscan.io/polywrap/ethers@1.1.1",
namespace: "Ethers",
nativeType: "TxResponse"
) {
hash: String!
to: String
from: String!
nonce: UInt32!
gasLimit: BigInt!
maxFeePerGas: BigInt
maxPriorityFeePerGas: BigInt
gasPrice: BigInt
value: BigInt!
chainId: BigInt!
blockNumber: BigInt
blockHash: String
timestamp: UInt32
r: String
s: String
v: UInt32
type: UInt32
accessList: [Ethers_AccessItem!]
}
type Ethers_AccessItem @imported(
uri: "wrapscan.io/polywrap/ethers@1.1.1",
namespace: "Ethers",
nativeType: "AccessItem"
) {
address: String!
storageKeys: [String!]!
}
type Ethers_TxRequest @imported(
uri: "wrapscan.io/polywrap/ethers@1.1.1",
namespace: "Ethers",
nativeType: "TxRequest"
) {
to: String
from: String
data: String
type: UInt32
chainId: BigInt
accessList: [Ethers_AccessItem!]
"""
Gas supplied for the transaction
"""
gasLimit: BigInt
"""
The max total fee to pay per unit of gas.
The difference between maxFeePerGas and baseFeePerGas + maxPriorityFeePerGas is “refunded” to the user.
This property is ignored when gasPrice is not null.
"""
maxFeePerGas: BigInt
"""
The gas price paid is baseFeePerGas + maxPriorityFeePerGas.
The difference between maxFeePerGas and baseFeePerGas + maxPriorityFeePerGas is “refunded” to the user.
This property is ignored when gasPrice is not null.
"""
maxPriorityFeePerGas: BigInt
"""
The gas price for legacy transactions.
If this property is not null, a legacy transaction will be sent and maxFeePerGas and maxPriorityFeePerGas will be ignored.
"""
gasPrice: BigInt
"""
Ether value sent with transaction
"""
value: BigInt
"""
Override default nonce
"""
nonce: UInt32
}
type Ethers_TxReceipt @imported(
uri: "wrapscan.io/polywrap/ethers@1.1.1",
namespace: "Ethers",
nativeType: "TxReceipt"
) {
to: String!
from: String!
contractAddress: String!
transactionIndex: UInt32!
root: String
gasUsed: BigInt!
logsBloom: String!
transactionHash: String!
logs: [Ethers_Log!]!
blockNumber: BigInt!
blockHash: String!
confirmations: UInt32!
cumulativeGasUsed: BigInt!
effectiveGasPrice: BigInt!
type: UInt32!
status: UInt32
}
type Ethers_Log @imported(
uri: "wrapscan.io/polywrap/ethers@1.1.1",
namespace: "Ethers",
nativeType: "Log"
) {
blockNumber: BigInt!
blockHash: String!
transactionIndex: UInt32!
removed: Boolean!
address: String!
data: String!
topics: [String!]!
transactionHash: String!
logIndex: UInt32!
}
type Relayer_RelayTransaction @imported(
uri: "wrapscan.io/polywrap/relay-kit@0.1.0",
namespace: "Relayer",
nativeType: "RelayTransaction"
) {
target: String!
encodedTransaction: String!
chainId: Int!
options: Relayer_MetaTransactionOptions!
}
type Relayer_MetaTransactionOptions @imported(
uri: "wrapscan.io/polywrap/relay-kit@0.1.0",
namespace: "Relayer",
nativeType: "MetaTransactionOptions"
) {
gasLimit: BigInt!
gasToken: String
isSponsored: Boolean
}
type Relayer_RelayResponse @imported(
uri: "wrapscan.io/polywrap/relay-kit@0.1.0",
namespace: "Relayer",
nativeType: "RelayResponse"
) {
taskId: String!
}
type Safe_Ethers_Connection @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "Ethers_Connection"
) {
node: String
networkNameOrChainId: String
}
type Safe_Ethers_TxOptions @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "Ethers_TxOptions"
) {
"""
Gas supplied for the transaction
"""
gasLimit: BigInt
"""
The max total fee to pay per unit of gas.
The difference between maxFeePerGas and baseFeePerGas + maxPriorityFeePerGas is “refunded” to the user.
This property is ignored when gasPrice is not null.
"""
maxFeePerGas: BigInt
"""
The gas price paid is baseFeePerGas + maxPriorityFeePerGas.
The difference between maxFeePerGas and baseFeePerGas + maxPriorityFeePerGas is “refunded” to the user.
This property is ignored when gasPrice is not null.
"""
maxPriorityFeePerGas: BigInt
"""
The gas price for legacy transactions.
If this property is not null, a legacy transaction will be sent and maxFeePerGas and maxPriorityFeePerGas will be ignored.
"""
gasPrice: BigInt
"""
Ether value sent with transaction
"""
value: BigInt
"""
Override default nonce
"""
nonce: UInt32
}
type Safe_TransactionOptions @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "TransactionOptions"
) {
from: String
gas: BigInt
gasLimit: BigInt
gasPrice: BigInt
maxFeePerGas: BigInt
maxPriorityFeePerGas: String
nonce: BigInt
}
type Safe_Ethers_TxReceipt @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "Ethers_TxReceipt"
) {
to: String!
from: String!
contractAddress: String!
transactionIndex: UInt32!
root: String
gasUsed: BigInt!
logsBloom: String!
transactionHash: String!
logs: [Safe_Ethers_Log!]!
blockNumber: BigInt!
blockHash: String!
confirmations: UInt32!
cumulativeGasUsed: BigInt!
effectiveGasPrice: BigInt!
type: UInt32!
status: UInt32
}
type Safe_Ethers_Log @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "Ethers_Log"
) {
blockNumber: BigInt!
blockHash: String!
transactionIndex: UInt32!
removed: Boolean!
address: String!
data: String!
topics: [String!]!
transactionHash: String!
logIndex: UInt32!
}
type Safe_ContractNetworksFilter @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "ContractNetworksFilter"
) {
multiSendAddress: Boolean!
multiSendCallOnlyAddress: Boolean!
safeMasterCopyAddress: Boolean!
safeProxyFactoryAddress: Boolean!
fallbackHandlerAddress: Boolean!
}
type Safe_ContractNetworksConfig @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "ContractNetworksConfig"
) {
multiSendAddress: String
multiSendCallOnlyAddress: String
safeMasterCopyAddress: String
safeProxyFactoryAddress: String
fallbackHandlerAddress: String
}
type Safe_SafeTransaction @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "SafeTransaction"
) {
signatures: Map @annotate(type: "Map<String!, Safe_SafeSignature!>")
data: Safe_SafeTransactionData!
}
type Safe_SafeSignature @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "SafeSignature"
) {
signer: String!
data: String!
}
type Safe_SafeTransactionData implements Safe_MetaTransactionData @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "SafeTransactionData"
) {
safeTxGas: BigInt!
baseGas: BigInt!
gasPrice: BigInt!
gasToken: String!
refundReceiver: String!
nonce: Int!
to: String!
value: BigInt!
data: String!
operation: Safe_OperationType
}
type Safe_MetaTransactionData @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "MetaTransactionData"
) {
to: String!
value: BigInt!
data: String!
operation: Safe_OperationType
}
type Safe_DeploymentInput @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "DeploymentInput"
) {
safeAccountConfig: Safe_SafeAccountConfig!
safeDeploymentConfig: Safe_SafeDeploymentConfig
customContractAddresses: Safe_CustomContract
connection: Safe_Ethers_Connection
}
type Safe_SafeAccountConfig @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "SafeAccountConfig"
) {
owners: [String!]!
threshold: UInt!
to: String
data: String
fallbackHandler: String
paymentToken: String
payment: BigInt
paymentReceiver: String
}
type Safe_SafeDeploymentConfig @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "SafeDeploymentConfig"
) {
saltNonce: String!
isL1Safe: Boolean
version: String
}
type Safe_CustomContract @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "CustomContract"
) {
proxyFactoryContract: String
safeFactoryContract: String
}
type Safe_SafeTransactionDataPartial implements Safe_MetaTransactionData @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "SafeTransactionDataPartial"
) {
safeTxGas: BigInt
baseGas: BigInt
gasPrice: BigInt
gasToken: String
refundReceiver: String
nonce: Int
to: String!
value: BigInt!
data: String!
operation: Safe_OperationType
}
type Safe_SafeTransactionOptions @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "SafeTransactionOptions"
) {
safeTxGas: BigInt
baseGas: BigInt
gasPrice: BigInt
gasToken: String
refundReceiver: String
nonce: Int
}
enum Safe_OperationType @imported(
uri: "wrapscan.io/polywrap/protocol-kit@0.1.0",
namespace: "Safe",
nativeType: "OperationType"
) {
Call
DelegateCall
}
### Imported Objects END ###
### Imported Envs START ###
### Imported Envs END ###
wrapscan.io/polywrap/safe-account-abstraction-kit@0.0.1
0.1