Changes in Oscript 2.0
Functions
$f = ($x) => {
$a = var['a'];
$x * $a
};
// one-line syntax for functions that have only one expression
[ | |
{ | |
"data": [ | |
{ | |
"name": "address", | |
"type": "felt" | |
}, | |
{ | |
"name": "content_len", | |
"type": "felt" |
// SPDX-License-Identifier: GPL-3.0-or-later | |
pragma solidity >=0.7.0 <0.8.0; | |
contract CongressRegistry { | |
// The first key is the delegator and the second key a id. | |
// The value is the address of the delegate | |
mapping (address => address) public delegation; | |
mapping (address => uint256) public expiration; | |
mapping (address => bytes) public affiliation; |
[ | |
{ | |
"name": "DAppNodeDAO staked in Unipool rewards contracts multichain", | |
"strategy": { | |
"name": "multichain", | |
"params": { | |
"strategies": [ | |
{ | |
"name": "unipool-univ2-lp", | |
"network": 1, |
<template> | |
<div> | |
<button @click="addItem('wut')">count is: {{ count }}</button> | |
<div | |
v-for="result in results" | |
:key="result.id" | |
@click="removeItem(result.id)" | |
> | |
{{ result.id }} |
$f = ($x) => {
$a = var['a'];
$x * $a
};
// one-line syntax for functions that have only one expression
{ | |
init: `{ | |
$asset = 'n9y3VomFeWFeZZ2PcSEcmyBb/bI7kzZduBJigNetnkY='; | |
$mm_asset = var['mm_asset']; | |
}`, | |
messages: { | |
cases: [ | |
{ // define share asset | |
if: `{ trigger.data.define AND !$mm_asset }`, | |
messages: [ |
pragma solidity ^0.4.14; | |
/* | |
Example of how to verify BLS signatures and BGLS aggregate signatures in Ethereum. | |
Signatures are generated using https://github.com/Project-Arda/bgls | |
Code is based on https://github.com/jstoxrocky/zksnarks_example | |
*/ | |
contract BLSExample { |
<template> | |
<Page class="page"> | |
<ActionBar class="action-bar" title="Miyha"> | |
<NavigationButton text="Menu" icon="res://ic_list_black_24dp" @tap="toggleDrawer" /> | |
<StackLayout orientation="horizontal"> | |
<Image src="res://icon" width="40" height="40" verticalAlignment="center" /> | |
<Label text="iyha" fontSize="24" verticalAlignment="center" /> | |
</StackLayout> | |
</ActionBar> | |
<SideDrawer> |
{ | |
"version": "0.0.1", | |
"dns": {"records":[["@","CNAME","steem.io"]]}}, | |
"profile": { | |
"name": "Ned Scott", | |
"email": "ned@steem.io", | |
"birthday": "12/31/1999", | |
"gender": "male", | |
"about": "CEO and Co-founder at Steemit", | |
"first_name": "Ned", |