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

Payable by sc #3602

Merged
merged 6 commits into from
Nov 26, 2021
Merged

Payable by sc #3602

merged 6 commits into from
Nov 26, 2021

Conversation

sasurobert
Copy link
Contributor

New feature - contracts payable by SC.
Special testing: contract A transfers tokens for contract B - contract B is deployed as payable by contract.

@codecov
Copy link

codecov bot commented Nov 24, 2021

Codecov Report

Merging #3602 (82091ce) into development (ec12d8e) will decrease coverage by 0.00%.
The diff coverage is 75.51%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #3602      +/-   ##
===============================================
- Coverage        74.00%   74.00%   -0.01%     
===============================================
  Files              582      582              
  Lines            74888    74910      +22     
===============================================
+ Hits             55424    55436      +12     
- Misses           15058    15067       +9     
- Partials          4406     4407       +1     
Impacted Files Coverage Δ
factory/apiResolverFactory.go 0.00% <0.00%> (ø)
genesis/process/genesisBlockCreator.go 15.95% <0.00%> (-0.28%) ⬇️
node/nodeRunner.go 0.00% <0.00%> (ø)
process/smartContract/hooks/blockChainHook.go 58.50% <85.71%> (+0.66%) ⬆️
factory/blockProcessorCreator.go 79.32% <100.00%> (+0.05%) ⬆️
genesis/process/metaGenesisBlockCreator.go 49.59% <100.00%> (+0.13%) ⬆️
genesis/process/shardGenesisBlockCreator.go 42.97% <100.00%> (+0.11%) ⬆️
process/smartContract/process.go 66.95% <100.00%> (ø)
process/transaction/shardProcess.go 76.86% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0b221c9...82091ce. Read the comment docs.

camilbancioiu
camilbancioiu previously approved these changes Nov 24, 2021
@@ -425,6 +439,10 @@ func (bh *BlockChainHookImpl) IsPayable(address []byte) (bool, error) {
}

metadata := vmcommon.CodeMetadataFromBytes(userAcc.GetCodeMetadata())
if bh.flagIsPayableBySC.IsSet() && bh.IsSmartContract(sndAddress) {
return metadata.Payable || metadata.PayableBySC, nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sasurobert sasurobert changed the base branch from development to feat/SC-proc-improvements-NOV November 26, 2021 07:15
@sasurobert sasurobert dismissed SebastianMarian’s stale review November 26, 2021 07:15

The base branch was changed.

@sasurobert sasurobert merged commit 21aa236 into feat/SC-proc-improvements-NOV Nov 26, 2021
@sasurobert sasurobert deleted the payableBySC branch November 26, 2021 09:42
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.

None yet

3 participants