feat: implement cross-contract token wrapping for interoperability#188
Open
Nonso-Eze wants to merge 1 commit into
Open
feat: implement cross-contract token wrapping for interoperability#188Nonso-Eze wants to merge 1 commit into
Nonso-Eze wants to merge 1 commit into
Conversation
Closes BCPathway#168 - Add WrapperContract (contracts/wrapper) implementing SEP-41 TokenInterface - wrap(caller, amount): pulls underlying token via transfer_from, mints wrapped tokens - unwrap(caller, wrapped_amount): burns wrapped tokens, returns underlying via transfer - Full SEP-41 surface: transfer, transfer_from, approve, burn, burn_from, allowance, balance, decimals, name, symbol - Decimal mismatch handling: scale_to_wrapper / scale_to_underlying helpers - Reentrancy guard via in-storage lock (DataKey::Lock) - Pause/unpause via bc-forge-lifecycle integration - Structured events: init, wrap, unwrap, xfer, xfer_frm, approve, burn, paused, unpause - Add WrapperClient to SDK (sdk/src/wrapperClient.ts) - wrap(), unwrap(), transfer(), approve(), burn(), pause(), unpause() - Read queries: getBalance, getTotalSupply, getUnderlyingToken, getName, getSymbol, getDecimals, getAllowance, getVersion - Offline builders: buildWrapTx, buildUnwrapTx, signTx - Simulation helpers: simulateWrap, simulateUnwrap - Re-exported from sdk/src/index.ts
|
@Nonso-Eze Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #168