This section is limited to just for Web/JavaScript at the present moment
Accounts
When you connect your dapp to a smart contract wallet, you will receive the
smart account address for the wallet. This is not to be confused with the
delegate keys that are used to sign messages and transactions.
Messages
Normally, when verifying signatures from “normal” accounts, which are Externally Owned Accounts (EOAs), you would use an ECDSA method calledecrecover()
to retrieve the corresponding public key, which will then map to an address.In the case of Smart Contract Wallets, you are not able to sign a message with the smart contract account. Therefore, the standard EIP-1271 was defined to outline a validation method which can be called on-chain, labeled isValidSignature()
._hash
which should be EIP-191 compliant and can be computed using:Transactions
Smart Contract wallets, like Argent, commonly use the concept of meta transactions. These are a specific type of transaction that is signed by one or more key pairs but is submitted to the Ethereum network by a relayer.The relayer pays the gas fee (in ETH), and the wallet will refund the relayer (in ETH or ERC20 tokens) up to an amount signed by the wallet’s owner.From your dapp’s perspective, this is managed by the mobile wallet application. Your dapp will submit a regular{ to, value, data }
transaction to the web3 provider. This transaction will be transmitted to the mobile wallet application through WalletConnect.The mobile wallet will transform the data into a meta transaction:to
will be theRelayerManager
contract addressdata
will be the encoded data of the call to theexecute()
method with the relevant parameters