neo-devpack-solidity 0.22.0

Production-focused Solidity-to-NeoVM compilation system
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.34;

interface IFoo {
    function bar(uint256 x) external returns (bool);
}

contract EvmCompatEncodeCalldata {
    function withSignature(uint256 value) public pure returns (bytes memory) {
        return abi.encodeWithSignature("bar(uint256)", value);
    }

    function withSelector(uint256 value) public pure returns (bytes memory) {
        return abi.encodeWithSelector(IFoo.bar.selector, value);
    }
}