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

move struct TokensRecieved{} from Child to Library #34

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

BOBseal
Copy link

@BOBseal BOBseal commented Feb 25, 2024

Wormhole Solidity SDK refactored without constructors for use in Nebula Bridge Contracts.

Changes => Immutable States are now Public states to allow changes through internal Initializers

edit: further changes if any is done will be pushed to same forked repo for any development done for Nebula Bridge

Updated TokenBase.sol import for `{Base}` to fix some compilation errors
wormhole-solidity-sdk refactored with initializers instead of constructors.
changes =>
immutable states => public state
addressToBytes32CCTP() is basically same as toWormholeFormat()

removed the function addressToBytes32CCTP() from the abstract child to utils ,
and made so it calls the other same function toWormholeFormat() instead of reformatting it seperately
@BOBseal
Copy link
Author

BOBseal commented Feb 27, 2024

Test file for CCTPAndTokenBase is now pushed for quick test .

@BOBseal
Copy link
Author

BOBseal commented Feb 27, 2024

Nevermind , test case not setup properly...

found the error , it seems error in the relayer testcase setup

[FAIL. Reason: setup failed: Contract 0x0000000000000000000000000000000000000000 does not exist and is not marked as persistent, see `vm.makePersistent()`] setUp() (gas: 0)
Test result: FAILED. 0 passed; 1 failed; 0 skipped; finished in 11.20s

Ran 1 test suites: 0 tests passed, 1 failed, 0 skipped (1 total tests)

Failing tests:
Encountered 1 failing test in test/CCTPAndTokenBridge_Init.test.sol:WormholeSDKTest
[FAIL. Reason: setup failed: Contract 0x0000000000000000000000000000000000000000 does not exist and is not marked as persistent, see `vm.makePersistent()`] setUp() (gas: 0)

Encountered a total of 1 failing tests, 0 tests succeeded```



edit 2: Resolved now , turned out to be typo on testcase I made

@BOBseal
Copy link
Author

BOBseal commented Feb 27, 2024

Ah it seems the error is still there , now I am sure it is issue with the relayer testcase

move struct TokenReceived from child contracts to a library as it was adding to contract size of parent
@BOBseal
Copy link
Author

BOBseal commented Mar 7, 2024

The initialisable sdk is removed from the pull request instead I have pushed a possible improvement regarding a struct in child contracts TokenBase and CCTPandTokenBase

@BOBseal BOBseal changed the title wormhole-solidity-sdk-initializer move struct TokensRecieved{} from Child to Library Mar 7, 2024
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

Successfully merging this pull request may close these issues.

1 participant