@btc-vision/btc-runtime 1.3.21 → 1.4.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@btc-vision/btc-runtime",
3
- "version": "1.3.21",
3
+ "version": "1.4.0",
4
4
  "description": "Bitcoin Smart Contract Runtime",
5
5
  "main": "btc/index.ts",
6
6
  "scripts": {
@@ -206,19 +206,19 @@ export abstract class DeployableOP_20 extends OP_NET implements IOP_20 {
206
206
  response = new BytesWriter(U256_BYTE_LENGTH);
207
207
  response.writeU256(this.maxSupply);
208
208
  break;
209
- case encodeSelector('allowance'):
209
+ case encodeSelector('allowance(address,address)'):
210
210
  return this.allowance(calldata);
211
- case encodeSelector('approve'):
211
+ case encodeSelector('approve(address,uint256)'):
212
212
  return this.approve(calldata);
213
- case encodeSelector('approveFrom'):
213
+ case encodeSelector('approveFrom(address,address,uint256,bytes)'):
214
214
  return this.approveFrom(calldata);
215
- case encodeSelector('balanceOf'):
215
+ case encodeSelector('balanceOf(address)'):
216
216
  return this.balanceOf(calldata);
217
- case encodeSelector('burn'):
217
+ case encodeSelector('burn(uint256)'):
218
218
  return this.burn(calldata);
219
- case encodeSelector('transfer'):
219
+ case encodeSelector('transfer(address,uint256)'):
220
220
  return this.transfer(calldata);
221
- case encodeSelector('transferFrom'):
221
+ case encodeSelector('transferFrom(address,address,uint256)'):
222
222
  return this.transferFrom(calldata);
223
223
  default:
224
224
  return super.execute(method, calldata);
@@ -6,7 +6,7 @@ import { encodeSelector, Selector } from '../math/abi';
6
6
  import { Calldata } from '../types';
7
7
  import { Address } from '../types/Address';
8
8
  import { Revert } from '../types/Revert';
9
- import { ADDRESS_BYTE_LENGTH } from '../utils/lengths';
9
+ import { ADDRESS_BYTE_LENGTH } from '../utils';
10
10
 
11
11
  export class OP_NET implements IBTC {
12
12
  public get address(): Address {
@@ -17,9 +17,11 @@ export class OP_NET implements IBTC {
17
17
  return Blockchain.contractDeployer;
18
18
  }
19
19
 
20
- public onDeployment(_calldata: Calldata): void {}
20
+ public onDeployment(_calldata: Calldata): void {
21
+ }
21
22
 
22
- public onExecutionCompleted(): void {}
23
+ public onExecutionCompleted(): void {
24
+ }
23
25
 
24
26
  public execute(method: Selector, _calldata: Calldata): BytesWriter {
25
27
  let response: BytesWriter;