博客
关于我
solidity中的transfer、send、call(delegatecall)的区别和用法总结
阅读量:674 次
发布时间:2019-03-15

本文共 1097 字,大约阅读时间需要 3 分钟。

Regarding Solidity, a popular programming language used for smart contracts on blockchain platforms, understanding the differences between transfer, send, and call methods is crucial for developers. These methods are often conflated, but they serve distinct purposes in contract programming.

・The transfer and send methods are designed for transferring tokens between addresses and invoking external contract functions respectively. While transfer is deterministic and gas-efficient, send is more flexible but less predictable.

・Importantly, when using transfer or send in Solidity, a fallback function must be implemented in the recipient contract to handle the transaction's Ether. This is because Solidity's EVM requires that any transaction must have a receiver to process it.

・The call.value method is another powerful tool for interacting with contracts. It allows the immediate use of Ether and requires that the method being called is marked as payable. Unlike transfer and send, there is no gas limit restriction for call.value.

译者:何派文

关键词:Solidity, 转账方法, contract, fallback函数, call.value

转载地址:http://jsmmz.baihongyu.com/

你可能感兴趣的文章
Oracle中DATE数据相减问题
查看>>
Oracle中merge into的使用
查看>>
oracle中sql查询上月、本月、上周、本周、昨天、今天的数据!
查看>>
oracle中sql的case语句运用--根据不同条件去排序!
查看>>
Oracle中Transate函数的使用
查看>>
oracle中关于日期问题的汇总!
查看>>
Oracle中常用的语句
查看>>
Oracle中序列的操作以及使用前对序列的初始化
查看>>
oracle中新建用户和赋予权限
查看>>
Oracle中的NVL,NVL2,NULLIF以及COALESCE函数使用
查看>>
Oracle中的rownum 和rowid的用法和区别
查看>>
oracle中的大小写、字符、dual、数字、处理、日期、函数、显/隐式、时间、条件表达式case、decode、to_date、to_char、sysdate
查看>>
Oracle修改字段类型
查看>>
oracle典型安装失败,安装oracle 10失败
查看>>
Oracle分析函数之LEAD和LAG
查看>>
Oracle和SQL server的数据类型比较
查看>>
Oracle用游标删除重复数据
查看>>
Oracle监听配置、数据库实例配置等
查看>>
Oracle系列:安装Oracle RAC数据库(二)
查看>>
oracle系统 介绍,ORACLE数据库管理系统介绍
查看>>