@alephium/web3 0.2.0-rc.0 → 0.2.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/contracts/add/add.ral +1 -1
- package/contracts/greeter/greeter.ral +1 -1
- package/contracts/greeter_main.ral +2 -2
- package/contracts/sub/sub.ral +1 -1
- package/contracts/test/metadata.ral +17 -0
- package/contracts/test/warnings.ral +5 -0
- package/dist/alephium-web3.min.js +1 -1
- package/dist/alephium-web3.min.js.map +1 -1
- package/dist/scripts/create-project.js +2 -1
- package/dist/src/api/api-alephium.d.ts +11 -7
- package/dist/src/api/api-alephium.js +3 -3
- package/dist/src/api/api-explorer.d.ts +16 -0
- package/dist/src/api/api-explorer.js +26 -0
- package/dist/src/contract/contract.d.ts +23 -14
- package/dist/src/contract/contract.js +35 -13
- package/dist/src/utils/utils.d.ts +2 -2
- package/dist/src/utils/utils.js +2 -2
- package/package.json +3 -3
- package/scripts/create-project.ts +2 -1
- package/src/api/api-alephium.ts +12 -8
- package/src/api/api-explorer.ts +30 -0
- package/src/contract/contract.ts +75 -34
- package/src/contract/events.ts +2 -2
- package/src/contract/ralph.test.ts +4 -4
- package/src/transaction/status.ts +1 -1
- package/src/utils/subscription.ts +1 -1
- package/src/utils/utils.test.ts +1 -1
- package/src/utils/utils.ts +4 -4
- package/templates/base/package.json +2 -2
- package/templates/react/package.json +2 -2
- package/test/contract.test.ts +19 -0
- package/test/transaction.test.ts +1 -1
package/contracts/add/add.ral
CHANGED
|
@@ -2,8 +2,8 @@ import "./greeter/greeter.ral"
|
|
|
2
2
|
|
|
3
3
|
TxScript Main(greeterContractId: ByteVec) {
|
|
4
4
|
let greeter0 = Greeter(greeterContractId)
|
|
5
|
-
assert!(greeter0.greet() == 1)
|
|
5
|
+
assert!(greeter0.greet() == 1, 0)
|
|
6
6
|
|
|
7
7
|
let greeter1 = GreeterInterface(greeterContractId)
|
|
8
|
-
assert!(greeter1.greet() == 1)
|
|
8
|
+
assert!(greeter1.greet() == 1, 0)
|
|
9
9
|
}
|
package/contracts/sub/sub.ral
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Contract MetaData() {
|
|
2
|
+
@using(preapprovedAssets = true, assetsInContract = false)
|
|
3
|
+
pub fn foo() -> () {
|
|
4
|
+
transferAlph!(callerAddress!(), callerAddress!(), 1 alph)
|
|
5
|
+
return
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@using(preapprovedAssets = false, assetsInContract = true)
|
|
9
|
+
fn bar() -> () {
|
|
10
|
+
transferAlphToSelf!(selfAddress!(), 1 alph)
|
|
11
|
+
return
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
fn baz() -> () {
|
|
15
|
+
return
|
|
16
|
+
}
|
|
17
|
+
}
|