paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.8k stars 652 forks source link

[pallet-revive] Add balance_of syscyall for fetching foreign balances #5675

Closed xermicus closed 2 weeks ago

xermicus commented 2 weeks ago

This adds an API method balance_of, corresponding to the BALANCE EVM opcode.

In Ext, balance and balance_of are internally routed through the same new account_balance method: balance is technically the same as balance_of with the caller address. This avoids duplicating all the tests and avoids a small inefficiency (in theory, balance directly call balance_of however this introduces a round trip of converting the target address to a H160 and back).

xermicus commented 2 weeks ago

bot bench substrate-pallet --pallet=pallet_revive

command-bot[bot] commented 2 weeks ago

@xermicus https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7318186 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_revive. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 4-55c00bdd-8623-47f0-a47f-beed0f10b779 to cancel this command or bot cancel to cancel all commands in this pull request.

command-bot[bot] commented 2 weeks ago

@xermicus Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_revive has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7318186 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7318186/artifacts/download.

xermicus commented 2 weeks ago

bot bench substrate-pallet --pallet=pallet_revive --features=riscv

command-bot[bot] commented 2 weeks ago

@xermicus unknown option '--features=riscv'

xermicus commented 2 weeks ago

bot bench help

command-bot[bot] commented 2 weeks ago

@xermicus Unknown subcommand of "bench". Refer to help docs and/or source code.

xermicus commented 2 weeks ago

bot bench substrate-pallet --pallet=pallet_revive -- --features=riscv

command-bot[bot] commented 2 weeks ago

@xermicus https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7319583 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_revive. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 5-02213496-a0c5-4674-bbb5-75e9b374160e to cancel this command or bot cancel to cancel all commands in this pull request.

command-bot[bot] commented 2 weeks ago

@xermicus Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_revive has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7319583 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7319583/artifacts/download.

xermicus commented 2 weeks ago

bot bench substrate-pallet --pallet=pallet_revive

command-bot[bot] commented 2 weeks ago

@xermicus https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7322691 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_revive. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 6-599c6d2f-edd7-48b0-a5dc-7e0b6384ab43 to cancel this command or bot cancel to cancel all commands in this pull request.

command-bot[bot] commented 2 weeks ago

@xermicus Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_revive has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7322691 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7322691/artifacts/download.

xermicus commented 2 weeks ago

bot bench substrate-pallet --pallet=pallet_revive

command-bot[bot] commented 2 weeks ago

@xermicus https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7335312 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_revive. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 1-c5a548e3-3ad2-4a1e-8b51-04b210203356 to cancel this command or bot cancel to cancel all commands in this pull request.

command-bot[bot] commented 2 weeks ago

@xermicus Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_revive has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7335312 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7335312/artifacts/download.

xermicus commented 2 weeks ago

bot bench substrate-pallet --pallet=pallet_revive

command-bot[bot] commented 2 weeks ago

@xermicus https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7335781 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_revive. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 2-e5b051e3-4f91-458d-9a22-94d8aa518d3a to cancel this command or bot cancel to cancel all commands in this pull request.

command-bot[bot] commented 2 weeks ago

@xermicus Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_revive has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7335781 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7335781/artifacts/download.