展开

关键词

以太坊智能合约部署与交互

":"function"},{"constant":false,"inputs":[{"name":"v","type":"uint256"}],"name":"set","outputs":[],"payable ":false,"type":"function"},{"inputs":[{"name":"v","type":"uint256"}],"payable":false,"type":"constructor inputs: [{ name: "v", type: "uint256" }], name: "set", outputs: [], payable > abi=[{"constant":true,"inputs":[],"name":"value","outputs":[{"name":"","type":"uint256"}],"payable ":false,"type":"function"},{"inputs":[{"name":"v","type":"uint256"}],"payable":false,"type":"constructor

81320

在以太坊私有链上部署智能合约

"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"payable "type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"send\",\"outputs\":[],\"payable ",\"type\":\"address\"}],\"name\":\"balances\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable "type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"payable "type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"send\",\"outputs\":[],\"payable

51340
  • 广告
    关闭

    什么是世界上最好的编程语言?丨云托管征文活动

    代金券、腾讯视频VIP、QQ音乐VIP、QB、公仔等奖励等你来拿!

  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    以太坊 web3.py 签名转账

    { "constant": true, "inputs": [], "name": "name", "outputs": [ { "name": "", "type": "string" } ], "payable ", "type": "uint256" } ], "name": "approve", "outputs": [ { "name": "success", "type": "bool" } ], "payable constant": true, "inputs": [], "name": "decimals", "outputs": [ { "name": "", "type": "uint8" } ], "payable "", "type": "address" } ], "name": "balanceOf", "outputs": [ { "name": "", "type": "uint256" } ], "payable , "type": "uint256" } ], "name": "burnFrom", "outputs": [ { "name": "success", "type": "bool" } ], "payable

    1.4K100

    LCTF2018 ggbank 薅羊毛实战

    然后就是goodluck函数 function goodluck() public payable authenticate returns (bool success) { require( public { for(int i=0;i<=50;i++){ new attack(); } } function () payable ": True, "stateMutability": "payable", "type": "function" }, { "constant ": True, "stateMutability": "payable", "type": "function" }, { "inputs ": [], "payable": False, "stateMutability": "nonpayable", "type": "constructor

    29540

    solidity开发3-类型1

    address payable:同address,不过包含transfer和send属性。 address payable可以直接隐式转换成address,而address要转换成payable address需要显示使用payable()来进行。 但是只有address或者合约类型才能通过payable显示转换为payable address类型(合约必须是可以接收以太币(有receive方法或者payable修饰的方法))。 Address members address payable x = payable(0xd9145CCE52D386f254917e481eB44e9943F39138); address myAddress

    6210

    如何开发以太坊网页钱包·Express + web3.js 实例

    文件 abi/NKC.abi [{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable ,{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable :"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable {"name":"_value","type":"uint256"}],"name":"burnFrom","outputs":[{"name":"success","type":"bool"}],"payable

    1.7K130

    区块链 Hello World -- 基于以太坊的投票Dapp

    name":"candidate","type":"bytes32"}],"name":"totalVotesFor","outputs":[{"name":"","type":"uint8"}],"payable name":"candidate","type":"bytes32"}],"name":"validCandidate","outputs":[{"name":"","type":"bool"}],"payable inputs":[{"name":"","type":"bytes32"}],"name":"votesReceived","outputs":[{"name":"","type":"uint8"}],"payable ":[{"name":"x","type":"bytes32"}],"name":"bytes32ToString","outputs":[{"name":"","type":"string"}],"payable ":false,"type":"function"},{"inputs":[{"name":"candidateNames","type":"bytes32[]"}],"payable":false,"

    32120

    【以太坊篇】-“智能合约学习”关键字pyable、balance

    pragma solidity ^0.4.16; contract payableTest{ //payable 关键字代表我们可以通过这个函数给我们的合约充值 function pay() payable { } } pragma solidity ^0.4.16; contract payableTest{ function pay() payable{ } function getBalance()

    6120

    智能合约收发 ETH 实例详解

    合约接收 ETH 首先你需要在智能合约中定义这个函数 function () payable public {},这时这个合约地址就可以接收ETH了。 测试方法,向合约地址发送ETH即可。 Refund { address owner = 0x0; uint256 ticket = 1 ether; constructor() public payable { owner = msg.sender; } function () public payable { require(msg.value >= ticket solidity ^0.4.24; contract NetkillerCashier { address public owner; constructor() public payable { owner = msg.sender; } function () payable public { owner.transfer(msg.value

    1.6K210

    一个蜜罐合约的解析

    etherscan[2] 网上的讨论地址reddit[3]源码如下: contract defi_game { function Try(string memory _response) public payable answerHash == keccak256(abi.encode(_response)) && msg.value > 1 ether ) { payable _question; } } function New(string calldata _question, bytes32 _answerHash) public payable { question = _question; answerHash = _answerHash; } function Stop() public payable isAdmin { payable(msg.sender).transfer(address(this).balance); } constructor(bytes32

    14110

    Solidity-浆糊日记-msg.value-Ether Units (wei, finney, szabo, ether)

    uint256 current_account_address_balance,uint256 contract_account_balance); constructor() public payable msg.sender, address(msg.sender).balance, address(this).balance); } function deposit() public payable msg.sender).balance, address(this).balance); } function withdrawball(uint256 _value) public payable

    1.4K40

    智能合约安全审计之路-拒绝服务漏洞

    合约将拒绝服务,地址对应的字节码将被标注为删除 合约地址中所有的ETH将被发送到指定的新地址 进行ETH转移时,即使目标地址为一个合约地址,也不会触发该地址的fallback函数,因此不需要该合约有任何的payable contract Auction { address public topBidder; uint256 public topBid; constructor() public payable ); topBid = msg.value; topBidder = msg.sender; } function bid() payable // ... } } contract revertContract{ function testBid(address _addr) public payable () public constant returns(uint256){ return this.balance; } function() public payable

    80140

    ETH 合约常用方法

    token.safeTransferFrom(account, address(this), tokenId); } // 从合约中转出去 ETH function ethWithdraw(address payable account.transfer(_currentBalance); } // 从合约中转出去 ETH function ethIncome() external payable { } // 可以直接转账 ETH function () external payable {} }

    29330

    智能合约:重入漏洞

    此外,为了接收以太币,fallback 函数必须标记为 payable。 mapping(address => uint) public userBalannce; uint public amount = 0; function Victim() payable {} function receiveEther() payable{ if(msg.value > 0){ userBalannce[msg.sender contract Attacker{ uint public amount = 0; uint public test = 0; function Attacker() payable {} function() payable{ test++; Victim(msg.sender).withDraw(); } function

    1.1K31

    XCTF高校战“疫”区块链Writeup + 合约逆向题技巧分享

    ]) def balanceOf(address _owner): # not payable return balanceOf[_owner] def unknownb4de8673(addr : # default function revert def unknown11f776bc(): # not payable require caller ! def buy() payable: require caller ! 而账户eth余额,由于合约只有buy()一个payable函数,所以如果用buy()转账就要调用400次,显然很麻烦。因此可以采用selfdestruct指定参数的方法转出合约的全部余额。 def unknown11f776bc(): # not payable require caller !

    6510

    solidity中transfer异常send and transfer are only available for objects of type address

    你会发现在编译时会报如下异常: browser/***: TypeError: "send" and "transfer" are only available for objects of type "address payable _to.transfer(_value); 针对此异常需要将地址转换为payable的。 可通过两种形式,如果该地址是作为属性设置好的,比如通过set方法进行设置的,那么在定义该属性时需要定义为如下形式: address payable receiver; 如果是像上面的示例方法中一样,是传递进来的参数

    1.6K10

    跟我学 Solidity:关于变量

    类型转换:address payable可以隐式转换为简单的address类型,这表示你可以将address payable分配给address类型,而无需显式转换。 这种转换将产生address payable类型。 地址类型成员:[10]地址类型的两个重要成员是balance(允许查询地址的余额)和transfer(允许发送以 wei 单位的以太币到address payable类型的地址。 如果合约定义了receive[12]函数或fallback function[13]函数(我们后面会介绍这两个函数的更多详情),则会转换为address payable,如果没有这两个函数,则转换为address ,此时,如果你希望转换为 payable,则必须使用payable(address(x))。

    20620

    一个蜜罐合约的解析(二)调用隐藏

    use of storage instructions address owner; //STORAGE[0x0] bytes 0 to 19 function fallback() public payable { find similar } function 0x2000df44(address varg0, uint256 varg1, uint256 varg2) public payable display it for the sake of completeness. function __function_selector__(uint256 function_selector) public payable function myCall( address varg0, uint256 varg1, uint256 varg2 ) public payable function multicall(bytes[] calldata data) public payable override returns (bytes[] memory results) {

    15720

    2018-03-09 Solidity智能合约开发测试环境搭建

    uint amount);     event Transfer(address from, address to, uint amount);     function Token() public payable "name":"account","type":"address"},{"name":"amount","type":"uint256"}],"name":"issue","outputs":[],"payable [{"name":"to","type":"address"},{"name":"amount","type":"uint256"}],"name":"transfer","outputs":[],"payable [{"name":"account","type":"address"}],"name":"getBalance","outputs":[{"name":"","type":"uint256"}],"payable ":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable

    8030

    相关产品

    • 云服务器

      云服务器

      云端获取和启用云服务器,并实时扩展或缩减云计算资源。云服务器 支持按实际使用的资源计费,可以为您节约计算成本。 腾讯云服务器(CVM)为您提供安全可靠的弹性云计算服务。只需几分钟,您就可以在云端获取和启用云服务器,并实时扩展或缩减云计算资源。云服务器 支持按实际使用的资源计费,可以为您节约计算成本。

    相关资讯

    热门标签

    扫码关注云+社区

    领取腾讯云代金券