Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

트랜잭션 전송 L1 to L2 #9

Open
she110ff opened this issue Aug 14, 2023 · 1 comment
Open

트랜잭션 전송 L1 to L2 #9

she110ff opened this issue Aug 14, 2023 · 1 comment
Assignees

Comments

@she110ff
Copy link
Contributor

No description provided.

@she110ff she110ff self-assigned this Aug 14, 2023
@she110ff
Copy link
Contributor Author

zkSync era 스마트 컨트랙트는 sender가 이더리움 L1에서 트랜잭션을 요청하고 데이터를 zkSync era L2로 전달을 허용한다.

  const iface = new ethers.utils.Interface(ABI);
  const calldata = iface.encodeFunctionData("setGreeting", [message]);

  const txReceipt = await wallet.requestExecute({
    contractAddress: L2_CONTRACT_ADDRESS,
    calldata,
    l2GasLimit: l2GasLimit,
    refundRecipient: wallet.address,
    overrides: {
      // send the required amount of ETH
      value: baseCost,
      gasPrice: l1GasPrice,
    },
  });

requestExecute 를 실행

@she110ff she110ff changed the title 메세지 전송 L1 to L2 트랜잭션 전송 L1 to L2 Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant