-
Notifications
You must be signed in to change notification settings - Fork 61
ping pong #202
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
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@skosito @fbac I'm trying to get a Ping Pong going between contracts on localnet: calling Hello's When I call But when I'm making a cross-chain call from Hello, it fails: I thought maybe the problem was that Echo didn't have tokens for gas to call the gateway, but I've sent tokens to it manually, still failed. I also tried sending the ETH transferred from Hello directly to Echo, still failing: function pingPong(string memory message) external payable {
payable(0xc3e53F4d16Ae77Db1c982e75a937B9f60FE63690).transfer(msg.value);
gateway.call(
0x67d269191c92Caf3cD7723F116c85e6E9bf55933,
abi.encode("hello"),
RevertOptions({
revertAddress: address(0),
callOnRevert: false,
abortAddress: address(0),
revertMessage: "",
onRevertGasLimit: 0
})
);
}Using the latest localnet from this PR: zeta-chain/localnet#45 Any pointers are appreciated. |
| contract Echo { | ||
| GatewayEVM public immutable gateway; | ||
|
|
||
| event RevertEvent(string, RevertContext); | ||
| event HelloEvent(string, string); | ||
|
|
||
| constructor(address payable gatewayAddress) { | ||
| gateway = GatewayEVM(gatewayAddress); | ||
| } | ||
|
|
||
| function hello(string memory message) external payable { | ||
| emit HelloEvent("Hello on EVM", message); | ||
| } | ||
|
|
||
| function onRevert(RevertContext calldata revertContext) external { | ||
| emit RevertEvent("Revert on EVM", revertContext); | ||
| } | ||
|
|
||
| function call( | ||
| address receiver, | ||
| bytes calldata message, | ||
| RevertOptions memory revertOptions | ||
| ) external { | ||
| gateway.call(receiver, message, revertOptions); | ||
| } | ||
|
|
||
| receive() external payable {} | ||
|
|
||
| fallback() external payable {} | ||
| } |
Check warning
Code scanning / Slither
Contracts that lock Ether
examples/hello/contracts/Hello.sol
Outdated
Check warning
Code scanning / Slither
Unused return
examples/hello/contracts/Hello.sol
Outdated
Check warning
Code scanning / Slither
Unused return
examples/hello/contracts/Hello.sol
Outdated
Check warning
Code scanning / Slither
Unused return
|
Replaced with #204 |
No description provided.