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

feat: add new param contract_bytes_base64 with type Option<Base64VecU8> #28

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hanakannzashi
Copy link

@hanakannzashi hanakannzashi commented Jun 4, 2023

Vec<u8> use almost 4 times gas compared with Base64VecU8, I think we should support Base64VecU8 to make contract method more useful.

Gas Test

Test Code

I call these two contract methods and put contract code itself as args. Code length is 91774 bytes.

截屏2023-06-04 16 39 20

Test Result

Test Base64VecU8

截屏2023-06-04 16 36 55

Test Vec<u8>

截屏2023-06-04 16 39 04

src/models.rs Outdated Show resolved Hide resolved
@hanakannzashi hanakannzashi changed the title fix: change type Vec<u8> with Base64VecU8 for contract_bytes feat: add Base64VecU8 for contract_bytes_base64 Jun 4, 2023
@hanakannzashi hanakannzashi changed the title feat: add Base64VecU8 for contract_bytes_base64 feat: add new param contract_bytes_base64 as Base64VecU8 Jun 4, 2023
@hanakannzashi hanakannzashi changed the title feat: add new param contract_bytes_base64 as Base64VecU8 feat: add new param contract_bytes_base64 with type Base64VecU8 Jun 4, 2023
@hanakannzashi hanakannzashi changed the title feat: add new param contract_bytes_base64 with type Base64VecU8 feat: add new param contract_bytes_base64 with type Option<Base64VecU8> Jun 4, 2023
Copy link

@frol frol left a comment

Choose a reason for hiding this comment

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

Ouch, this fall through the cracks. This change looks good to me.

@BenKurrek It seems you were the last pushing the changes to near-linkdrop to production. Do you know how to do it? Can you own/execute this process?

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.

2 participants