Rust-like lang.
cargo install forc fuel-core
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.18; | |
// returns 42 | |
function freePure() pure returns (uint8) { | |
return 42; | |
} | |
// takes a function and returns that same function | |
function freeHigherOrder( |
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.17; | |
// Used in the `name()` function | |
// "Yul Token" | |
bytes32 constant nameLength = 0x0000000000000000000000000000000000000000000000000000000000000009; | |
bytes32 constant nameData = 0x59756c20546f6b656e0000000000000000000000000000000000000000000000; | |
// Used in the `symbol()` function | |
// "YUL" |
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.17; | |
// Used in the `name()` function | |
bytes32 constant nameLength = 0x0000000000000000000000000000000000000000000000000000000000000009; | |
bytes32 constant nameData = 0x59756c20546f6b656e0000000000000000000000000000000000000000000000; | |
// Used in the `symbol()` function | |
bytes32 constant symbolLength = 0x0000000000000000000000000000000000000000000000000000000000000003; | |
bytes32 constant symbolData = 0x59554c0000000000000000000000000000000000000000000000000000000000; |
// import `thread` module from std lib and `mpsc` module from `sync` from std lib | |
use std::thread; | |
use std::sync::mpsc; | |
// program entry point | |
fn main() { | |
// create sender and receiver with `channel()` | |
let (sender, receiver) = mpsc::channel(); |
// import `thread` module from the standard library | |
use std::thread; | |
// entry point of the program | |
fn main() { | |
// spawn a new thread with the `spawn` method in the `thread` module | |
thread::spawn(|| { | |
println!("hello from the spawned thread"); | |
} |
// --snip-- | |
_host.callAgreement( | |
_cfa, | |
abi.encodeWithSelector( | |
_cfa.createFlow.selector, | |
token, | |
receiver, | |
flowRate, | |
new bytes(0) |
selecetor | contract_name | signature_type | signature | |
---|---|---|---|---|
0x0023de29 | ERC777RecipientDrainingGas | function | tokensReceived(address,address,address,uint256,bytes,bytes) | |
0x0023de29 | ERC777RecipientReverting | function | tokensReceived(address,address,address,uint256,bytes,bytes) | |
0x0023de29 | IERC777Recipient | function | tokensReceived(address,address,address,uint256,bytes,bytes) | |
0x0023de29 | TOGA | function | tokensReceived(address,address,address,uint256,bytes,bytes) | |
0x00fdd58e | ERC1155 | function | balanceOf(address,uint256) | |
0x00fdd58e | ERC1155Burnable | function | balanceOf(address,uint256) | |
0x00fdd58e | ERC1155Pausable | function | balanceOf(address,uint256) | |
0x00fdd58e | ERC1155PresetMinterPauser | function | balanceOf(address,uint256) | |
0x00fdd58e | ERC1155Supply | function | balanceOf(address,uint256) |
There is an increasing need for off-chain infrastructure in the Supefluid ecosystem as more projects, protocols, and individuals need to interact with contracts in complex, scheduled, or automated ways. This includes, but is not limited to, insolvent stream liquidation, pre-insolvency courtesy stream closures, scheduled transactions, and meta transactions.
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
/// @title Interface extracted from Biconomy Source Code. | |
/// @author jtriley.eth | |
/// @notice This allows us to interface with the Trusted Forwarder contract that | |
/// will call the respective functions on the Superfluid host. | |
interface IForwarder { | |
/// @dev Full ERC20 Forward Request, Not all fields are relevant |