This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Web3 = require('web3') | |
const ABI = [ | |
{ | |
constant: true, | |
inputs: [], | |
name: 'name', | |
outputs: [ | |
{ | |
name: '', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.16; | |
import "@matterlabs/zksync-contracts/l2/system-contracts/interfaces/IAccount.sol"; | |
import "@matterlabs/zksync-contracts/l2/system-contracts/libraries/TransactionHelper.sol"; | |
// Access zkSync system contracts for nonce validation via NONCE_HOLDER_SYSTEM_CONTRACT | |
import "@matterlabs/zksync-contracts/l2/system-contracts/Constants.sol"; | |
// to call non-view function of system contracts | |
import "@matterlabs/zksync-contracts/l2/system-contracts/libraries/SystemContractsCaller.sol"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.8; | |
import {IPaymaster, ExecutionResult, PAYMASTER_VALIDATION_SUCCESS_MAGIC} | |
from "@matterlabs/zksync-contracts/l2/system-contracts/interfaces/IPaymaster.sol"; | |
import {IPaymasterFlow} from "@matterlabs/zksync-contracts/l2/system-contracts/interfaces/IPaymasterFlow.sol"; | |
import {TransactionHelper, Transaction} from "@matterlabs/zksync-contracts/l2/system-contracts/libraries/TransactionHelper.sol"; | |
import "@matterlabs/zksync-contracts/l2/system-contracts/Constants.sol"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as ethers from "ethers"; | |
import {Provider, Contract, utils, Signer, BrowserProvider, Wallet} from "zksync-ethers"; | |
// Address of the ZeekMessages contract | |
const GREETER_CONTRACT_ADDRESS = "0x2f5Fa95a28EEd40DD80ED3fFC718094EB41253b4"; | |
// Address of the ERC20 token contract | |
const TOKEN_CONTRACT_ADDRESS = "0xF4dF2c515581A9fA5bAa078d04703c0f3Fd9115a"; | |
// Message to be sent to the contract | |
const NEW_MESSAGE = "This tx cost me no ETH!"; |
OlderNewer