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

Refactor interface #57

Merged
merged 62 commits into from
Oct 8, 2024
Merged
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
0441549
evm: splits up governance into subcategories at the root level
scnale Sep 25, 2024
aa3591e
evm: further adjustments to sdk layouts
scnale Sep 25, 2024
fe47b47
sdk: removes obsolete comment
scnale Sep 25, 2024
2fcda1e
evm: makes space for acquire ownership method
scnale Sep 25, 2024
196e777
evm: add shared components
AgusVelez5 Sep 26, 2024
fc29f17
evm: fix acquire ownership
AgusVelez5 Sep 26, 2024
1b5a48f
evm: fix access control commands
AgusVelez5 Sep 26, 2024
e215ca9
fix comment
AgusVelez5 Sep 26, 2024
6872eb5
evm: add components integration
AgusVelez5 Sep 27, 2024
c84dd2a
evm: fix tests
AgusVelez5 Sep 27, 2024
b8fd168
evm: add ADMINS_ID command
AgusVelez5 Sep 27, 2024
e2fe4aa
evm: split update admin command
AgusVelez5 Sep 28, 2024
6b0698d
evm: shrink admins length
AgusVelez5 Sep 28, 2024
9135002
evm: check consistency between chainIds
AgusVelez5 Sep 29, 2024
3fac29c
evm: adds layout for approve token instruction
scnale Sep 25, 2024
2e9402b
evm: implements approve token instruction
scnale Sep 25, 2024
c256623
evm: fixes tests and adds some more
scnale Sep 25, 2024
c05a419
evm: adds token bridge allowance query
scnale Sep 25, 2024
68cf55e
sdk-evm: updates transfer and relaying fee logic
scnale Sep 25, 2024
bc2d93b
sdk: partially fixes tests for EVM
scnale Sep 26, 2024
21f0597
deployment: partial fix for EVM deployment scripts
scnale Sep 27, 2024
c6b64e2
sdk: adds clean script for EVM sdk
scnale Sep 28, 2024
c13c453
evm: eliminates the quoting logic specific to L2 chains
scnale Sep 30, 2024
febb609
evm: fixes rounding error in `relayFee`
scnale Sep 30, 2024
33340d3
sdk: WIP EVM ids update
scnale Oct 1, 2024
0b4cf99
evm: several fixes to contract and sdk
scnale Oct 1, 2024
502c0c6
evm: fixes token acquisition so that it only receives the normalized …
scnale Oct 1, 2024
cd1bfab
evm: fixes build and tests
scnale Oct 1, 2024
4577ffd
evm: add external functions
AgusVelez5 Oct 1, 2024
d5088fd
evm: extracts layouts meant to go to the wormhole solidity sdk
scnale Oct 1, 2024
7bf8ea4
sdk: fix comment
AgusVelez5 Oct 1, 2024
46fdfc5
evm: remove constructor chainId validation
AgusVelez5 Oct 1, 2024
ec3031b
sdk: adds a few methods in EVM sdk
scnale Oct 1, 2024
27ef9f8
evm: retrieves default gas token from the sdk
scnale Oct 1, 2024
c778a14
evm: add senderAuthorization function to access control
AgusVelez5 Oct 1, 2024
343382e
evm: role enum to access control component
AgusVelez5 Oct 2, 2024
645a085
evm: refactor access control role checking
AgusVelez5 Oct 2, 2024
e37d23d
evm: add vaa parse test
AgusVelez5 Oct 2, 2024
e8d5822
evm: adds dispatcher functions to shared components
scnale Oct 2, 2024
34338dd
evm: improve craft vaa function
AgusVelez5 Oct 2, 2024
2e83370
evm-sdk: fixes integration tests
scnale Oct 3, 2024
7b2bc58
evm: fixes solidity sdk import
scnale Oct 3, 2024
121c7c5
evm: updates submodule and fixes tests
scnale Oct 3, 2024
3af0c5a
deployment: fixes addresses passed in as strings instead of EvmAddress
scnale Oct 3, 2024
7b9dd92
refactor TBRv3 EVM SDK without breaking transfer/complete/relayfee in…
nonergodic Oct 3, 2024
902dc12
evm: updates price oracle submodule
scnale Oct 3, 2024
967a5b2
fix invalid type generation in case of nested query arrays
nonergodic Oct 4, 2024
e77e428
evm: fixes sdk typo
scnale Oct 4, 2024
71dd589
evm-sdk: fixes tests
scnale Oct 4, 2024
565efdf
deployment: updates EVM scripts
scnale Oct 4, 2024
f690b92
evm: updates price oracle submodule
scnale Oct 4, 2024
1f816df
evm: reorders config query ids for future size optimization
scnale Oct 4, 2024
6425f8a
evm: updates price oracle submodule and solidity sdk contracts
scnale Oct 4, 2024
b6d1ce5
sdk: fixes evm sdk gas token retrieval
scnale Oct 4, 2024
4d0c166
deployment: fixes gas token retrieval in test transfer
scnale Oct 4, 2024
e4ccdd4
misc: updates sdk packages and fixes build scripts
scnale Oct 4, 2024
24e81e2
evm: fixes canonical chain token redeem
scnale Oct 5, 2024
fc73f85
evm: add complete function tests
AgusVelez5 Oct 5, 2024
d849987
evm: update IWETH interface
AgusVelez5 Oct 7, 2024
b2b93be
evm: updates price oracle submodule to point to latest `main` commit
scnale Oct 8, 2024
695658d
solana: fixes sdk IDL import
scnale Oct 8, 2024
3b12a66
solana: fixes path of price oracle contract ELF
scnale Oct 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
evm: splits up governance into subcategories at the root level
scnale committed Oct 8, 2024
commit 0441549d571d709e38fa3186a97cca2f614aab48
2 changes: 1 addition & 1 deletion evm/src/assets/TbrDispatcher.sol
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ abstract contract TbrDispatcher is RawDispatcher, TbrGovernance, TbrUser {
senderRefund -= gasDropoffSpent;
}
else if (command == GOVERNANCE_ID)
offset = _batchGovernanceCommands(data, offset);
offset = _batchConfigCommands(data, offset);
else if (command == ACQUIRE_OWNERSHIP_ID)
_acquireOwnership();
else
2 changes: 1 addition & 1 deletion evm/src/assets/TbrGovernance.sol
Original file line number Diff line number Diff line change
@@ -69,7 +69,7 @@ abstract contract TbrGovernance is TbrBase, ProxyBase {

// ---- externals ----

function _batchGovernanceCommands(bytes calldata commands, uint offset) internal returns (uint) {
function _batchConfigCommands(bytes calldata commands, uint offset) internal returns (uint) {
GovernanceState storage state = governanceState();
bool isOwner;
if (msg.sender == state.owner) //check highest privilege level first
2 changes: 1 addition & 1 deletion sdk/evm/tbrv3/contract.ts
Original file line number Diff line number Diff line change
@@ -264,7 +264,7 @@ export class Tbrv3 {
const methods = layout.serializeLayout(execParamsLayout, {
version: 0,
commandCategories: commands.map(arg => ({
commandCategory: 'GovernanceCommands',
commandCategory: 'ConfigCommands',
commands
}) satisfies LayoutToType<typeof commandCategoryLayout>),
})
7 changes: 6 additions & 1 deletion sdk/evm/tbrv3/layouts.ts
Original file line number Diff line number Diff line change
@@ -268,7 +268,10 @@ export const commandCategoryLayout = {
[[0, "TransferTokenWithRelay"], transferTokenWithRelayLayout],
[[1, "TransferGasTokenWithRelay" ], transferGasTokenWithRelayLayout],
[[2, "CompleteTransfer"], [{ name: "vaa", binary: "bytes", lengthSize: 2 }]],
[[3, "GovernanceCommands"], subArrayLayout("commands", governanceCommandLayout)],
[[3, "ConfigCommands"], subArrayLayout("commands", governanceCommandLayout)],
[[0x60, "RoleCommands"], [] /*subArrayLayout("commands", roleCommandLayout)*/],
[[0x61, "UpgradeCommands"], [] /*subArrayLayout("commands", upgradeCommandLayout)*/],
[[0x62, "SweepTokens"], [] /*sweepTokensLayout*/],
],
} as const;
export type CommandCategory = LayoutToType<typeof commandCategoryLayout>;
@@ -281,6 +284,8 @@ export const queryCategoryLayout = {
[[0x80, "RelayFee"], relayingFeesInputLayout],
[[0x81, "BaseRelayingConfig"], baseRelayingConfigInputLayout],
[[0x82, "GovernanceQueries"], subArrayLayout("queries", governanceQueryLayout)],
[[0xe0, "RoleQueries"], [] /*subArrayLayout("queries", roleQueryLayout)*/],
[[0xe1, "UpgradeQueries"], [] /*subArrayLayout("queries", upgradeQueryLayout)*/],
],
} as const;
export type QueryCategory = LayoutToType<typeof queryCategoryLayout>;