-
Notifications
You must be signed in to change notification settings - Fork 28
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
Contracts top level #422
Contracts top level #422
Changes from all commits
ab29ee4
ba00a78
8612bb8
5591ed8
27feb51
a1c1330
821c980
6a22956
ca9155a
a6a4da9
ddcf620
deb2569
bdd9297
4bc2441
78212b2
2273773
6000426
d6fd2cc
16fb775
5c88d99
1488a35
7b48f10
81ebe2c
fc4120c
93fe8b5
56c416e
fd5b9f6
fb216a7
fae3473
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,4 +43,4 @@ server.log | |
*.test | ||
|
||
# Forge documentation | ||
contracts/docs/ | ||
docs/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
[submodule "contracts/lib/forge-std"] | ||
path = contracts/lib/forge-std | ||
url = https://github.com/foundry-rs/forge-std | ||
[submodule "lib/forge-std"] | ||
branch = v1.3.0 | ||
[submodule "contracts/lib/openzeppelin-contracts"] | ||
path = contracts/lib/openzeppelin-contracts | ||
url = https://github.com/OpenZeppelin/openzeppelin-contracts | ||
[submodule "contracts/lib/subnet-evm"] | ||
path = contracts/lib/subnet-evm | ||
url = https://github.com/ava-labs/subnet-evm | ||
[submodule "contracts/lib/openzeppelin-contracts-upgradeable"] | ||
path = contracts/lib/openzeppelin-contracts-upgradeable | ||
branch = v1 | ||
path = lib/forge-std | ||
url = https://github.com/foundry-rs/forge-std | ||
[submodule "lib/openzeppelin-contracts"] | ||
path = lib/openzeppelin-contracts | ||
url = https://github.com/openzeppelin/openzeppelin-contracts | ||
[submodule "lib/openzeppelin-contracts-upgradeable"] | ||
path = lib/openzeppelin-contracts-upgradeable | ||
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable | ||
[submodule "lib/subnet-evm"] | ||
path = lib/subnet-evm | ||
url = https://github.com/ava-labs/subnet-evm |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lib/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
## ABI Bindings | ||
|
||
This directory contains ABI bindings for the Solidity contracts in the `contracts/src/CrossChainApplications` and `contracts/src/Teleporter` directories. The files with the same name as the Solidity source files are automatically generated by the `scripts/abi_bindings.sh` script. Other files in this directory (such as the packing utilities) are manually created and maintained. | ||
This directory contains Solidity contract ABI bindings. The files with the same name as the Solidity source files are automatically generated by the `scripts/abi_bindings.sh` script. Other files in this directory (such as the packing utilities) are manually created and maintained. |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,14 +10,6 @@ import {ITeleporterMessenger} from "@teleporter/ITeleporterMessenger.sol"; | |
import {TeleporterMessenger} from "@teleporter/TeleporterMessenger.sol"; | ||
|
||
abstract contract GetTeleporterMessengerTest is BaseTeleporterRegistryAppTest { | ||
function testGetTeleporterMessengerBasic() public { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was there a reason to move this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems like a lint with the new version, did it hit a lint rule? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, the linter complained about |
||
ITeleporterMessenger messenger = app.getTeleporterMessenger(); | ||
assertEq( | ||
teleporterRegistry.getVersionFromAddress(address(messenger)), | ||
teleporterRegistry.latestVersion() | ||
); | ||
} | ||
|
||
function testGetPausedTeleporterMessenger() public { | ||
_pauseTeleporterAddressSuccess(app, teleporterAddress); | ||
vm.expectRevert(_formatErrorMessage("Teleporter sending paused")); | ||
|
@@ -68,4 +60,12 @@ abstract contract GetTeleporterMessengerTest is BaseTeleporterRegistryAppTest { | |
teleporterRegistry.latestVersion() | ||
); | ||
} | ||
|
||
function testGetTeleporterMessengerBasic() public view { | ||
ITeleporterMessenger messenger = app.getTeleporterMessenger(); | ||
assertEq( | ||
teleporterRegistry.getVersionFromAddress(address(messenger)), | ||
teleporterRegistry.latestVersion() | ||
); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
@avalabs/[email protected]/=lib/subnet-evm/contracts/ | ||
@openzeppelin/[email protected]=lib/openzeppelin-contracts/contracts/ | ||
@openzeppelin/[email protected]=lib/openzeppelin-contracts-upgradeable/contracts/ | ||
@teleporter/=src/teleporter/ | ||
@mocks/=src/mocks/ | ||
@utilities/=src/utilities/ | ||
@forge-std=lib/forge-std/src | ||
@teleporter/=contracts/teleporter/ | ||
@mocks/=contracts/mocks/ | ||
@utilities/=contracts/utilities/ |
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.
did we need this change? I think this was working previously from the auto remappings, but we could consider turning auto remappings off to be more explicit
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.
nvm I see that it's updated in remappings. If we're going to explicitly set it for forge-std that differs from the default, might want to consider turning off auto remapping detection
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 was encountering a scenario where the auto remapping used
open-zeppelin-contracts
'forge-std
instead of ours. IMO we should be explicit wherever possible to prevent this sort of ambiguity.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'm in favor of copying the remappings we need, then disabling auto remapping detection