Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
tip:  175
title: SELFBALANCE instructions in TVM
author: taihao.fu@gmail.com
status: Final
type: Standards Track
category : VM
created: 2020-08-12

Simple Summary

To provide SELFBALANCE instruction in TVM.

Abstract

This is value can directly get current address balance.

Motivation

Currently we have BALANCE to get TRX value for a specific address. We may consider to increase BALANCE energy cost in future for security purpose. But balance for current address is usually consider as a seperate case and it should keeps in a cheap price level. As a result, SELFBALANCE is introduced here.

Specification

0x47: SELFBALANCE

SELFBALANCE takes 0 operands pop up from stack.

The return value the current address account balance.

Rationale

SELFBALANCE tier.ExtTier

20 Energy