メインコンテンツまでスキップ
バージョン: 3.5.0

Start Up

名前操作コスト
StartUp仮想マシンを初期化30000GAS

基本文法

名前操作コスト
配列パターンlet [a, b, ...c] = [1,2,3,4,5]ban
オブジェクトパターンlet {p0, p1} = {"p0": 123, "p1": 345}ban
正規表現/ab{2,5}c/gban
文のスローthrow "justtest"50GAS
式の呼び出しf("justtest")4GAS
テンプレートリテラル`that ${ person } is a ${ age }`4GAS + 8GAS * string length
タグ付きテンプレートリテラルmyTag`that ${ person } is a ${ age }`4GAS
new式new Number(10)8GAS
yield式yield "justtest"8GAS
メンバー式a.member4GAS
メタプロパティnew.target4GAS
代入式'*=' '**=' '/=' '%=' '+=' '-=' '<<=' '>>=' '>>>=' '&=' '^=' '|='3GAS + BinaryExpression charge
'='3GAS
UpdateExpression'++' '--'3GAS
二項式'-' '*' '/' '%' '**' '|' '^' '&' '<<' '>>' '>>>'3GAS
'+' '==' '!=' '===' '!==' '<' '<=' '>' '>='3GAS + (1GAS * (left op length + right op length) if op is string)
'instanceof' 'in'3GAS
単項式'+' '-' '~' '!' 'delete' 'void' 'typeof'3GAS
LogicalExpression'||' '&&'3GAS
条件式... ? ... : ...3GAS
Spread式f(...[10, 11, 12, 13])1GAS * arguments length
オブジェクト式{ name:"Jack", age:10, 5:true }2GAS + 0.1GAS * array length
配列式[ 3, 5, 100 ]2GAS + 0.1GAS * array length
関数式let a = function(width, height) { return width * height }1GAS
アロー関数式material => material.length3GAS
クラス宣言class Polygon { ... }150GAS
関数宣言function a(width, height) { return width * height }3GAS
変数宣言let a = 13GAS
初期化なし変数宣言let a3GAS
メソッド定義let obj = { foo() {return 'bar';} }2GAS
文字列リテラル"justtest"0.1GAS * string length
For文for ( ... ) { ... }1GAS * cycles
For-In文for ... in ...4GAS * cycles
For-Of文for ... of ...2GAS * cycles
While文while ( ... ) { ... }1GAS * cycles
Do-While文do { ... } while ( ... )1GAS * cycles

ライブラリ

名前操作コスト
StringCharAt("redbluegreen").charAt(3)1GAS
StringCharCodeAt("redbluegreen").charCodeAt(3)1GAS
StringLength("redbluegreen").lengthX
StringConstructorString.constructor("yellow")1GAS + 0.1GAS * string length
StringToString("redbluegreen").toString()X
StringValueOf("redbluegreen").valueOf()1GAS
StringConcat("redbluegreen").concat("redbluegreen")1GAS + 0.1GAS * res string length
StringIncludes("redbluegreen").includes("red")1GAS + 0.1GAS * string length
StringEndsWith("redbluegreen").endsWith("red")1GAS + 0.1GAS * string length
StringIndexOf("redbluegreen").indexOf("red")1GAS + 0.1GAS * string length
StringLastIndexOf("redbluegreen").lastIndexOf("red")1GAS + 0.1GAS * string length
StringReplace("redbluegreen").replace("red", "blue")1GAS + 0.1GAS * string length
StringSearch("redbluegreen").search("red")1GAS + 0.1GAS * string length
StringSplit("redbluegreen").split("red")1GAS + 0.1GAS * string length
StringStartsWith("redbluegreen").startsWith("red")1GAS + 0.1GAS * string length
StringSlice("redbluegreen").slice()1GAS + 0.1GAS * string length
StringSubstring("redbluegreen").substring(3)1GAS + 0.1GAS * string length
StringToLowerCase("redbluegreen").toLowerCase()1GAS + 0.1GAS * string length
StringToUpperCase("redbluegreen").toUpperCase()1GAS + 0.1GAS * string length
StringTrim("redbluegreen").trim()1GAS + 0.1GAS * string length
StringTrimLeft("redbluegreen").trimLeft()1GAS + 0.1GAS * string length
StringTrimRight("redbluegreen").trimRight()1GAS + 0.1GAS * string length
StringRepeat("redbluegreen").repeat(10)1GAS + 0.1GAS * res string length
ArrayConstructorArray.constructor(["red", "blue", "green"])1GAS + 0.2GAS * res array length
ArrayToString(["red", "blue", "green"]).toString()1GAS + 1GAS * array length
ArrayConcat(["red", "blue", "green"]).concat(["red", "blue", "green"])1GAS + 1GAS * res array length
ArrayEvery(["red", "blue", "green"]).every(function (x) { return true; })1GAS + 1GAS * array length
ArrayFilter(["red", "blue", "green"]).filter(function (x) { return true; })1GAS + 10GAS * array length
ArrayFind(["red", "blue", "green"]).find(function (x) { return true; })1GAS + 1GAS * array length
ArrayFindIndex(["red", "blue", "green"]).findIndex(function (x) { return true; })1GAS + 1GAS * array length
ArrayForEach(["red", "blue", "green"]).forEach(function (x) { return; })1GAS + 1GAS * array length
ArrayIncludes(["red", "blue", "green"]).includes("red")1GAS + 1GAS * array length
ArrayIndexOf(["red", "blue", "green"]).indexOf("red")1GAS + 0.2GAS * array length
ArrayJoin(["red", "blue", "green"]).join()1GAS + 1GAS * array length
ArrayKeys(["red", "blue", "green"]).keys()1GAS + 0.2GAS * array length
ArrayLastIndexOf(["red", "blue", "green"]).lastIndexOf("red")1GAS + 0.2GAS * array length
ArrayMap(["red", "blue", "green"]).map(function (x) { return x; })1GAS + 10GAS * array length
ArrayPop(["red", "blue", "green"]).pop()1GAS
ArrayPush(["red", "blue", "green"]).push("yellow")1GAS
ArrayReverse(["red", "blue", "green"]).reverse()1GAS + 0.2GAS * array length
ArrayShift(["red", "blue", "green"]).shift()1GAS
ArraySlice(["red", "blue", "green"]).slice()1GAS + 10GAS * array length
ArraySort(["red", "blue", "green"]).sort()1GAS + 1GAS * array length
ArraySplice(["red", "blue", "green"]).splice(0)1GAS + 10GAS * array length + (arguments length -2)
ArrayUnshift(["red", "blue", "green"]).unshift("yellow")1GAS
JSONParseJSON.parse({"array": ["red", "blue", "green"], "string": "", "float": 100})10GAS + 10GAS * string length
MathAbsMath.abs(-1)2GAS
MathCbrtMath.cbrt(2.5)2GAS
MathCeilMath.ceil(-1.5)2GAS
MathFloorMath.floor(1.5)2GAS
MathLogMath.log(5)2GAS
MathLog10Math.log10(1234)2GAS
MathLog1pMath.log1p(0.7)2GAS
MathMaxMath.max(3, 10, 5)2GAS
MathMinMath.min(3, 10, 5)2GAS
MathPowMath.pow(3, 15.5)2GAS
MathRoundMath.round(2.7)2GAS
MathSqrtMath.sqrt(3.4)2GAS
BigNumberConstructorBigNumber.prototype.constructor("99999999999999999")20gas
BigNumberAbsnew BigNumber("-99999999999999999").abs()20gas
BigNumberDivnew BigNumber("-99999999999999999").div("99999")20gas + 10gas * (number length + args[0] length)
BigNumberIdivnew BigNumber("-99999999999999999").idiv("99999")20gas + 10gas * (number length + args[0] length)
BigNumberPownew BigNumber("-99999999999999999").pow("99999")20gas + 10gas * (number length + args[0] length)
BigNumberIntegerValuenew BigNumber("-99999999999999999").integerValue()20gas + 4gas * number length
BigNumberEqnew BigNumber("-99999999999999999").eq("99999")20gas + 2gas * (number length + args[0] length)
BigNumberIsFinitenew BigNumber("-99999999999999999").isFinite()20gas
BigNumberGtnew BigNumber("-99999999999999999").gt("99999")20gas + 2gas * (number length + args[0] length)
BigNumberGtenew BigNumber("-99999999999999999").gte("99999")20gas + 2gas * (number length + args[0] length)
BigNumberIsIntegernew BigNumber("-99999999999999999").isInteger()20gas
BigNumberLtnew BigNumber("-99999999999999999").lt("99999")20gas + 2gas * (number length + args[0] length)
BigNumberLtenew BigNumber("-99999999999999999").lte("99999")20gas + 2gas * (number length + args[0] length)
BigNumberIsNaNnew BigNumber("-99999999999999999").isNaN()20gas
BigNumberIsNegativenew BigNumber("-99999999999999999").isNegative()20gas
BigNumberIsPositivenew BigNumber("-99999999999999999").isPositive()20gas
BigNumberIsZeronew BigNumber("-99999999999999999").isZero()20gas
BigNumberMinusnew BigNumber("-99999999999999999").minus("99999")20gas + 10gas * (number length + args[0] length)
BigNumberModnew BigNumber("-99999999999999999").mod("99999")20gas + 10gas * (number length + args[0] length)
BigNumberTimesnew BigNumber("-99999999999999999").times("99999")20gas + 4gas * (number length + args[0] length)
BigNumberNegatednew BigNumber("-99999999999999999").negated()20gas
BigNumberPlusnew BigNumber("-99999999999999999").plus("99999")20gas + 10gas * (number length + args[0] length)
BigNumberSqrtnew BigNumber("-99999999999999999").sqrt()20gas + 4gas * number length
BigNumberToFixednew BigNumber("-99999999999999999").toFixed(5)20gas + 4gas * number length

ストレージ

名前操作コスト
Putstorage.put("key", "value")300GAS
Getstorage.get("key")300GAS
Hasstorage.has("key")300GAS
Delstorage.del("key")300GAS
MapPutstorage.mapPut("key", "field", "value")300GAS
MapGetstorage.mapGet("key", "field")300GAS
MapHasstorage.mapHas("key", "field")300GAS
MapDelstorage.mapDel("key", "field")300GAS
MapKeysstorage.mapKeys("key")300GAS
MapLenstorage.mapLen("key")300GAS

ネットワーク

名前操作コスト
transactiontransaction size (byte)10GAS * transaction size
receiptreceipt size (byte)10GAS * receipt size