-
Notifications
You must be signed in to change notification settings - Fork 2
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
refactor(*): cleanup #8
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the error you're getting - run forge cache clean
and forge clean
- I've found forge scripts fail with errors like this when you get rid of old scripts
src/Greeter.sol
Outdated
bytes memory data = abi.encodeWithSelector(GreetingBook.greet.selector, msg.sender, greeting); | ||
|
||
uint256 fee = xcall(omni.omniChainId(), greetingBook, data, DEST_TX_GAS_LIMIT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we bump sol versions, we can use abi,.encodeCall
test/GreetingBook.t.sol
Outdated
portal.mockXCall( | ||
mockSourceChainId, | ||
address(portal), | ||
address(greetingBook), | ||
abi.encodeWithSelector(GreetingBook.greet.selector, user, greeting), | ||
gasLimit | ||
); | ||
GreetingBook.Greeting memory lastGreet; | ||
(lastGreet.user, lastGreet.message, lastGreet.sourceChainId, lastGreet.timestamp) = greetingBook.lastGreet(); | ||
assertEq(lastGreet.message, greeting); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts on portal.mockXCall
util?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only thing that's a little confusing is the sender field. We've set it to the portal here, but that doesn't really make sense, in fact is probably an anti-pattern
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the xmsg.sender
- so it should never be the portal. We should change that here
the hello-world-template had a makeover ([here](omni-network/hello-world-template#8)) and references to it need to be updated. issue: #1596
script/bash
directory, in favor of aMakefile
RollupGreeter
andGlobalGreeter
toGreeter
andGreetingBook
GreetingBook
xmsg.sender
Note:
Currently the
make deploy
command is failing with:which is strange because building and testing works and
DeployGreetingBook
has nothing to do withIFeeOracle
.