- Make sure
solc
is available on the system. Check withsolc --version
. If not, usebrew install solidity
- Download binary compiler from zkSolc repo
- Create basic contract to test compiling
- Run the following
chmod +x ./zksolc-macosx-amd64-v1.4.1
- Run the following
./zksolc-macosx-amd64-v1.4.1 --combined-json abi,bin contracts/Paymaster.sol > artifacts/Paymaster.json
$ node
> require('crypto').randomBytes(32).toString('hex')
> .exit
$ node scripts/deploy.js
0x45Be9d07374cbB4195187f8FA2458b43696D9de1 # Deploy wallet address
5000000000000000n # initial balance (.005 ETH)
0x2D4a1DF404136DC98540a5e7244A1ac52ba22584 # Paymaster address
$ node scripts/gasSponsor.js
Destination address 0
{
transaction: TransactionResponse {
provider: Provider { _contractAddresses: {} },
blockNumber: null,
blockHash: null,
index: undefined,
hash: '0x786e847b261d3754a7e7213b069883b0f11ccfd07da45084d76b13a5065821b8',
type: 113,
to: '0x2d4A1df404136DC98540A5E7244A1ac52Ba22585',
from: '0xA0bfc908E057CfA1Ea9eaDD8B5b3aAdBB65C8BBE',
nonce: 0,
gasLimit: 7517422n,
gasPrice: undefined,
maxPriorityFeePerGas: 54564953n,
maxFeePerGas: 54564953n,
maxFeePerBlobGas: null,
data: '0x1337',
value: 0n,
chainId: 300n,
signature: Signature { r: "0x0000000000000000000000000000000000000000000000000000000000000000", s: "0x0000000000000000000000000000000000000000000000000000000000000000", yParity: 0, networkV: null },
accessList: null,
blobVersionedHashes: null,
l1BatchNumber: undefined,
l1BatchTxIndex: undefined
}