This section is limited to just for Web/JavaScript at the present moment
- Web
Accounts
You can detect smart contract wallets by verifying on-chain if the exposed account address has any associated code deployed.- ethers.js
- web3.js
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:- ethers.js
- web3.js
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:towill be theRelayerManagercontract addressdatawill be the encoded data of the call to theexecute()method with the relevant parameters