Skip to content

Latest commit

 

History

History
36 lines (22 loc) · 826 Bytes

tip-175.md

File metadata and controls

36 lines (22 loc) · 826 Bytes
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